if ! command dpkg --assert-multi-arch >/dev/null 2>&1; then
echo "DPKG::options:: \"--force-architecture\";" # Added to test multiarch before dpkg is ready for it…
fi
+ echo 'quiet "0";'
echo 'quiet::NoUpdate "true";'
echo 'quiet::NoStatistic "true";'
# too distracting for users, but helpful to detect changes
# both should be given in notation date/touch can understand
local DATE="$1"
local VALIDUNTIL="$2"
- msgninfo "\tGenerate Release files… "
if [ -e aptarchive/dists ]; then
+ msgninfo "\tGenerate Release files for dists… "
for dir in $(find ./aptarchive/dists -mindepth 1 -maxdepth 1 -type d); do
local ARCHITECTURES="$(getarchitecturesfromreleasefile "$dir")"
local SUITE="$(echo "$dir" | cut -d'/' -f 4)"
fi
done
else
+ msgninfo "\tGenerate Release files for flat… "
aptftparchiverelease ./aptarchive > aptarchive/Release
fi
if [ -n "$DATE" -a "$DATE" != "now" ]; then
local ARCH="$(getarchitecture 'native')"
echo "$VIRTUAL" | sed -e "s/:$ARCH//" -e 's/:all//' >"$COMPAREFILE"
local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/testshowvirtual.output"
- testoutputequal "$COMPAREFILE" aptcache show -q=0 "$PACKAGE"
+ testoutputequal "$COMPAREFILE" aptcache show "$PACKAGE"
msggroup
}
configarchitecture 'amd64' 'i386'
testsuccessequal "All packages are up to date.
-N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'file:$(readlink -f ./aptarchive) unstable InRelease' doesn't support architecture 'i386'" apt update -q=0 -o quiet::NoProgress=1
+N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'file:$(readlink -f ./aptarchive) unstable InRelease' doesn't support architecture 'i386'" apt update -o quiet::NoProgress=1
testfileequal lists.before "$(listcurrentlistsdirectory)"
testequal 'foo-1
foo-2' aptcache pkgnames foo-
getarchitecturesfromreleasefile() { echo "$(getarchitectures)"; }
generatereleasefiles
signreleasefiles
-testsuccessequal "All packages are up to date.
-N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'file:$(readlink -f ./aptarchive) unstable InRelease' doesn't support architecture 'i386'" apt update -q=0 -o quiet::NoProgress=1
+testsuccessequal 'All packages are up to date.' apt update -o quiet::NoProgress=1
cp rootdir/tmp/testsuccess.output aptupdate.output
testfailure grep '^Get.* all Packages ' aptupdate.output
testequal 'foo-2' aptcache pkgnames foo-
# apt doesn't know supported archs, so missing a configured arch is a failure
configarchitecture 'amd64' 'i386'
-testfailure apt update -q=0
+testfailure apt update
testequal 'foo-1
foo-2' aptcache pkgnames foo-
mv incoming/* aptarchive/pool/main/
# generate (empty cachedb)
-testsuccess aptftparchive generate ftparchive.conf -q=0 -o APT::FTPArchive::ShowCacheMisses=1
+testsuccess aptftparchive generate ftparchive.conf -o APT::FTPArchive::ShowCacheMisses=1
cp rootdir/tmp/testsuccess.output stats-out.txt
ensure_correct_packages_file
ensure_correct_contents_file
dists/test/Contents-i386: New 402 B Misses in Cache: 0' grep Misses stats-out.txt
# generate again
-testsuccess aptftparchive generate ftparchive.conf -q=0 -o APT::FTPArchive::ShowCacheMisses=1
+testsuccess aptftparchive generate ftparchive.conf -o APT::FTPArchive::ShowCacheMisses=1
cp rootdir/tmp/testsuccess.output stats-out.txt
ensure_correct_packages_file
ensure_correct_contents_file
# and again (with removing the Packages file)
rm -f ./aptarchive/dists/test/main/binary-i386/*
rm -f ./aptarchive/dists/test/Contents-i386
-testsuccess aptftparchive generate ftparchive.conf -q=0 -o APT::FTPArchive::ShowCacheMisses=1
+testsuccess aptftparchive generate ftparchive.conf -o APT::FTPArchive::ShowCacheMisses=1
cp rootdir/tmp/testsuccess.output stats-out.txt
ensure_correct_packages_file
ensure_correct_contents_file
# and clean
rm -rf aptarchive/pool/main/*
-testsuccessequal "packages-main-i386.db" aptftparchive clean ftparchive.conf -q=0
-testsuccess aptftparchive clean ftparchive.conf -q=0 -o Debug::APT::FTPArchive::Clean=1
+testsuccessequal "packages-main-i386.db" aptftparchive clean ftparchive.conf
+testsuccess aptftparchive clean ftparchive.conf -o Debug::APT::FTPArchive::Clean=1
cp rootdir/tmp/testsuccess.output clean-out.txt
testsuccessequal "0 Number of unique keys in the tree" grep unique clean-out.txt
testsuccessequal "packages-main-i386.db" grep packages-main-i386.db clean-out.txt
msgtest 'generate with --db option'
cd aptarchive
-aptftparchive --db ./test.db sources pool/main/ -q=0 -o APT::FTPArchive::ShowCacheMisses=1 > dists/test/main/source/Sources 2>stats-out.txt && msgpass || msgfail
+aptftparchive --db ./test.db sources pool/main/ -o APT::FTPArchive::ShowCacheMisses=1 > dists/test/main/source/Sources 2>stats-out.txt && msgpass || msgfail
testsuccess grep Misses stats-out.txt
testfileequal '../rootdir/tmp/testsuccess.output' ' Misses in Cache: 2'
cd ..
msgtest 'generate with --db option (again to ensure its in the cache)'
cd aptarchive
-aptftparchive --db ./test.db sources pool/main/ -q=0 -o APT::FTPArchive::ShowCacheMisses=1 > dists/test/main/source/Sources 2>stats-out.txt && msgpass || msgfail
+aptftparchive --db ./test.db sources pool/main/ -o APT::FTPArchive::ShowCacheMisses=1 > dists/test/main/source/Sources 2>stats-out.txt && msgpass || msgfail
testsuccess grep Misses stats-out.txt
testfileequal '../rootdir/tmp/testsuccess.output' ' Misses in Cache: 0'
cd ..
EOF
msgtest 'generate (empty cachedb)'
-testsuccess aptftparchive generate apt-ftparchive.conf -q=0 -o APT::FTPArchive::ShowCacheMisses=1
+testsuccess aptftparchive generate apt-ftparchive.conf -o APT::FTPArchive::ShowCacheMisses=1
cp rootdir/tmp/testsuccess.output stats-out.txt
testsuccess grep Misses stats-out.txt
testfileequal rootdir/tmp/testsuccess.output ' Misses in Cache: 2'
msgtest 'generate again out of the cache'
rm -f ./aptarchive/dists/test/main/source/Sources
-testsuccess aptftparchive generate apt-ftparchive.conf -q=0 -o APT::FTPArchive::ShowCacheMisses=1
+testsuccess aptftparchive generate apt-ftparchive.conf -o APT::FTPArchive::ShowCacheMisses=1
cp rootdir/tmp/testsuccess.output stats-out.txt
testsuccess grep Misses stats-out.txt
testfileequal rootdir/tmp/testsuccess.output ' Misses in Cache: 0'
# ensure clean works
rm -f aptarchive/pool/main/*
-testsuccess aptftparchive clean apt-ftparchive.conf -q=0 -o Debug::APT::FTPArchive::Clean=1
+testsuccess aptftparchive clean apt-ftparchive.conf -o Debug::APT::FTPArchive::Clean=1
cp rootdir/tmp/testsuccess.output clean-out.txt
testsuccess grep unique clean-out.txt
testfileequal 'rootdir/tmp/testsuccess.output' "0 Number of unique keys in the tree"
done
if [ "$(id -u)" = '0' ]; then
# Release file can't be accessed by _apt
- testsuccesswithnotice aptget update -q=0
+ testsuccesswithnotice aptget update
fi
#everything (too) permissive
The following packages have unmet dependencies:
foo:i386 : Conflicts: foo but 1.0 is to be installed
foo : Conflicts: foo:i386 but 1.0 is to be installed
-E: Unable to correct problems, you have held broken packages." aptget install ./incoming/foo_1.0_i386.deb ./incoming/foo_1.0_amd64.deb -s -q=0
+E: Unable to correct problems, you have held broken packages." aptget install ./incoming/foo_1.0_i386.deb ./incoming/foo_1.0_amd64.deb -s
testdpkgnotinstalled 'foo'
testsuccess aptget install ./incoming/foo_1.0_i386.deb -o Debug::pkgCacheGen=1
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 ./incoming/foo_1.0_amd64.deb -s -q=0
+Conf foo (1.0 local-deb [amd64])" aptget install ./incoming/foo_1.0_amd64.deb -s
# Check that installing the local deb works if it is not the candidate
echo "Package: 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 ./incoming/foo_1.0_amd64.deb -s -q=0
+Conf foo (1.0 local-deb [amd64])" aptget install ./incoming/foo_1.0_amd64.deb -s
createpkg() {
local PKG="pkg-$1"
if [ "$(id -u)" = '0' ]; then
apt clean
chmod 711 ./incoming
- testsuccess aptget install -y --allow-downgrades ./incoming/pkg-as-it-should-be_0_all.deb -q=0
+ testsuccess aptget install -y --allow-downgrades ./incoming/pkg-as-it-should-be_0_all.deb
chmod 710 ./incoming
- testsuccesswithnotice aptget install -y --allow-downgrades ./incoming/pkg-as-it-should-be_0_all.deb -q=0
+ testsuccesswithnotice aptget install -y --allow-downgrades ./incoming/pkg-as-it-should-be_0_all.deb
chmod 700 ./incoming
- testsuccesswithnotice aptget install -y --allow-downgrades ./incoming/pkg-as-it-should-be_0_all.deb -q=0
+ testsuccesswithnotice aptget install -y --allow-downgrades ./incoming/pkg-as-it-should-be_0_all.deb
fi
foo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst foo (1 unstable [amd64])
-Conf foo (1 unstable [amd64])" aptget install foo-prv -s -q=0
+Conf foo (1 unstable [amd64])" aptget install foo-prv -s
testvirtuals() {
testfailureequal "Reading package lists...
$2
You should explicitly select one to install.
-E: Package '$1' has no installation candidate" aptget install $1 -s -q=0
+E: Package '$1' has no installation candidate" aptget install $1 -s
}
testvirtuals 'foo-prv1' 'baz1 1' 'foo1 1'
foo5:i386 2 [Not candidate version]
baz5 1 [Not candidate version]
-E: Package 'foo-prv5' has no installation candidate" aptget install foo-prv5 -s -q=0
+E: Package 'foo-prv5' has no installation candidate" aptget install foo-prv5 -s
Reading package lists...
E: The repository 'file:$APTARCHIVE unstable Release' does not have a Release file.
N: Updating such a repository securily is impossible and therefore disabled by default.
-N: See apt-secure(8) manpage for repository creation and user configuration details." aptget update --no-allow-insecure-repositories -q=0
+N: See apt-secure(8) manpage for repository creation and user configuration details." aptget update --no-allow-insecure-repositories
# no package foo
testsuccessequal 'Listing...' apt list foo
Reading package lists...
W: The repository 'file:$APTARCHIVE unstable Release' does not have a Release file.
N: Data from such a repository can not be authenticated and is therefore potentially dangerous to use.
-N: See apt-secure(8) manpage for repository creation and user configuration details." aptget update --allow-insecure-repositories -q=0
+N: See apt-secure(8) manpage for repository creation and user configuration details." aptget update --allow-insecure-repositories
# ensure we can not install the package
testfailureequal "WARNING: The following packages cannot be authenticated!
foo
testfailureequal 'E: Must specify at least one pair url/filename' apthelper download-file 'http://example.org/'
testfailureequal 'E: Need one URL as argument' apthelper auto-detect-proxy
testfailureequal 'E: Must specify at least one SRV record' apthelper srv-lookup
-testfailureequal 'E: GetSrvRec failed for localhost' apthelper srv-lookup 'localhost'
-testfailureequal "E: GetSrvRec failed for localhost:${APTHTTPPORT}" apthelper srv-lookup "localhost:${APTHTTPPORT}"
-testfailureequal "E: GetSrvRec failed for localhost:${APTHTTPSPORT}" apthelper srv-lookup "localhost:${APTHTTPSPORT}"
+testfailureequal 'E: GetSrvRec failed for localhost' apthelper -q=1 srv-lookup 'localhost'
+testfailureequal "E: GetSrvRec failed for localhost:${APTHTTPPORT}" apthelper -q=1 srv-lookup "localhost:${APTHTTPPORT}"
+testfailureequal "E: GetSrvRec failed for localhost:${APTHTTPSPORT}" apthelper -q=1 srv-lookup "localhost:${APTHTTPSPORT}"
testnoautopkg() {
testempty aptmark showauto
- testempty aptcache showauto
+ testempty aptcache -q=1 showauto
testsuccessequal 'bar
dpkg
foo' aptmark showmanual
}
testfooisauto() {
testsuccessequal 'foo' aptmark showauto
- testsuccessequal 'foo' aptcache showauto
+ testsuccessequal 'foo' aptcache -q=1 showauto
testsuccessequal 'foo' aptmark showauto foo
- testsuccessequal 'foo' aptcache showauto foo
+ testsuccessequal 'foo' aptcache -q=1 showauto foo
testsuccessequal 'bar
dpkg' aptmark showmanual
testsuccessequal 'bar' aptmark showmanual bar
}
testmarkonpkgasauto() {
- testsuccess $1 $2 foo
+ testsuccess $1 -q=1 $2 foo
testfooisauto
- testsuccess $1 $2 foo
+ testsuccess $1 -q=1 $2 foo
testfooisauto
- testsuccess $1 $3 foo
+ testsuccess $1 -q=1 $3 foo
testnoautopkg
- testsuccess $1 $3 foo
+ testsuccess $1 -q=1 $3 foo
testnoautopkg
}
pretest() {
rm -rf rootdir/var/lib/apt/lists
- testsuccessequal 'N: Unable to locate package foo' aptcache policy foo -q=0
+ testsuccessequal 'N: Unable to locate package foo' aptcache policy foo
}
pretest
testsuccess aptget update
pretest
mv aptarchive/dists/stable aptarchive/dists/stable.good
-testfailuremsg "E: The repository 'https://localhost:${APTHTTPSPORT} stable Release' does not have a Release file." apt update
-testfailure aptget update -q=0 --no-allow-insecure-repositories
+testfailuremsg "E: The repository 'https://localhost:${APTHTTPSPORT} stable Release' does not have a Release file.
+N: Updating such a repository securily is impossible and therefore disabled by default.
+N: See apt-secure(8) manpage for repository creation and user configuration details." apt update
+testfailure aptget update --no-allow-insecure-repositories
testequalor2 "Hit:1 http://localhost:${APTHTTPPORT} sid InRelease
Ign:2 https://localhost:${APTHTTPSPORT} stable InRelease
404 Not Found
pretest
rm "${NEWMETHODS}/https"
testfailuremsg "E: The method driver ${TMPWORKINGDIRECTORY}/rootdir/usr/lib/apt/methods/https could not be found.
+N: Is the package apt-transport-https installed?
W: Failed to fetch https://localhost:${APTHTTPSPORT}/dists/stable/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update
posttest
testsuccess aptget update
rm -rf rootdir/var/lib/apt/lists
chmod 510 aptarchive/dists/
- testsuccesswithnotice aptget update -q=0
+ testsuccesswithnotice aptget update
rm -rf rootdir/var/lib/apt/lists
chmod 500 aptarchive/dists/
- testsuccesswithnotice aptget update -q=0
+ testsuccesswithnotice aptget update
exit
fi
chmod 555 aptarchive/dists/unstable/main/binary-all
# check that I-M-S header is kept in redirections
echo "$EXPECT" | sed -e 's#(invalid since [^)]\+)#(invalid since)#' > expected.output
- $TEST aptget update -o Debug::pkgAcquire::Worker=0 -o Debug::Acquire::http=0 -q=0 $APTOPT
+ $TEST aptget update -o Debug::pkgAcquire::Worker=0 -o Debug::Acquire::http=0 $APTOPT
sed -i -e 's#(invalid since [^)]\+)#(invalid since)#' rootdir/tmp/${TEST}.output
testequal "$(cat expected.output)" cat rootdir/tmp/${TEST}.output
testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)"
{
testfailuremsg "E: The repository 'file:${APTARCHIVE} unstable Release' is no longer signed.
N: Updating such a repository securily is impossible and therefore disabled by default.
-N: See apt-secure(8) manpage for repository creation and user configuration details." aptget update -q=0
+N: See apt-secure(8) manpage for repository creation and user configuration details." aptget update
assert_repo_is_intact
}
insertpackage 'unstable' 'foo' 'all' '1'
setupaptarchive --no-update
+exit
changetohttpswebserver --authorization="$(printf '%s' 'star:hunter2' | base64 )"
Conf libc6:amd64 (1.0 stable [amd64])
Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64 -st stable
-testsuccessequal 'Reading package lists...
+testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
+Selected version '1.0' (stable [i386]) for 'foobar'
The following NEW packages will be installed:
foobar
The following packages will be upgraded:
Inst libc6 [1.0] (2.0 testing [all])
Inst foobar (1.0 stable [i386])
Conf libc6 (2.0 testing [all])
-Conf foobar (1.0 stable [i386])' aptget install foobar/stable libc6 -st testing
+Conf foobar (1.0 stable [i386])" aptget install foobar/stable libc6 -st testing
testsuccessequal 'Reading package lists...
Building dependency tree...
testsuccess aptget install libc6:i386 -y
testdpkginstalled libc6:all
-testsuccessequal 'Reading package lists...
+testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
+Selected version '1.0' (stable [i386]) for 'foobar'
The following NEW packages will be installed:
foobar
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst foobar (1.0 stable [i386])
-Conf foobar (1.0 stable [i386])' aptget install foobar/stable -st testing
+Conf foobar (1.0 stable [i386])" aptget install foobar/stable -st testing
-testsuccessequal 'Reading package lists...
+testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
+Selected version '1.0' (stable [amd64]) for 'foobar:amd64'
The following additional packages will be installed:
libc6:amd64
The following packages will be REMOVED:
Inst libc6:amd64 (1.0 stable [amd64])
Inst foobar:amd64 (1.0 stable [amd64])
Conf libc6:amd64 (1.0 stable [amd64])
-Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64/stable -st testing
+Conf foobar:amd64 (1.0 stable [amd64])" aptget install foobar:amd64/stable -st testing
testsuccessequal "Reading package lists...
libc6
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Inst libc6 [2.0] (1.0 stable [i386])
-Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s -q=0
+Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s
buildsimplenativepackage 'libc6-same' 'i386' '1.0' 'stable' 'Multi-Arch: same'
libc6-same
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Inst libc6-same [2.0] (1.0 stable [i386])
-Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s -q=0
+Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s
-testsuccessequal 'Reading package lists...
+testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
+Selected version '1.0' (stable [i386]) for 'foobar-same'
The following NEW packages will be installed:
foobar-same
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst foobar-same (1.0 stable [i386])
-Conf foobar-same (1.0 stable [i386])' aptget install foobar-same/stable -st testing
+Conf foobar-same (1.0 stable [i386])" aptget install foobar-same/stable -st testing
-testsuccessequal 'Reading package lists...
+testsuccessequal "Reading package lists...
Building dependency tree...
Reading state information...
+Selected version '1.0' (stable [amd64]) for 'foobar-same:amd64'
The following additional packages will be installed:
libc6-same:amd64
The following packages will be REMOVED:
Inst libc6-same:amd64 (1.0 stable [amd64])
Inst foobar-same:amd64 (1.0 stable [amd64])
Conf libc6-same:amd64 (1.0 stable [amd64])
-Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64/stable -st testing
+Conf foobar-same:amd64 (1.0 stable [amd64])" aptget install foobar-same:amd64/stable -st testing
Dependencies:
Provides:
Reverse Provides: ' aptcache showpkg po-debconf:armel
-testsuccessequal 'N: Unable to locate package texi2html:armel' aptcache showpkg texi2html:armel -q=0
+testsuccessequal 'N: Unable to locate package texi2html:armel' aptcache showpkg texi2html:armel
testsuccessequal 'Reading package lists...
Building dependency tree...
cd downloaded
testfailureequal "E: The method driver $(readlink -f './../')/rootdir/usr/lib/apt/methods/https could not be found.
-N: Is the package apt-transport-https installed?" aptget download apt -q=0
+N: Is the package apt-transport-https installed?" aptget download apt
testfailure test -e apt_1.0_all.deb
cd - >/dev/null
setupaptarchive
testsuccessequal "Listing...
-bar/testing 2 all [upgradable from: 1]" apt list --upgradable
+bar/testing 2 all [upgradable from: 1]
+N: There is 1 additional version. Please use the '-a' switch to see it" apt list --upgradable
testsuccessequal "Listing...
bar/testing 2 all [upgradable from: 1]
Inst foo (1 unstable [all])
Inst baz (2 experimental [amd64])
Conf foo (1 unstable [all])
-Conf baz (2 experimental [amd64])" aptget install baz/experimental -s -q=0
+Conf baz (2 experimental [amd64])" aptget install baz/experimental -s
testsuccessequal "Reading package lists...
Building dependency tree...
Inst foo (1 unstable [all])
Inst baz:i386 (2 experimental [i386])
Conf foo (1 unstable [all])
-Conf baz:i386 (2 experimental [i386])" aptget install baz:i386/experimental -s -q=0
+Conf baz:i386 (2 experimental [i386])" aptget install baz:i386/experimental -s
testfailureequal 'Reading package lists...
Building dependency tree...
Inst virtual-provider (2 unstable [amd64])
Inst virtual-provider:i386 (2 unstable [i386])
Conf virtual-provider (2 unstable [amd64])
-Conf virtual-provider:i386 (2 unstable [i386])" aptget install virtual:* -s -q=0
+Conf virtual-provider:i386 (2 unstable [i386])" aptget install virtual:* -s
testsuccessequal 'Reading package lists...
Building dependency tree...
Inst real (2 unstable [amd64])
Inst real:i386 (2 unstable [i386])
Conf real (2 unstable [amd64])
-Conf real:i386 (2 unstable [i386])' aptget install real:* -s -q=0
+Conf real:i386 (2 unstable [i386])' aptget install real:* -s
# ensure that we are not confused by the provides
testsuccessequal 'Reading package lists...
Inst real-provider (2 unstable [amd64])
Inst real-provider:i386 (2 unstable [i386])
Conf real-provider (2 unstable [amd64])
-Conf real-provider:i386 (2 unstable [i386])' aptget install real-provider:* -s -q=0
+Conf real-provider:i386 (2 unstable [i386])' aptget install real-provider:* -s
E: Unable to locate package bad-mitm' aptget install bad-mitm -s
# and verify that its not picked up
-testsuccessequal 'N: Unable to locate package bad-mitm' aptcache policy bad-mitm -q=0
+testsuccessequal 'N: Unable to locate package bad-mitm' aptcache policy bad-mitm
# and that the right one is used
testsuccessequal "good-pkg:
testmarkedauto # old-pkg is manual installed
-CMD='aptget dist-upgrade -y -q=0'
+CMD='aptget dist-upgrade -y'
msgtest 'Test for equality of' "$CMD"
COMPAREFILE="$(mktemp)"
echo 'The following package disappeared from your system as
configarchitecture 'armel'
testfailure aptget install --solver apt awesomecoolstuff:i386 -s
msgtest 'An invalid EDSP file generates a' 'hard error'
-if echo "Request: This is a test\nFoo: bar\n\n" | aptinternalsolver -q=0 > solver.result 2>&1; then
+if echo "Request: This is a test\nFoo: bar\n\n" | aptinternalsolver > solver.result 2>&1; then
cat solver.result
msgfail
else
msgpass
fi
msgtest 'Test direct calling is okay for' 'apt-internal-solver'
-cat "$APT_EDSP_DUMP_FILENAME" | aptinternalsolver -q=0 > solver.result 2>&1 || true
+cat "$APT_EDSP_DUMP_FILENAME" | aptinternalsolver > solver.result 2>&1 || true
if [ "$(tail -n2 solver.result | head -n1 )" = "Message: Done" ]; then
msgpass
else
signreleasefiles 'Joe Sixpack'
find aptarchive/ -name "$DELETEFILE" -delete
- # test signed release file
- msgtest 'apt-get update gets the expected hashsum mismatch'
- aptget update 2>&1 | grep "Hash Sum mismatch" > /dev/null && msgpass || msgfail
- msgtest 'No package from the source available'
- [ "$(aptcache show apt 2>&1)" = "E: No packages found" ] && msgpass || msgfail
+ # test signed release file
+ msgtest 'apt-get update gets the expected hashsum mismatch'
+ testfailure aptget update
+ testsuccess grep "Hash Sum mismatch" rootdir/tmp/testfailure.output
+ msgtest 'No package from the source available'
+ testfailureequal --nomsg 'N: Unable to locate package apt
+E: No packages found' aptcache show apt
msgtest 'No Packages file in /var/lib/apt/lists'
[ "$(ls rootdir/var/lib/apt/lists/*Package* 2>/dev/null | grep -v FAILED 2>/dev/null)" = "" ] && msgpass || msgfail
# now with the unsigned Release file
rm -rf rootdir/var/lib/apt/lists
rm aptarchive/InRelease aptarchive/Release.gpg
- msgtest 'unsigned apt-get update gets the expected hashsum mismatch'
- aptget update --allow-insecure-repositories >output.log 2>&1 || true
- if grep -q "Hash Sum mismatch" output.log; then
- msgpass
- else
- cat output.log
- msgfail
- fi
+ msgtest 'unsigned apt-get update gets the expected hashsum mismatch'
+ testfailure --nomsg aptget update --allow-insecure-repositories
+ testsuccess grep "Hash Sum mismatch" rootdir/tmp/testfailure.output
}
for COMPRESSEDINDEXES in 'false' 'true'; do
Inst bar:i386 (1.0 unstable [i386])
Inst cool-bar (1.0 unstable [amd64])
Conf bar:i386 (1.0 unstable [i386])
-Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider:i386 -s -q=0
+Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider:i386 -s
satisfiable_in_singlearch() {
testsuccessequal 'Reading package lists...
Inst bar (1.0 unstable [amd64])
Inst cool-bar (1.0 unstable [amd64])
Conf bar (1.0 unstable [amd64])
-Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider -s -q=0
+Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider -s
testsuccessequal 'Reading package lists...
Building dependency tree...
Inst bar:i386 (1.0 unstable [i386])
Inst cool-bar-x32 (1.0 unstable [amd64])
Conf bar:i386 (1.0 unstable [i386])
-Conf cool-bar-x32 (1.0 unstable [amd64])' aptget install cool-bar-x32 -s -q=0
+Conf cool-bar-x32 (1.0 unstable [amd64])' aptget install cool-bar-x32 -s
testsuccessequal 'Reading package lists...
Building dependency tree...
Inst bar (1.0 unstable [amd64])
Inst cool-bar-x64 (1.0 unstable [amd64])
Conf bar (1.0 unstable [amd64])
-Conf cool-bar-x64 (1.0 unstable [amd64])' aptget install cool-bar-x64 -s -q=0
+Conf cool-bar-x64 (1.0 unstable [amd64])' aptget install cool-bar-x64 -s
satisfiable_in_singlearch
Conf libfoo1 (1 unstable [i386])
Conf foo (1 unstable [i386])' aptget install foo -s
-testsuccessequal 'Reading package lists...
+testsuccessequal "Reading package lists...
Building dependency tree...
+Selected version '2' (experimental [i386]) for 'foo'
+Selected version '2' (experimental [i386]) for 'libfoo1' because of 'foo'
The following additional packages will be installed:
libfoo1
The following packages will be REMOVED:
Inst libfoo1 (2 experimental [i386])
Inst foo (2 experimental [i386])
Conf libfoo1 (2 experimental [i386])
-Conf foo (2 experimental [i386])' aptget install foo/experimental -s
+Conf foo (2 experimental [i386])" aptget install foo/experimental -s
testsuccessequal 'Reading package lists...
Building dependency tree...
}
testcandidate rapt '0.8.15'
-testsuccessequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0
+testsuccessequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist
testsuccessequal 'Reading package lists...
Building dependency tree...
Calculating upgrade...
Pin-Priority: -1' > rootdir/etc/apt/preferences
testcandidate rapt '(none)'
-testsuccessequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0
+testsuccessequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist
testsuccessequal 'Reading package lists...
Building dependency tree...
Calculating upgrade...
Pin-Priority: 1000' >> rootdir/etc/apt/preferences
testcandidate rapt '(none)'
-testsuccessequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0
+testsuccessequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist
testsuccessequal 'Reading package lists...
Building dependency tree...
phonon-backend-xine (4.6.0really4.4.2-1+sid)
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
After this operation, 258 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok --trivial-only -V -q=0
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok --trivial-only -V
testfailureequal "Reading package lists...
Building dependency tree...
phonon-backend-xine (4.6.0+exp)
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
After this operation, 258 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok -t experimental --trivial-only -V -q=0
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok -t experimental --trivial-only -V
testfailureequal "Reading package lists...
Building dependency tree...
phonon-backend-xine (4.6.0really4.4.2-1+sid)
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
After this operation, 258 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok/experimental --trivial-only -V -q=0
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok/experimental --trivial-only -V
testfailureequal "Reading package lists...
Building dependency tree...
phonon-backend-null (4.20.0+sid)
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
After this operation, 258 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok-null/experimental --trivial-only -V -q=0
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok-null/experimental --trivial-only -V
# do not select the same version multiple times
testfailureequal "Reading package lists...
phonon-backend-xine (4.6.0really4.4.2-1+sid)
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
After this operation, 301 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok/experimental amarok-null/experimental --trivial-only -V -q=0
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok/experimental amarok-null/experimental --trivial-only -V
# … but thighten the version if needed
# in theory, the second line is wrong, but printing the right version is too much of a hassle
phonon-backend-xine (4.6.0+exp)
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
After this operation, 301 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok-less/experimental2 amarok-higher/experimental --trivial-only -V -q=0
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok-less/experimental2 amarok-higher/experimental --trivial-only -V
# phonon-backend-null can't be used directly, but as it provides it is still fine…
testfailureequal "Reading package lists...
phonon-backend-null (4.20.0+sid)
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
After this operation, 258 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok-null2/experimental --trivial-only -V -q=0
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok-null2/experimental --trivial-only -V
# if an or-group satisfier is already found, do not set others
testfailureequal "Reading package lists...
phonon-backend-xine (4.6.0+exp)
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
After this operation, 258 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok-xine/experimental --trivial-only -V -q=0
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok-xine/experimental --trivial-only -V
# … but proceed testing if the first doesn't work out
testfailureequal "Reading package lists...
phonon-backend-null (4.20.0+exp)
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
After this operation, 258 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok-xine2/experimental --trivial-only -V -q=0
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok-xine2/experimental --trivial-only -V
# sometimes, the second level need to be corrected, too
testfailureequal "Reading package lists...
phonon-backend-xine3 (4.6.0+exp)
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
After this operation, 301 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok-xine3/experimental --trivial-only -V -q=0
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok-xine3/experimental --trivial-only -V
# … but proceed testing if the first doesn't work out even in second deep
testfailureequal "Reading package lists...
phonon-backend-null (4.20.0+exp)
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
After this operation, 258 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok-xine4/experimental --trivial-only -V -q=0
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok-xine4/experimental --trivial-only -V
# providers can be broken, too
testfailureequal "Reading package lists...
phonon-backend-null (4.20.0+exp)
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
After this operation, 258 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok-broken/experimental --trivial-only -V -q=0
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok-broken/experimental --trivial-only -V
# switch the candidate for recommends too if they should be installed
testfailureequal "Reading package lists...
phonon-backend-xine (4.6.0really4.4.2-1+sid)
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
After this operation, 258 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok-recommends/experimental --trivial-only -V -q=0 -o APT::Install-Recommends=1
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok-recommends/experimental --trivial-only -V -o APT::Install-Recommends=1
# … or not if not
testfailureequal "Reading package lists...
amarok-recommends (2.3.2-2+exp)
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
After this operation, 86.0 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok-recommends/experimental --trivial-only -V -q=0 -o APT::Install-Recommends=0
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok-recommends/experimental --trivial-only -V -o APT::Install-Recommends=0
# but broken recommends are not the end of the world
# FIXME: the version output for recommend packages is a bit strange… but what would be better?
phonon-backend-xine (4.6.0really4.4.2-1+sid)
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
After this operation, 215 kB of additional disk space will be used.
-E: Trivial Only specified but this is not a trivial operation." aptget install amarok-recommends2/experimental --trivial-only -V -q=0 -o APT::Install-Recommends=1
+E: Trivial Only specified but this is not a trivial operation." aptget install amarok-recommends2/experimental --trivial-only -V -o APT::Install-Recommends=1
# if one depends doesn't work, we don't need to look deeper…
testfailureequal "Reading package lists...
The following packages have unmet dependencies:
uninstallablepkg : Depends: libmtp8 (>= 10:0.20.1) but it is not going to be installed
Depends: amarok-utils (= 2.3.2-2+exp) but 2.3.1-1+sid is to be installed
-E: Unable to correct problems, you have held broken packages." aptget install uninstallablepkg/experimental --trivial-only -V -q=0
+E: Unable to correct problems, you have held broken packages." aptget install uninstallablepkg/experimental --trivial-only -V