X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/a628ca5256b4a2f3ae300697b17adf150b6e17b0..4b1fb7b1876bdb46cb7a0329158f12638baa2464:/test/integration/test-acquire-binary-all diff --git a/test/integration/test-acquire-binary-all b/test/integration/test-acquire-binary-all index d428c106d..ba47eddc2 100755 --- a/test/integration/test-acquire-binary-all +++ b/test/integration/test-acquire-binary-all @@ -18,6 +18,7 @@ Acquire::IndexTargets::deb::Contents { KeepCompressed "true"; }; EOF +cp -a rootdir/etc/apt/sources.list.d rootdir/etc/apt/sources.list.d.bak msgmsg 'Releasefile with Architectures field and all included' testsuccess apt update @@ -38,6 +39,16 @@ testfileequal lists.before "$(listcurrentlistsdirectory)" testequal 'foo-1 foo-2' aptcache pkgnames foo- +rm -rf rootdir/var/lib/apt/lists +msgmsg 'Releasefile with Architectures field and all included, but arch-=all' +sed -i 's#^deb\(-src\)\? #deb\1 [arch-=all] #' rootdir/etc/apt/sources.list.d/* +testsuccesswithnotice apt update +cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/ +cp rootdir/tmp/testsuccess.output aptupdate.output +testfailure grep '^Get.* all Packages ' aptupdate.output +testfailure grep '^Get.* all Contents ' aptupdate.output +testequal 'foo-2' aptcache pkgnames foo- + rm -rf rootdir/var/lib/apt/lists msgmsg 'Releasefile has all, but forbids its usage' configarchitecture 'amd64' @@ -50,6 +61,16 @@ testfailure grep '^Get.* all Packages ' aptupdate.output testsuccess grep '^Get.* all Contents ' aptupdate.output sed -i '/^No-Support-for-Architecture-all: / d' $(find ./aptarchive -name 'Release') +rm -rf rootdir/var/lib/apt/lists +msgmsg 'Releasefile has all, forbids its usage, but it is forced with arch=all' +sed -i 's#^deb\(-src\)\? #deb\1 [arch=all] #' rootdir/etc/apt/sources.list.d/* +testsuccess apt update +cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/ +cp rootdir/tmp/testsuccess.output aptupdate.output +testsuccess grep '^Get.* all Packages ' aptupdate.output +testsuccess grep '^Get.* all Contents ' aptupdate.output +testequal 'foo-1' aptcache pkgnames foo- + rm -rf rootdir/var/lib/apt/lists msgmsg 'Releasefile with Architectures field but without all' configarchitecture 'amd64' 'i386' @@ -69,6 +90,17 @@ testfailure grep '^Get.* all Packages ' aptupdate.output testfailure grep '^Get.* all Contents ' aptupdate.output testequal 'foo-2' aptcache pkgnames foo- +rm -rf rootdir/var/lib/apt/lists +msgmsg 'Releasefile with Architectures field but without all forced with arch+=all' +sed -i 's#^deb\(-src\)\? #deb\1 [arch+=all] #' rootdir/etc/apt/sources.list.d/* +testsuccess apt update +cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/ +cp rootdir/tmp/testsuccess.output aptupdate.output +testsuccess grep '^Get.* all Packages ' aptupdate.output +testsuccess grep '^Get.* all Contents ' aptupdate.output +testequal 'foo-1 +foo-2' aptcache pkgnames foo- + rm -rf rootdir/var/lib/apt/lists msgmsg 'Releasefile without Architectures field' getarchitecturesfromreleasefile() { echo -n ''; }