From 6085ab7488326cfed8f82e07eefcbc2dc40d4bea Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 12 Apr 2018 09:59:47 +0200 Subject: Support local files as arguments in show command Now that --with-source is supported in show we can go a little further and add the "syntactic sugar" of supporting deb-files on the commandline directly to give users an alternative to remembering dpkg -I for deb files & as a bonus apt also works on changes files. Most of the code churn is actually to deal with cases probably not too common in reality like mixing packages and deb-files on the commandline and getting the right order for these multiple records. Closes: 883206 --- test/integration/test-apt-get-install-deb | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/integration/test-apt-get-install-deb b/test/integration/test-apt-get-install-deb index ff103a514..844f1d7c5 100755 --- a/test/integration/test-apt-get-install-deb +++ b/test/integration/test-apt-get-install-deb @@ -48,16 +48,37 @@ E: Unable to correct problems, you have held broken packages." aptget install ./ testsuccess apt show foo --with-source ./incoming/foo_1.0_amd64.deb testequal 'Package: foo -Version: 1.0' head -n 2 rootdir/tmp/testsuccess.output +Version: 1.0' grep -e '^Package:' -e '^Version:' -e '^Architecture:' rootdir/tmp/testsuccess.output +testsuccess apt show ./incoming/foo_1.0_amd64.deb +testequal 'Package: foo +Version: 1.0' grep -e '^Package:' -e '^Version:' -e '^Architecture:' rootdir/tmp/testsuccess.output +testsuccess apt show foo:i386 ./incoming/foo_1.0_amd64.deb --with-source ./incoming/foo_1.0_i386.deb +testequal 'Package: foo:i386 +Version: 1.0 +Package: foo +Version: 1.0' grep -e '^Package:' -e '^Version:' -e '^Architecture:' rootdir/tmp/testsuccess.output + +testsuccess aptcache show foo --with-source ./incoming/foo_1.0_amd64.deb +testequal 'Package: foo +Version: 1.0 +Architecture: amd64' grep -e '^Package:' -e '^Version:' -e '^Architecture:' rootdir/tmp/testsuccess.output +testsuccess aptcache show ./incoming/foo_1.0_amd64.deb +testequal 'Package: foo +Version: 1.0 +Architecture: amd64' grep -e '^Package:' -e '^Version:' -e '^Architecture:' rootdir/tmp/testsuccess.output +testsuccess aptcache show foo:i386 ./incoming/foo_1.0_amd64.deb --with-source ./incoming/foo_1.0_i386.deb +testequal 'Package: foo +Version: 1.0 +Architecture: i386 +Package: foo +Version: 1.0 +Architecture: amd64' grep -e '^Package:' -e '^Version:' -e '^Architecture:' rootdir/tmp/testsuccess.output + testsuccessequal 'Sorting... Full Text Search... foo/local-deb 1.0 amd64 an autogenerated dummy foo=1.0/unstable ' apt search foo --with-source ./incoming/foo_1.0_amd64.deb - -testsuccess aptcache show foo --with-source ./incoming/foo_1.0_amd64.deb -testequal 'Package: foo -Version: 1.0' head -n 2 rootdir/tmp/testsuccess.output testsuccessequal 'foo - an autogenerated dummy foo=1.0/unstable' aptcache search foo --with-source ./incoming/foo_1.0_amd64.deb testdpkgnotinstalled 'foo' 'foo:i386' -- cgit v1.2.3