From 77b6f202e1629b7794a03b6522d636ff1436d074 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 10 Jan 2015 12:31:18 +0100 Subject: award points for positive dependencies again Commit 9ec748ff103840c4c65471ca00d3b72984131ce4 from Feb 23 last year adds a version check after 8daf68e366fa9fa2794ae667f51562663856237c added 8 days earlier negative points for breaks/conflicts with the intended that only dependencies which are satisfied propagate points (aka: old conflicts do not). The implementation was needlessly complex and flawed through preventing positive dependencies from gaining points like they did before these commits making library transitions harder instead of simpler. It worked out anyhow most of the time out of pure 'luck' (and other ways of gaining points) or got miss attributed to being a temporary hick-up. Closes: 774924 --- .../test-allow-scores-for-all-dependency-types | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test/integration/test-allow-scores-for-all-dependency-types') diff --git a/test/integration/test-allow-scores-for-all-dependency-types b/test/integration/test-allow-scores-for-all-dependency-types index a5c98f3d6..d60cb8daf 100755 --- a/test/integration/test-allow-scores-for-all-dependency-types +++ b/test/integration/test-allow-scores-for-all-dependency-types @@ -32,6 +32,11 @@ insertpackage 'multipleyes' 'foo' 'amd64' '2.2' 'Conflicts: bar (<= 3)' # having foo multiple times as conflict is a non-advisable hack in general insertpackage 'multipleyes' 'bar' 'amd64' '2.2' 'Conflicts: foo (<= 3), foo (<= 3)' +#774924 - slightly simplified +insertpackage 'jessie' 'login' 'amd64' '2' 'Pre-Depends: libaudit1 (>= 0)' +insertpackage 'jessie' 'libaudit1' 'amd64' '2' 'Depends: libaudit-common (>= 0)' +insertpackage 'jessie' 'libaudit-common' 'amd64' '2' 'Breaks: libaudit0, libaudit1 (<< 2)' + cp rootdir/var/lib/dpkg/status rootdir/var/lib/dpkg/status-backup setupaptarchive @@ -142,3 +147,26 @@ Inst foo [1] (2 versioned [amd64]) Inst baz (2 versioned [amd64]) Conf foo (2 versioned [amd64]) Conf baz (2 versioned [amd64])' aptget install baz -st versioned + +# recreating the exact situation is hard, so we pull tricks to get the score +cp -f rootdir/var/lib/dpkg/status-backup rootdir/var/lib/dpkg/status +insertinstalledpackage 'gdm3' 'amd64' '1' 'Depends: libaudit0, libaudit0' +insertinstalledpackage 'login' 'amd64' '1' 'Essential: yes' +insertinstalledpackage 'libaudit0' 'amd64' '1' +testequal 'Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + gdm3 libaudit0 +The following NEW packages will be installed: + libaudit-common libaudit1 +The following packages will be upgraded: + login +1 upgraded, 2 newly installed, 2 to remove and 0 not upgraded. +Remv gdm3 [1] +Remv libaudit0 [1] +Inst libaudit-common (2 jessie [amd64]) +Conf libaudit-common (2 jessie [amd64]) +Inst libaudit1 (2 jessie [amd64]) +Conf libaudit1 (2 jessie [amd64]) +Inst login [1] (2 jessie [amd64]) +Conf login (2 jessie [amd64])' aptget dist-upgrade -st jessie -- cgit v1.2.3 From 25b86db159fbc3c043628e285c0c1ef24dec2c6e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 10 Mar 2015 00:59:44 +0100 Subject: test exitcode as well as string equality We use test{success,failure} now all over the place in the framework, so its only consequencial to do this in the situations in which we test for a specific output as well. Git-Dch: Ignore --- .../test-allow-scores-for-all-dependency-types | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'test/integration/test-allow-scores-for-all-dependency-types') diff --git a/test/integration/test-allow-scores-for-all-dependency-types b/test/integration/test-allow-scores-for-all-dependency-types index e1d805ce9..56cfc9a69 100755 --- a/test/integration/test-allow-scores-for-all-dependency-types +++ b/test/integration/test-allow-scores-for-all-dependency-types @@ -42,7 +42,7 @@ setupaptarchive insertinstalledpackage 'libdb-dev' 'amd64' '5.1.7' 'Depends: libdb5.1-dev' insertinstalledpackage 'libdb5.1-dev' 'amd64' '5.1.29-7' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be REMOVED: @@ -57,7 +57,7 @@ Inst libdb-dev [5.1.7] (5.3.0 unversioned [amd64]) [] Inst libdb5.3-dev (5.3.28-3 unversioned [amd64]) Conf libdb5.3-dev (5.3.28-3 unversioned [amd64]) Conf libdb-dev (5.3.0 unversioned [amd64])' aptget dist-upgrade -st unversioned -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be REMOVED: @@ -76,25 +76,25 @@ Conf libdb-dev (5.3.0 versioned [amd64])' aptget dist-upgrade -st versioned cp -f rootdir/var/lib/dpkg/status-backup rootdir/var/lib/dpkg/status insertinstalledpackage 'foo' 'amd64' '1' insertinstalledpackage 'bar' 'amd64' '1' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages have been kept back: bar foo 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.' aptget dist-upgrade -st unversioned -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages have been kept back: bar foo 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.' aptget dist-upgrade -st versioned -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages have been kept back: bar foo 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.' aptget dist-upgrade -st multipleno -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be REMOVED: @@ -106,14 +106,14 @@ Remv foo [1] Inst bar [1] (2.2 multipleyes [amd64]) Conf bar (2.2 multipleyes [amd64])' aptget dist-upgrade -st multipleyes -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: baz 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Inst baz (2 unversioned [amd64]) Conf baz (2 unversioned [amd64])' aptget install baz -st unversioned -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo @@ -130,14 +130,14 @@ Inst baz (2 versioned [amd64]) Conf foo (2 versioned [amd64]) Conf baz (2 versioned [amd64])' aptget install baz -st versioned -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: baz 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Inst baz (2 unversioned [amd64]) Conf baz (2 unversioned [amd64])' aptget install baz -st unversioned -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... The following extra packages will be installed: foo @@ -159,7 +159,7 @@ cp -f rootdir/var/lib/dpkg/status-backup rootdir/var/lib/dpkg/status insertinstalledpackage 'gdm3' 'amd64' '1' 'Depends: libaudit0, libaudit0' insertinstalledpackage 'login' 'amd64' '1' 'Essential: yes' insertinstalledpackage 'libaudit0' 'amd64' '1' -testequal 'Reading package lists... +testsuccessequal 'Reading package lists... Building dependency tree... Calculating upgrade... The following packages will be REMOVED: -- cgit v1.2.3