summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c382e0d)
Even if we only configure a single architecture, install dpkg, so
dpkg can assert multi arch correctly. This also has the nice side
effect of making single architecture and multiple architecture
test cases more uniform.
This fixes a regression from
f878d3a862128bc1385616751ae1d78246b1bd01
("test: Assert multi-arch in the chroot").
fi
fi
rm -f rootdir/etc/apt/apt.conf.d/00foreigndpkg
fi
fi
rm -f rootdir/etc/apt/apt.conf.d/00foreigndpkg
- # if multi-arch make sure dpkg can detect itself as capable of it
- if getarchitectures | grep -E -q '[^ ]+ [^ ]+'; then
- if [ "0" = "$(dpkg -l dpkg 2> /dev/null | grep '^i' | wc -l)" ]; then
- # dpkg doesn't really check the version as long as it is fully installed,
- # but just to be sure we choose one above the required version
- insertinstalledpackage 'dpkg' "all" '1.16.2+fake'
- fi
+ # make sure dpkg can detect itself as capable of it
+ if [ "0" = "$(dpkg -l dpkg 2> /dev/null | grep '^i' | wc -l)" ]; then
+ # dpkg doesn't really check the version as long as it is fully installed,
+ # but just to be sure we choose one above the required version
+ insertinstalledpackage 'dpkg' "all" '1.16.2+fake'
fi
if dpkg --assert-multi-arch >/dev/null 2>&1 ; then
local ARCHS="$(getarchitectures)"
fi
if dpkg --assert-multi-arch >/dev/null 2>&1 ; then
local ARCHS="$(getarchitectures)"
testsuccessequal "Listing...
bar/now 1.0 i386 [installed,local]
baz/unstable 2.0 all [upgradable from: 0.1]
testsuccessequal "Listing...
bar/now 1.0 i386 [installed,local]
baz/unstable 2.0 all [upgradable from: 0.1]
+dpkg/now 1.16.2+fake all [installed,local]
foo/unstable 1.0 all
foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list
foo/unstable 1.0 all
foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list
testsuccessequal "Listing...
bar/now 1.0 i386 [installed,local]
baz/now 0.1 all [installed,upgradable to: 2.0]
testsuccessequal "Listing...
bar/now 1.0 i386 [installed,local]
baz/now 0.1 all [installed,upgradable to: 2.0]
+dpkg/now 1.16.2+fake all [installed,local]
foobar/now 1.0 i386 [installed,upgradable to: 2.0]" apt list --installed
testsuccessequal "Listing...
foobar/now 1.0 i386 [installed,upgradable to: 2.0]" apt list --installed
testsuccessequal "Listing...
setupaptarchive
testmarkedauto
setupaptarchive
testmarkedauto
testsuccess aptget install libabc/stable -y
testdpkginstalled 'libabc'
testdpkgnotinstalled 'libdef'
testsuccess aptget install libabc/stable -y
testdpkginstalled 'libabc'
testdpkgnotinstalled 'libdef'
-testmarkedmanual 'libabc'
+testmarkedmanual 'dpkg' 'libabc'
testmarkedauto
testsuccess aptget dist-upgrade -y
testdpkginstalled 'libabc' 'libdef'
testmarkedauto 'libabc'
testmarkedauto
testsuccess aptget dist-upgrade -y
testdpkginstalled 'libabc' 'libdef'
testmarkedauto 'libabc'
-testmarkedmanual 'libdef'
+testmarkedmanual 'dpkg' 'libdef'
assert_repo_is_intact()
{
assert_repo_is_intact()
{
- testsuccessequal "foo/unstable 2.0 all" apt list -qq
+ testsuccessequal "dpkg/now 1.16.2+fake all [installed,local]
+foo/unstable 2.0 all" apt list -qq
testsuccess aptget install -y -s foo
testfailure aptget install -y evil
testsuccess aptget source foo --print-uris
testsuccess aptget install -y -s foo
testfailure aptget install -y evil
testsuccess aptget source foo --print-uris
create_fresh_archive
testsuccess aptget update
listcurrentlistsdirectory > lists.before
create_fresh_archive
testsuccess aptget update
listcurrentlistsdirectory > lists.before
- testsuccessequal 'old/unstable 1.0 all' apt list -qq
+ testsuccessequal 'dpkg/now 1.16.2+fake all [installed,local]
+old/unstable 1.0 all' apt list -qq
}
test_inrelease_to_new_inrelease() {
}
test_inrelease_to_new_inrelease() {
add_new_package '+1hour'
testsuccess aptget update -o Debug::Acquire::Transaction=1
add_new_package '+1hour'
testsuccess aptget update -o Debug::Acquire::Transaction=1
- testsuccessequal 'new/unstable 1.0 all
+ testsuccessequal 'dpkg/now 1.16.2+fake all [installed,local]
+new/unstable 1.0 all
old/unstable 1.0 all' apt list -qq
}
old/unstable 1.0 all' apt list -qq
}
testsuccess aptget update -o Debug::Acquire::gpg=1
unset TMPDIR
testsuccess aptget update -o Debug::Acquire::gpg=1
unset TMPDIR
-testsuccessequal 'coolstuff' aptcache pkgnames
+testsuccessequal 'coolstuff
+dpkg' aptcache pkgnames
testsuccess ls rootdir/var/lib/apt/lists/*InRelease
testsuccess ls rootdir/var/lib/apt/lists/*InRelease
testsuccessequal "Listing...
bar/testing 2 all [upgradable from: 1]
testsuccessequal "Listing...
bar/testing 2 all [upgradable from: 1]
+dpkg/now 1.16.2+fake all [installed,local]
foo/testing,now 1 all [installed]" apt list
foo/testing,now 1 all [installed]" apt list
Install: libfoo:amd64 foo:amd64
Planner: internal' head -n 6 "$EIPPLOG"
aptinternalplanner < "$EIPPLOG" > planner.log || true
Install: libfoo:amd64 foo:amd64
Planner: internal' head -n 6 "$EIPPLOG"
aptinternalplanner < "$EIPPLOG" > planner.log || true
-testsuccessequal 'Remove: 6
+testsuccessequal 'Remove: 7
Unpack: 2
Unpack: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planner.log
Unpack: 2
Unpack: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planner.log