make conflicts work again
This commit is contained in:
parent
3721b2b00f
commit
9ad7ed6a3e
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
$| = 1;
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
my %dirs;
|
my %dirs;
|
||||||
@ -204,18 +205,14 @@ if (@implicit_conflicts) {
|
|||||||
for my $ff (keys %files) {
|
for my $ff (keys %files) {
|
||||||
my ($n, undef) = split('/', $ff, 2);
|
my ($n, undef) = split('/', $ff, 2);
|
||||||
next unless $baddir{$n};
|
next unless $baddir{$n};
|
||||||
if (!$filesc{$ff}) {
|
for (@{$filesc{$ff} || [ $files{$ff} ]}) {
|
||||||
my ($pkg, undef) = split('/', $files{$ff}, 2);
|
|
||||||
$baddir_pkgs{$baddir{$n}}->{"$pkg/0"} = 1;
|
|
||||||
} else {
|
|
||||||
for (@{$filesc{$ff} || []}) {
|
|
||||||
my ($pkg, undef) = split('/', $_, 2);
|
my ($pkg, undef) = split('/', $_, 2);
|
||||||
$baddir_pkgs{$baddir{$n}}->{"$pkg/0"} = 1;
|
$baddir_pkgs{$baddir{$n}}->{"$pkg/0"} = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
for my $f (@implicit_conflicts) {
|
||||||
for my $f (sort keys %baddir_pkgs) {
|
|
||||||
$filesc{$f} ||= [ $files{$f} ];
|
$filesc{$f} ||= [ $files{$f} ];
|
||||||
|
$baddir_pkgs{$f} ||= { "implicit_directory 0 0 noarch pkg/0" => 1 };
|
||||||
push @{$filesc{$f}}, sort keys %{$baddir_pkgs{$f}};
|
push @{$filesc{$f}}, sort keys %{$baddir_pkgs{$f}};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -228,13 +225,16 @@ for my $f (sort keys %filesc) {
|
|||||||
my $allm;
|
my $allm;
|
||||||
my $allc = 1;
|
my $allc = 1;
|
||||||
my $pkgn;
|
my $pkgn;
|
||||||
|
my $pl;
|
||||||
for my $pkg (@{$filesc{$f}}) {
|
for my $pkg (@{$filesc{$f}}) {
|
||||||
my (undef, $m) = split('/', $pkg, 2);
|
my ($p, $m) = split('/', $pkg, 2);
|
||||||
die unless $pkg =~ /^([^ ]+) /;
|
die unless $p =~ /^([^ ]+) /;
|
||||||
$allm = $m unless defined $allm;
|
$allm = $m unless defined $allm;
|
||||||
$allm = -1 if $allm != $m;
|
$allm = -1 if $allm != $m;
|
||||||
$pkgn = $1 unless defined $pkgn;
|
$pkgn = $1 unless defined $pkgn;
|
||||||
$allc = 0 if $pkgn ne $1;
|
$allc = 0 if $pkgn ne $1;
|
||||||
|
$allc = 0 if $pl && $p eq $pl;
|
||||||
|
$pl = $p;
|
||||||
}
|
}
|
||||||
if ($allc) {
|
if ($allc) {
|
||||||
delete $filesc{$f};
|
delete $filesc{$f};
|
||||||
@ -265,6 +265,7 @@ for my $pkg (sort keys %con) {
|
|||||||
next unless $pkgneeded{$pkg};
|
next unless $pkgneeded{$pkg};
|
||||||
for my $c (@{$con{$pkg}}) {
|
for my $c (@{$con{$pkg}}) {
|
||||||
for my $p (@{$whatprovides{$c} || []}) {
|
for my $p (@{$whatprovides{$c} || []}) {
|
||||||
|
next if $p eq $pkg;
|
||||||
$conflicts{"$pkg\n$p"} = 1;
|
$conflicts{"$pkg\n$p"} = 1;
|
||||||
$conflicts{"$p\n$pkg"} = 1;
|
$conflicts{"$p\n$pkg"} = 1;
|
||||||
}
|
}
|
||||||
@ -277,6 +278,7 @@ for my $pkg (sort keys %pkgneeded) {
|
|||||||
my $n = $1;
|
my $n = $1;
|
||||||
for my $p (@{$whatprovides{$n} || []}) {
|
for my $p (@{$whatprovides{$n} || []}) {
|
||||||
next unless $p =~ /^\Q$n\E .* i[56]86$/;
|
next unless $p =~ /^\Q$n\E .* i[56]86$/;
|
||||||
|
next if $p eq $pkg;
|
||||||
$conflicts{"$pkg\n$p"} = 1;
|
$conflicts{"$pkg\n$p"} = 1;
|
||||||
$conflicts{"$p\n$pkg"} = 1;
|
$conflicts{"$p\n$pkg"} = 1;
|
||||||
}
|
}
|
||||||
|
@ -188,17 +188,23 @@ while ( <INSTALL> ) {
|
|||||||
close(INSTALL);
|
close(INSTALL);
|
||||||
|
|
||||||
#print "checking file conflicts\n";
|
#print "checking file conflicts\n";
|
||||||
open(INSTALL, "perl findfileconflicts $pfile 2>&1|") || die 'exec fileconflicts';
|
my $cmd = sprintf("perl %s/findfileconflicts $pfile", dirname($0));
|
||||||
|
open(INSTALL, "$cmd |") || die 'exec fileconflicts';
|
||||||
|
my $inc = 0;
|
||||||
while ( <INSTALL> ) {
|
while ( <INSTALL> ) {
|
||||||
chomp;
|
chomp;
|
||||||
#print STDERR "$_\n";
|
#print STDERR "$_\n";
|
||||||
if ($_ =~ m/found conflict of (\S+) .* with (\S+) /) {
|
if ($_ =~ m/found conflict of (.*)-[^-]*-[^-]* with (.*)-[^-]*-[^-]*:/) {
|
||||||
|
$inc = 0;
|
||||||
|
#print STDERR "F $1 $2\n";
|
||||||
if (defined $targets{$1} || defined $targets{$2}) {
|
if (defined $targets{$1} || defined $targets{$2}) {
|
||||||
print "FC $1 $2\n";
|
$inc = 1;
|
||||||
$ret = 1;
|
$ret = 1;
|
||||||
last;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($inc) {
|
||||||
|
print "$_\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
close(INSTALL);
|
close(INSTALL);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user