summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-get-install-deb
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-08-16 20:08:29 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-08-17 14:12:25 +0200
commit8bd823d0a1f7e08ad94a7110bb118f73348133a1 (patch)
tree29d2b2920123653c02bded8a6f8faf66dd69e8e8 /test/integration/test-apt-get-install-deb
parente289907f5e7241034cb0d37055dc2cba4e3a19af (diff)
add --with-source option and Packages/Sources support
We support "./foobar.deb" as a way to install a deb file directly. Recently .changes files were added. This highlights a problem as you can't add the changes file without also trying to install all of them. Now, it could also be handy to add entire Packages/Sources files to perhaps get a bunch of packages in without installing them all implicitly. This commit introduces --with-source which allows to add *.deb, *.changes, *.dsc, source-dirs, Packages & Sources files (the later can also be compressed) without also installing them.
Diffstat (limited to 'test/integration/test-apt-get-install-deb')
-rwxr-xr-xtest/integration/test-apt-get-install-deb35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/integration/test-apt-get-install-deb b/test/integration/test-apt-get-install-deb
index 3aacc301d..5f2877dfd 100755
--- a/test/integration/test-apt-get-install-deb
+++ b/test/integration/test-apt-get-install-deb
@@ -64,6 +64,23 @@ Remv foo:i386 [1.0]
Inst foo (1.0 local-deb [amd64])
Conf foo (1.0 local-deb [amd64])" aptget install ./incoming/foo_1.0_amd64.deb -s
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install --with-source ./incoming/foo_1.0_amd64.deb -s
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ foo:i386
+The following NEW packages will be installed:
+ foo
+0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
+Remv foo:i386 [1.0]
+Inst foo (1.0 local-deb [amd64])
+Conf foo (1.0 local-deb [amd64])' aptget install --with-source ./incoming/foo_1.0_amd64.deb foo -s
+
# Check that installing the local deb works if it is not the candidate
echo "Package: foo
Pin: version 1.0
@@ -133,3 +150,21 @@ fi
sed -i -e '/^Depends: foo/ d' rootdir/var/lib/dpkg/status
testsuccess aptget install -y ./incoming/pkg-as-it-should-be_0_all.deb
testfailure grep 'is already the newest version' rootdir/tmp/testsuccess.output
+testsuccess apt purge -y pkg-as-it-should-be
+
+echo "Package: pkg-as-it-should-be
+Architecture: all
+Version: 0
+Installed-Size: 2903
+Filename: incoming/pkg-as-it-should-be_0_all.deb
+Size: $(stat -c %s incoming/pkg-as-it-should-be_0_all.deb)
+SHA256: $(sha256sum incoming/pkg-as-it-should-be_0_all.deb | cut -d' ' -f 1)
+" > Packages
+testdpkgnotinstalled 'pkg-as-it-should-be'
+testnopackage pkg-as-it-should-be
+testsuccess apt install --with-source ./Packages pkg-as-it-should-be -s
+testsuccess apt install --with-source ./Packages pkg-as-it-should-be --print-uris
+testsuccess apt show --with-source ./Packages pkg-as-it-should-be
+testequal 'Package: pkg-as-it-should-be' head -n1 rootdir/tmp/testsuccess.output
+testsuccess apt install -y --with-source ./Packages pkg-as-it-should-be
+testdpkginstalled 'pkg-as-it-should-be'