diff options
author | Anssi Hannula <anssi@mandriva.org> | 2008-06-13 15:02:48 +0000 |
---|---|---|
committer | Anssi Hannula <anssi@mandriva.org> | 2008-06-13 15:02:48 +0000 |
commit | 87388f78103860e899d1e3f63998a9c0fa08fc11 (patch) | |
tree | ce23b522ef48959fa8d71b6855be50d9990a9d68 | |
parent | a4dbe5dcee33087d63b6f6fc13752fc8ab788d31 (diff) | |
download | urpmi-87388f78103860e899d1e3f63998a9c0fa08fc11.tar urpmi-87388f78103860e899d1e3f63998a9c0fa08fc11.tar.gz urpmi-87388f78103860e899d1e3f63998a9c0fa08fc11.tar.bz2 urpmi-87388f78103860e899d1e3f63998a9c0fa08fc11.tar.xz urpmi-87388f78103860e899d1e3f63998a9c0fa08fc11.zip |
Add a testcase for urpmi wrongly considering epochless conflicts to match any
epoch in a case when urpmi should upgrade a conflicting package to an actually
non-conflicting version.
Disabled for now until fixed.
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 |