summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-apt-cache34
-rwxr-xr-xtest/integration/test-apt-get-install-virtual-pkgs64
-rwxr-xr-xtest/integration/test-bug-683786-build-dep-on-virtual-packages2
-rwxr-xr-xtest/integration/test-bug-758153-versioned-provides-support2
-rwxr-xr-xtest/integration/test-cachecontainer-architecture-specification6
-rwxr-xr-xtest/integration/test-external-dependency-solver-protocol2
-rwxr-xr-xtest/integration/test-multiarch-allowed31
-rwxr-xr-xtest/integration/test-multiarch-foreign38
-rwxr-xr-xtest/integration/test-specific-architecture-dependencies2
9 files changed, 126 insertions, 55 deletions
diff --git a/test/integration/test-apt-cache b/test/integration/test-apt-cache
index 97d180a74..7927686fc 100755
--- a/test/integration/test-apt-cache
+++ b/test/integration/test-apt-cache
@@ -120,12 +120,9 @@ bar
Depends: bar
Breaks: foo
Replaces: foo
- Breaks: <foo:i386>
- Replaces: <foo:i386>
<foobar>
<cool>
-<cooler>
-<foo:i386>' aptcache depends foo --recurse --implicit
+<cooler>' aptcache depends foo --recurse --implicit
testsuccessequal 'foo
Depends: bar
bar
@@ -135,9 +132,7 @@ testsuccessequal 'foo
Depends: bar
bar
Depends: bar
- Replaces: foo
- Replaces: <foo:i386>
-<foo:i386>' aptcache depends foo --recurse --important --replaces --implicit
+ Replaces: foo' aptcache depends foo --recurse --important --replaces --implicit
testsuccessequal 'bar
Depends: bar
Breaks: foo
@@ -145,38 +140,37 @@ testsuccessequal 'bar
testsuccessequal 'bar
Depends: bar
Breaks: foo
- Replaces: foo
- Breaks: <foo:i386>
- Replaces: <foo:i386>' aptcache depends bar --implicit
+ Replaces: foo' aptcache depends bar --implicit
+
testsuccessequal 'specific
Depends: <bar:i386>
- Depends: specific:amd64
- Breaks: foo:amd64
+ Depends: <specific:amd64>
+ specific
+ Breaks: <foo:amd64>
Replaces: <foo:i386>' aptcache depends specific
testsuccessequal 'specific
Depends: <bar:i386>
- Depends: specific:amd64
- Breaks: foo:amd64
+ Depends: <specific:amd64>
+ specific
+ Breaks: <foo:amd64>
Replaces: <foo:i386>' aptcache depends specific --implicit
-## rdpends
+## rdepends
+# Note that specific does not appear in this list as it doesn't depend on foo,
+# but on an arch-specific foo!
testsuccessequal 'foo
Reverse Depends:
bar
- specific
bar' aptcache rdepends foo
testsuccessequal 'foo
Reverse Depends:
Breaks: bar
- Breaks: specific
Replaces: bar' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1
testsuccessequal 'foo
Reverse Depends:
Breaks: bar (<< 1)
- Breaks: specific (<< 1)
Replaces: bar (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1
testsuccessequal 'foo
Reverse Depends:
- Breaks: bar (<< 1)
- Breaks: specific (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1 --important --breaks
+ Breaks: bar (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1 --important --breaks
diff --git a/test/integration/test-apt-get-install-virtual-pkgs b/test/integration/test-apt-get-install-virtual-pkgs
new file mode 100755
index 000000000..ca3790f46
--- /dev/null
+++ b/test/integration/test-apt-get-install-virtual-pkgs
@@ -0,0 +1,64 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'i386'
+
+insertpackage 'unstable' 'foo' 'amd64' '1' 'Provides: foo-prv'
+
+insertpackage 'unstable' 'baz1' 'amd64' '1' 'Provides: foo-prv1'
+insertpackage 'unstable' 'foo1' 'amd64' '1' 'Provides: foo-prv1'
+
+insertpackage 'unstable' 'baz2' 'amd64' '1' 'Provides: foo-prv2'
+insertpackage 'unstable' 'foo2' 'amd64' '2' 'Provides: foo-prv2:amd64'
+
+insertpackage 'unstable' 'baz3' 'amd64' '1' 'Provides: foo-prv3'
+insertpackage 'unstable' 'foo3' 'i386' '2' 'Provides: foo-prv3:amd64'
+
+insertpackage 'unstable' 'baz4' 'amd64' '1' 'Provides: foo-prv4:amd64'
+insertpackage 'unstable' 'foo4' 'i386' '2' 'Provides: foo-prv4:amd64'
+
+insertpackage 'experimental' 'baz5' 'amd64' '1' 'Provides: foo-prv5:amd64'
+insertpackage 'experimental' 'foo5' 'i386' '2' 'Provides: foo-prv5:amd64'
+
+setupaptarchive
+
+testsuccessequal "Reading package lists...
+Building dependency tree...
+Note, selecting 'foo' instead of 'foo-prv'
+The following NEW packages will be installed:
+ 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
+
+testvirtuals() {
+ testfailureequal "Reading package lists...
+Building dependency tree...
+Package $1 is a virtual package provided by:
+ $3
+ $2
+You should explicitly select one to install.
+
+E: Package '$1' has no installation candidate" aptget install $1 -s -q=0
+}
+
+testvirtuals 'foo-prv1' 'baz1 1' 'foo1 1'
+testvirtuals 'foo-prv2' 'baz2 1' 'foo2 2'
+testvirtuals 'foo-prv3' 'baz3 1' 'foo3:i386 2'
+testvirtuals 'foo-prv4' 'baz4 1' 'foo4:i386 2'
+testvirtuals 'foo-prv5' 'baz5 1' 'foo5:i386 2'
+
+echo 'Package: *
+Pin: release a=experimental
+Pin-Priority: -1' > rootdir/etc/apt/preferences.d/experimental.pref
+
+testfailureequal "Reading package lists...
+Building dependency tree...
+Package foo-prv5 is a virtual package provided by:
+ 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
diff --git a/test/integration/test-bug-683786-build-dep-on-virtual-packages b/test/integration/test-bug-683786-build-dep-on-virtual-packages
index 13a0ef0c8..4a7c516d4 100755
--- a/test/integration/test-bug-683786-build-dep-on-virtual-packages
+++ b/test/integration/test-bug-683786-build-dep-on-virtual-packages
@@ -31,7 +31,7 @@ Reverse Depends:
Dependencies:
Provides:
Reverse Provides: ' aptcache showpkg po-debconf:armel
-testsuccessequal 'N: Unable to locate package texi2html' aptcache showpkg texi2html:armel -q=0
+testsuccessequal 'N: Unable to locate package texi2html:armel' aptcache showpkg texi2html:armel -q=0
testsuccessequal 'Reading package lists...
Building dependency tree...
diff --git a/test/integration/test-bug-758153-versioned-provides-support b/test/integration/test-bug-758153-versioned-provides-support
index 6d43d9943..0be7ced8c 100755
--- a/test/integration/test-bug-758153-versioned-provides-support
+++ b/test/integration/test-bug-758153-versioned-provides-support
@@ -214,7 +214,7 @@ or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
- baz-broken:i386 : Depends: bar but it is not installable
+ baz-broken:i386 : Depends: bar:amd64 but it is not installable
E: Unable to correct problems, you have held broken packages.' aptget install baz-broken -s
testsuccessequal 'Reading package lists...
diff --git a/test/integration/test-cachecontainer-architecture-specification b/test/integration/test-cachecontainer-architecture-specification
index e5625e811..617379a79 100755
--- a/test/integration/test-cachecontainer-architecture-specification
+++ b/test/integration/test-cachecontainer-architecture-specification
@@ -28,7 +28,7 @@ Inst libsame:armel (1 unstable [armel])
Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:armel
testfailureequal 'Reading package lists...
Building dependency tree...
-E: Unable to locate package libsame' aptget -s install libsame:armhf
+E: Unable to locate package libsame:armhf' aptget -s install libsame:armhf
testsuccessequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
@@ -88,11 +88,11 @@ Conf libsame (1 unstable [amd64])
Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:linux-*
testfailureequal 'Reading package lists...
Building dependency tree...
-E: Unable to locate package libsame' aptget -s install libsame:windows-any
+E: Unable to locate package libsame:windows-any' aptget -s install libsame:windows-any
testfailureequal 'Reading package lists...
Building dependency tree...
-E: Unable to locate package foo' aptget -s install foo:armel
+E: Unable to locate package foo:armel' aptget -s install foo:armel
testsuccessequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol
index 3b9b38c39..15944da9d 100755
--- a/test/integration/test-external-dependency-solver-protocol
+++ b/test/integration/test-external-dependency-solver-protocol
@@ -61,6 +61,8 @@ testsuccess aptget install --solver apt awesomecoolstuff:i386 -s
rm -f /tmp/dump.edsp
testfailure aptget install --solver dump awesomecoolstuff:i386 -s
testsuccess test -s /tmp/dump.edsp
+testequal 'Install: awesomecoolstuff:i386' grep :i386 /tmp/dump.edsp
+testempty grep :amd64 /tmp/dump.edsp
testsuccess aptget dist-upgrade -s
testsuccess aptget dist-upgrade -s --solver apt
diff --git a/test/integration/test-multiarch-allowed b/test/integration/test-multiarch-allowed
index 5a8b5eb7d..ecdf39a86 100755
--- a/test/integration/test-multiarch-allowed
+++ b/test/integration/test-multiarch-allowed
@@ -12,7 +12,7 @@ insertpackage 'unstable' 'needsfooany' 'amd64,i386' '1' 'Depends: foo:any'
insertpackage 'unstable' 'needsfoover1' 'amd64,i386' '1' 'Depends: foo:any (>= 1)'
insertpackage 'unstable' 'needsfoover2' 'amd64,i386' '1' 'Depends: foo:any (>= 2)'
insertpackage 'unstable' 'hatesfoo' 'amd64' '1' 'Conflicts: foo'
-insertpackage 'unstable' 'hatesfooany' 'amd64' '1' 'Conflicts: foo:any' # this makes no sense…
+insertpackage 'unstable' 'hatesfooany' 'amd64' '1' 'Conflicts: foo:any' # this makes no sense…?
insertpackage 'unstable' 'hatesfoonative' 'amd64' '1' 'Conflicts: foo:amd64'
insertpackage 'unstable' 'coolfoo' 'amd64' '1' 'Multi-Arch:allowed
@@ -21,10 +21,10 @@ insertpackage 'unstable' 'coolfoover' 'amd64' '1' 'Multi-Arch:allowed
Provides: coolbar (= 2)'
insertpackage 'unstable' 'needscoolfoo' 'amd64' '1' 'Depends: coolfoo, coolbar'
insertpackage 'unstable' 'needscoolfooany' 'amd64' '1' 'Depends: coolfoo:any, coolbar:any'
-insertpackage 'unstable' 'needscoolfoover0' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar'
-insertpackage 'unstable' 'needscoolfoover1' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar (>= 1)'
-insertpackage 'unstable' 'needscoolfoover2' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar (>= 1)'
-insertpackage 'unstable' 'needscoolfoover3' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar (>= 3)'
+insertpackage 'unstable' 'needscoolfoover0' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar:any'
+insertpackage 'unstable' 'needscoolfoover1' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar:any (>= 1)'
+insertpackage 'unstable' 'needscoolfoover2' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar:any (>= 1)'
+insertpackage 'unstable' 'needscoolfoover3' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar:any (>= 3)'
setupaptarchive
@@ -142,7 +142,7 @@ E: Unable to correct problems, you have held broken packages." aptget install fo
testfailuremsg 'E: Unable to correct problems, you have held broken packages.' aptget install foo hatesfooany -s
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
- hatesfoonative : Conflicts: foo but 1 is to be installed
+ hatesfoonative : Conflicts: foo:amd64
E: Unable to correct problems, you have held broken packages." aptget install foo hatesfoonative -s
}
solveableinsinglearch2
@@ -189,10 +189,17 @@ Inst needscoolfoo (1 unstable [amd64])
Conf coolfoo (1 unstable [amd64])
Conf coolfoover (1 unstable [amd64])
Conf needscoolfoo (1 unstable [amd64])" aptget install needscoolfoo coolfoover -s
- testfailureequal "$BADPREFIX
-The following packages have unmet dependencies:
- needscoolfooany : Depends: coolbar:any but it is not installable
-E: Unable to correct problems, you have held broken packages." aptget install needscoolfooany -s
+ testsuccessequal "Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ coolfoo
+The following NEW packages will be installed:
+ coolfoo needscoolfooany
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst coolfoo (1 unstable [amd64])
+Inst needscoolfooany (1 unstable [amd64])
+Conf coolfoo (1 unstable [amd64])
+Conf needscoolfooany (1 unstable [amd64])" aptget install needscoolfooany -s
testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
@@ -224,7 +231,7 @@ E: Unable to correct problems, you have held broken packages." aptget install ne
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
needscoolfoover3 : Depends: coolfoo:any (>= 2)
- Depends: coolbar (>= 3)
+ Depends: coolbar:any (>= 3)
E: Unable to correct problems, you have held broken packages." aptget install needscoolfoover3 -s
}
solveableinsinglearch3
@@ -235,7 +242,7 @@ configarchitecture 'amd64'
solveableinsinglearch0
testfailureequal 'Reading package lists...
Building dependency tree...
-E: Unable to locate package needsfoo' aptget install needsfoo:i386 -s
+E: Unable to locate package needsfoo:i386' aptget install needsfoo:i386 -s
solveableinsinglearch1 'needsfooany'
solveableinsinglearch1 'needsfoover1'
diff --git a/test/integration/test-multiarch-foreign b/test/integration/test-multiarch-foreign
index 854f441fb..8c09a7fde 100755
--- a/test/integration/test-multiarch-foreign
+++ b/test/integration/test-multiarch-foreign
@@ -186,39 +186,43 @@ The following packages have unmet dependencies:
E: Unable to correct problems, you have held broken packages." aptget install $1 hates-foo -s
testfailureequal "$BADPREFIX
The following packages have unmet dependencies:
- hates-foo-x64 : Conflicts: foo
-E: Unable to correct problems, you have held broken packages." aptget install $1 hates-foo-x64 -s
- testfailureequal "$BADPREFIX
-The following packages have unmet dependencies:
- hates-foo-x32 : Conflicts: foo:i386
-E: Unable to correct problems, you have held broken packages." aptget install $1 hates-foo-x32 -s
+ $2 : Conflicts: foo:$4
+E: Unable to correct problems, you have held broken packages." aptget install $1 $2 -s
+ testsuccessequal "Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ $1 $3
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst $1 (1.0 unstable [$4])
+Inst $3 (1.0 unstable [amd64])
+Conf $1 (1.0 unstable [$4])
+Conf $3 (1.0 unstable [amd64])" aptget install $1 $3 -s
}
-hatersgonnahate 'foo'
-hatersgonnahate 'foo:i386'
+hatersgonnahate 'foo' 'hates-foo-x64' 'hates-foo-x32' 'amd64'
+hatersgonnahate 'foo:i386' 'hates-foo-x32' 'hates-foo-x64' 'i386'
-#FIXME: do not work in single-arch as i386 isn't known at cache generation time
testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
- foo
+ foo:i386
The following NEW packages will be installed:
- cool-foo-x32 foo
+ cool-foo-x32 foo:i386
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
-Inst foo (1.0 unstable [amd64])
+Inst foo:i386 (1.0 unstable [i386])
Inst cool-foo-x32 (1.0 unstable [amd64])
-Conf foo (1.0 unstable [amd64])
+Conf foo:i386 (1.0 unstable [i386])
Conf cool-foo-x32 (1.0 unstable [amd64])' aptget install cool-foo-x32 -s
testsuccessequal 'Reading package lists...
Building dependency tree...
The following additional packages will be installed:
- bar
+ bar:i386
The following NEW packages will be installed:
- bar cool-bar-x32
+ bar:i386 cool-bar-x32
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
-Inst bar (1.0 unstable [amd64])
+Inst bar:i386 (1.0 unstable [i386])
Inst cool-bar-x32 (1.0 unstable [amd64])
-Conf bar (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
testsuccessequal 'Reading package lists...
diff --git a/test/integration/test-specific-architecture-dependencies b/test/integration/test-specific-architecture-dependencies
index f6635a4d6..b5fcdd6ac 100755
--- a/test/integration/test-specific-architecture-dependencies
+++ b/test/integration/test-specific-architecture-dependencies
@@ -279,7 +279,7 @@ Conf depender-x64 (1 unstable [amd64])' aptget install depender-x64 -s
testequal 'Reading package lists...
Building dependency tree...
-E: Unable to locate package depender-x64' aptget install depender-x64:i386 -s
+E: Unable to locate package depender-x64:i386' aptget install depender-x64:i386 -s
testequal 'Reading package lists...
Building dependency tree...