diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-10-23 01:28:05 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-10-23 01:28:05 +0200 |
commit | 03aa08472dcd689572a46ce6efdb1dccf6136334 (patch) | |
tree | 5a2ee0d77bfc4d59ef380c15acdbdbe85aae921f /test/integration/test-sourceslist-trusted-options | |
parent | e845cde33c5d13a0e2dd924a388705a0738d4f96 (diff) |
chown finished partial files earlier
partial files are chowned by the Item baseclass to let the methods work
with them. Now, this baseclass is also responsible for chowning the
files back to root instead of having various deeper levels do this.
The consequence is that all overloaded Failed() methods now call the
Item::Failed base as their first step. The same is done for Done().
The effect is that even in partial files usually don't belong to
_apt anymore, helping sneakernets and reducing possibilities of a bad
method modifying files not belonging to them.
The change is supported by the framework not only supporting being run
as root, but with proper permission management, too, so that privilege
dropping can be tested with them.
Diffstat (limited to 'test/integration/test-sourceslist-trusted-options')
-rwxr-xr-x | test/integration/test-sourceslist-trusted-options | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/integration/test-sourceslist-trusted-options b/test/integration/test-sourceslist-trusted-options index 28415dd62..55d4e0233 100755 --- a/test/integration/test-sourceslist-trusted-options +++ b/test/integration/test-sourceslist-trusted-options @@ -20,6 +20,7 @@ foo/testing 2 amd64 foo/stable 1 amd64 ' apt list foo -a + cd downloaded rm -f foo_1_amd64.deb foo_2_amd64.deb testsuccess aptget download foo "$@" testsuccess test -s foo_1_amd64.deb -o -s foo_2_amd64.deb @@ -27,6 +28,7 @@ foo/stable 1 amd64 rm -f foo_1.dsc foo_2.dsc testsuccess aptget source foo --dsc-only -d "$@" testsuccess test -s foo_1.dsc -o -s foo_2.dsc + cd - >/dev/null } everythingfails() { @@ -39,18 +41,22 @@ foo/stable 1 amd64 foo E: Some packages could not be authenticated' + cd downloaded rm -f foo_1_amd64.deb foo_2_amd64.deb testfailure aptget download foo "$@" - testequal "$WARNING" tail -n 3 rootdir/tmp/testfailure.output + testequal "$WARNING" tail -n 3 ../rootdir/tmp/testfailure.output testfailure test -s foo_1_amd64.deb -o -s foo_2_amd64.deb rm -f foo_1.dsc foo_2.dsc testfailure aptget source foo --dsc-only -d "$@" - testequal "$WARNING" tail -n 3 rootdir/tmp/testfailure.output + testequal "$WARNING" tail -n 3 ../rootdir/tmp/testfailure.output testfailure test -s foo_1.dsc -o -s foo_2.dsc + cd - >/dev/null } cp -a rootdir/etc/apt/sources.list.d/ rootdir/etc/apt/sources.list.d.bak/ +echo 'Debug::Acquire::Transaction "true"; +Debug::pkgAcquire::Worker "true";' > rootdir/etc/apt/apt.conf.d/00debugging aptgetupdate() { rm -rf rootdir/var/lib/apt/lists |