From ecc138f858fab61e0b888d3d13854d1422c3432b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 16 Jul 2015 19:41:45 +0200 Subject: just-in-time creation for (implicit) Provides Expecting the worst is easy to code, but has its disadvantages e.g. by creating package structures which otherwise would have never existed. By creating the provides instead at the time a package structure is added we are well prepared for the introduction of partial architectures, massive amounts of M-A:foreign (and :allowed) and co as far as provides are concerned at least. We have something relatively similar for dependencies already. Many tests are added for both M-A states and the code cleaned to properly support implicit provides for foreign architectures and architectures we 'just' happen to parse. Git-Dch: Ignore --- test/integration/test-multiarch-foreign | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'test/integration/test-multiarch-foreign') diff --git a/test/integration/test-multiarch-foreign b/test/integration/test-multiarch-foreign index 7870126f5..a266e35ed 100755 --- a/test/integration/test-multiarch-foreign +++ b/test/integration/test-multiarch-foreign @@ -9,11 +9,17 @@ configarchitecture 'amd64' 'i386' 'armel' insertpackage 'unstable' 'cool-foo' 'amd64,i386' '1.0' 'Depends: foo' insertpackage 'unstable' 'cool-foo-x64' 'amd64' '1.0' 'Depends: foo:amd64' insertpackage 'unstable' 'cool-foo-x32' 'amd64' '1.0' 'Depends: foo:i386' +insertpackage 'unstable' 'hates-foo' 'amd64,i386' '1.0' 'Conflicts: foo' +insertpackage 'unstable' 'hates-foo-x64' 'amd64' '1.0' 'Conflicts: foo:amd64' +insertpackage 'unstable' 'hates-foo-x32' 'amd64' '1.0' 'Conflicts: foo:i386' insertpackage 'unstable' 'foo' 'amd64,i386,armel' '1.0' 'Multi-Arch: foreign' insertpackage 'unstable' 'cool-bar' 'amd64,i386' '1.0' 'Depends: bar-provider' insertpackage 'unstable' 'cool-bar-x64' 'amd64' '1.0' 'Depends: bar-provider:amd64' insertpackage 'unstable' 'cool-bar-x32' 'amd64' '1.0' 'Depends: bar-provider:i386' +insertpackage 'unstable' 'hates-bar' 'amd64,i386' '1.0' 'Conflicts: bar-provider' +insertpackage 'unstable' 'hates-bar-x64' 'amd64' '1.0' 'Conflicts: bar-provider:amd64' +insertpackage 'unstable' 'hates-bar-x32' 'amd64' '1.0' 'Conflicts: bar-provider:i386' insertpackage 'unstable' 'bar' 'amd64,i386,armel' '1.0' 'Provides: bar-provider Multi-Arch: foreign' @@ -163,6 +169,33 @@ Conf foo (1.0 unstable [amd64]) Conf cool-foo-x64 (1.0 unstable [amd64])' aptget install cool-foo-x64 -s } +hatersgonnahate() { + BADPREFIX='Reading package lists... +Building dependency tree... +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: +' + testfailureequal "$BADPREFIX +The following packages have unmet dependencies: + hates-foo : Conflicts: foo + Conflicts: foo:i386 + Conflicts: foo:armel +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 +} +hatersgonnahate 'foo' +hatersgonnahate 'foo:i386' + #FIXME: do not work in single-arch as i386 isn't known at cache generation time testsuccessequal 'Reading package lists... Building dependency tree... -- cgit v1.2.3 From e7ebb41440cbe298b07c7fb7c6b20a64a17200f0 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 17 Aug 2015 18:37:09 +0200 Subject: Fix the test suite again Gbp-Dch: ignore --- test/integration/test-multiarch-foreign | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/integration/test-multiarch-foreign') diff --git a/test/integration/test-multiarch-foreign b/test/integration/test-multiarch-foreign index a266e35ed..58e5b462a 100755 --- a/test/integration/test-multiarch-foreign +++ b/test/integration/test-multiarch-foreign @@ -27,7 +27,7 @@ setupaptarchive testsuccessequal 'Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: foo The following NEW packages will be installed: cool-foo:i386 foo @@ -59,7 +59,7 @@ Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:armel -s testsuccessequal 'Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: bar The following NEW packages will be installed: bar cool-bar:i386 @@ -103,7 +103,7 @@ Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider:i386 satisfiable_in_singlearch() { testsuccessequal 'Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: foo The following NEW packages will be installed: cool-foo foo @@ -125,7 +125,7 @@ Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:amd64 -s testsuccessequal 'Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: bar The following NEW packages will be installed: bar cool-bar @@ -158,7 +158,7 @@ Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider -s -q testsuccessequal 'Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: foo The following NEW packages will be installed: cool-foo-x64 foo @@ -199,7 +199,7 @@ hatersgonnahate 'foo: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 extra packages will be installed: +The following additional packages will be installed: foo The following NEW packages will be installed: cool-foo-x32 foo @@ -211,7 +211,7 @@ Conf cool-foo-x32 (1.0 unstable [amd64])' aptget install cool-foo-x32 -s testsuccessequal 'Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: bar The following NEW packages will be installed: bar cool-bar-x32 @@ -223,7 +223,7 @@ Conf cool-bar-x32 (1.0 unstable [amd64])' aptget install cool-bar-x32 -s -q=0 testsuccessequal 'Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: bar The following NEW packages will be installed: bar cool-bar-x64 -- cgit v1.2.3