diff options
4 files changed, 67 insertions, 0 deletions
diff --git a/t/data/SPECS/epochless-conflict-with-promotion/a1.spec b/t/data/SPECS/epochless-conflict-with-promotion/a1.spec new file mode 100644 index 00000000..f75c94d2 --- /dev/null +++ b/t/data/SPECS/epochless-conflict-with-promotion/a1.spec @@ -0,0 +1,13 @@ +Summary: x +Name: a +Version: 1 +Release: 1 +License: x +Group: x +Url: x +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/epochless-conflict-with-promotion/a2.spec b/t/data/SPECS/epochless-conflict-with-promotion/a2.spec new file mode 100644 index 00000000..b0345103 --- /dev/null +++ b/t/data/SPECS/epochless-conflict-with-promotion/a2.spec @@ -0,0 +1,14 @@ +Summary: x +Name: a +Epoch: 1 +Version: 2 +Release: 1 +License: x +Group: x +Url: x +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/epochless-conflict-with-promotion/b.spec b/t/data/SPECS/epochless-conflict-with-promotion/b.spec new file mode 100644 index 00000000..2c10cfaa --- /dev/null +++ b/t/data/SPECS/epochless-conflict-with-promotion/b.spec @@ -0,0 +1,14 @@ +Summary: x +Name: b +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Conflicts: a <= 2 +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/superuser--epochless-conflict-with-promotion.t b/t/superuser--epochless-conflict-with-promotion.t new file mode 100644 index 00000000..17f6b720 --- /dev/null +++ b/t/superuser--epochless-conflict-with-promotion.t @@ -0,0 +1,26 @@ +#!/usr/bin/perl + +# a-1 does not have epoch +# a-2 has epoch 1 +# +# b conflicts with a <= 2 +# +# RPM does not consider this a conflict with a-2, so urpmi should promote it. +# +use strict; +use lib '.', 't'; +use helper; +use urpm::util; +use Test::More 'no_plan'; + +need_root_and_prepare(); + +my $name = 'epochless-conflict-with-promotion'; +urpmi_addmedia("$name $::pwd/media/$name"); + +urpmi('a-1'); +check_installed_fullnames('a-1-1'); + +# urpmi('--auto b'); +# check_installed_and_remove('a', 'b'); +# ERROR: urpmi considers the conflict to match a-2 as well and just removes a |