summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-12-01 14:09:23 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2015-12-01 14:26:05 +0100
commitf359b7e8c03884cd9f097d4b3ff8b8b8be8053ba (patch)
treed51eb4a58ad3223325551b84b88e3e16779f7dba /test
parent7d19ee92f2368a40e739cb27d22d6d28f37ebf45 (diff)
downloadapt-f359b7e8c03884cd9f097d4b3ff8b8b8be8053ba.tar.gz
require explicit paths to dsc/control as we do for deb files
Otherwise a user is subject to unexpected content-injection depending on which directory she happens to start apt in. This also cleans up the code requiring less implementation details in build-dep which is always good. Technically, this is an ABI break as we override virtual methods, but that they weren't overridden was a mistake resulting in pure classes, which shouldn't be pure, so they were unusable – and as they are new in 1.1 nobody is using them yet (and hopefully ever as they are borderline implementation details). Closes: 806693
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-get-build-dep15
-rwxr-xr-xtest/integration/test-apt-get-install-deb1
2 files changed, 13 insertions, 3 deletions
diff --git a/test/integration/test-apt-get-build-dep b/test/integration/test-apt-get-build-dep
index 6df49d782..a8e6f6843 100755
--- a/test/integration/test-apt-get-build-dep
+++ b/test/integration/test-apt-get-build-dep
@@ -39,7 +39,7 @@ EOF
test2vcardbuilddep() {
testsuccessequal "Reading package lists...
Building dependency tree...
-Note, using file '2vcard_0.5-3.dsc' to get the build dependencies
+Note, using file './2vcard_0.5-3.dsc' to get the build dependencies
The following packages will be REMOVED:
build-conflict
The following NEW packages will be installed:
@@ -49,7 +49,12 @@ Remv build-conflict [1]
Inst build-essential (1 stable [i386])
Inst debhelper (7 stable [i386])
Conf build-essential (1 stable [i386])
-Conf debhelper (7 stable [i386])" aptget build-dep -s 2vcard_0.5-3.dsc
+Conf debhelper (7 stable [i386])" aptget build-dep -s ./2vcard_0.5-3.dsc
+testfailure aptget build-dep --simulate 2vcard_0.5-3.dsc
+cd downloaded
+testsuccess aptget build-dep --simulate ../2vcard_0.5-3.dsc
+testsuccess aptget build-dep --simulate "$(readlink -f ../2vcard_0.5-3.dsc)"
+cd ..
}
test2vcardbuilddep
@@ -129,7 +134,11 @@ Inst build-essential (1 stable [i386])
Inst debhelper (7 stable [i386])
Conf build-essential (1 stable [i386])
Conf debhelper (7 stable [i386])" aptget build-dep --simulate ./foo-1.0
-
+testfailure aptget build-dep --simulate foo-1.0
+cd downloaded
+testsuccess aptget build-dep --simulate ../foo-1.0
+testsuccess aptget build-dep --simulate "$(readlink -f ../foo-1.0)"
+cd ..
testfailureequal 'Reading package lists...
Building dependency tree...
diff --git a/test/integration/test-apt-get-install-deb b/test/integration/test-apt-get-install-deb
index 4daac881f..a3600b54b 100755
--- a/test/integration/test-apt-get-install-deb
+++ b/test/integration/test-apt-get-install-deb
@@ -43,6 +43,7 @@ E: Unable to correct problems, you have held broken packages." aptget install ./
testdpkgnotinstalled 'foo' 'foo:i386'
testsuccess aptget install ./incoming/foo_1.0_i386.deb -o Debug::pkgCacheGen=1
testdpkginstalled 'foo:i386'
+testfailure aptget install incoming/foo_1.0_i386.deb -o Debug::pkgCacheGen=1
cd downloaded
testsuccess aptget install "$(readlink -f ../incoming/foo_1.0_i386.deb)" -o Debug::pkgCacheGen=1 -y --allow-downgrades
testsuccess aptget install ../incoming/foo_1.0_i386.deb -o Debug::pkgCacheGen=1 -y --allow-downgrades