From 57df27397b1a10e50d5876482a30b9dedb2ad219 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 16 May 2020 11:17:21 +0200 Subject: Propagate protected to already satisfied conflicts If we propagate protected e.g. due to a user request we should also act upon (at the moment) satisfied negative dependencies so that the resolver knows that installing this package later is not an option. That the problem resolver is trying bad solutions is a bug by itself which existed before and after and should be worked on. Closes: #960705 --- ...60705-propagate-protected-to-satisfied-conflict | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict (limited to 'test') diff --git a/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict b/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict new file mode 100755 index 000000000..4def47400 --- /dev/null +++ b/test/integration/test-bug-960705-propagate-protected-to-satisfied-conflict @@ -0,0 +1,31 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" +setupenvironment +configarchitecture 'amd64' + +insertpackage 'unstable' 'runit-init' 'all' '1' 'Conflicts: systemd-sysv, sysvinit-core, runit-init' +# note how the rest do not know of runit-init +insertpackage 'unstable' 'sysvinit-core' 'all' '1' 'Conflicts: systemd-sysv, sysvinit-core' +insertpackage 'unstable,installed' 'systemd-sysv' 'all' '1' 'Conflicts: systemd-sysv, sysvinit-core' +insertpackage 'unstable,installed' 'init' 'all' '1' 'Pre-Depends: systemd-sysv | sysvinit-core +Important: yes' + +setupaptarchive + +testsuccessequal "Reading package lists... +Building dependency tree... +The following packages will be REMOVED: + init systemd-sysv +The following NEW packages will be installed: + runit-init +WARNING: The following essential packages will be removed. +This should NOT be done unless you know exactly what you are doing! + init systemd-sysv (due to init) +0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded. +Remv init [1] +Remv systemd-sysv [1] +Inst runit-init (1 unstable [all]) +Conf runit-init (1 unstable [all])" apt install runit-init -s -- cgit v1.2.3