summaryrefslogtreecommitdiffstats
path: root/t/superuser--handle-conflict-deps.t
blob: 998e26ffc26567532232af4734776bf469ab87c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/perl

# b requires b-sub
# a-sup requires a
# a conflicts with b, b conflicts with a
use strict;
use lib '.', 't';
use helper;
use urpm::util;
use Test::More 'no_plan';

need_root_and_prepare();

my $name = 'handle-conflict-deps';
urpmi_addmedia("$name $::pwd/media/$name");    

test_conflict_on_install();
test_conflict_on_upgrade(); #test from bugs #12696, #11885

sub test_conflict_on_upgrade {
    urpmi('--auto a-sup');
    check_installed_names('a', 'a-sup');

    urpmi('--auto b');
    check_installed_and_remove('b', 'b-sub');
}

sub test_conflict_on_install {
    urpmi('--auto a b');
    check_installed_and_remove('b', 'b-sub'); # WARNING: why does it choose one or the other?
}