From dae197476f1831269d13f4e990276ce25c483842 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 14 May 2016 23:52:47 +0200 Subject: eipp: output at most two versions per package We can trim generation time and size of the EIPP scenario considerable if we we avoid telling the planers about "uninteresting" packages. This is one of the simpler but already very effective reductions: Do not tell planers about versions which are neither installed nor are to be installed as they have no effect on the plan we don't need to tell the planer about them. EDSP solvers need to know about all versions for better choice and error messages, but planers really don't. Git-Dch: Ignore --- .../test-external-installation-planer-protocol | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 test/integration/test-external-installation-planer-protocol (limited to 'test') diff --git a/test/integration/test-external-installation-planer-protocol b/test/integration/test-external-installation-planer-protocol new file mode 100755 index 000000000..db43675e1 --- /dev/null +++ b/test/integration/test-external-installation-planer-protocol @@ -0,0 +1,28 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" +setupenvironment +configarchitecture 'amd64' + +buildsimplenativepackage 'libfoo' 'amd64' '3' 'experimental' 'Multi-Arch: same' +buildsimplenativepackage 'foo' 'all' '3' 'experimental' 'Depends: newstuff' +buildsimplenativepackage 'foo' 'all' '2' 'unstable' 'Depends: libfoo:amd64, stuff +Conflicts: bar, libfoo:i386 +Recommends: unrelated' +buildsimplenativepackage 'libfoo' 'amd64' '2' 'unstable' 'Multi-Arch: same' +buildsimplenativepackage 'unrelated-2' 'amd64' '2' 'unstable' +insertinstalledpackage 'foo' 'all' '1' +insertinstalledpackage 'bar' 'all' '1' +insertinstalledpackage 'stuff' 'all' '1' +insertinstalledpackage 'unrelated-1' 'all' '1' + +setupaptarchive --no-update + +testsuccess apt update +export APT_EDSP_DUMP_FILENAME="${TMPWORKINGDIRECTORY}/eipp.dump" +testfailure aptget install foo --planer dump -y +testfailure grep 'unrelated-2' "$APT_EDSP_DUMP_FILENAME" +testsuccessequal '2' grep -c '^Package: foo$' "$APT_EDSP_DUMP_FILENAME" +testsuccessequal '1' grep -c '^Package: libfoo$' "$APT_EDSP_DUMP_FILENAME" -- cgit v1.2.3