chech obsoletes too
This commit is contained in:
parent
9ad7ed6a3e
commit
ba089c8659
@ -24,8 +24,10 @@ my $pkg = '';
|
|||||||
my $fls = 0;
|
my $fls = 0;
|
||||||
my $prv = 0;
|
my $prv = 0;
|
||||||
my $con = 0;
|
my $con = 0;
|
||||||
|
my $obs = 0;
|
||||||
|
|
||||||
my %con;
|
my %con;
|
||||||
|
my %obs;
|
||||||
my %whatprovides;
|
my %whatprovides;
|
||||||
|
|
||||||
die("Usage: findfileconflicts2 packages[.gz]\n") unless @ARGV == 1;
|
die("Usage: findfileconflicts2 packages[.gz]\n") unless @ARGV == 1;
|
||||||
@ -118,17 +120,30 @@ while(<FL>) {
|
|||||||
push @{$con{$pkg}}, $_;
|
push @{$con{$pkg}}, $_;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
if ($obs) {
|
||||||
|
if ($_ eq '-Obs:') {
|
||||||
|
$obs= 0;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
s/ .*//; # no version stuff;
|
||||||
|
push @{$obs{$pkg}}, $_;
|
||||||
|
next;
|
||||||
|
}
|
||||||
if (/^=Pkg: (.*)/) {
|
if (/^=Pkg: (.*)/) {
|
||||||
$pkg = $1;
|
$pkg = $1;
|
||||||
my $n = $pkg;
|
my $n = $pkg;
|
||||||
$n =~ s/ .*//;
|
$n =~ s/ .*//;
|
||||||
push @{$con{$pkg}}, $n;
|
push @{$obs{$pkg}}, $n;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if ($_ eq '+Con:') {
|
if ($_ eq '+Con:') {
|
||||||
$con = 1 if $pkg;
|
$con = 1 if $pkg;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
if ($_ eq '+Obs:') {
|
||||||
|
$obs = 1 if $pkg;
|
||||||
|
next;
|
||||||
|
}
|
||||||
if ($_ eq '+Prv:') {
|
if ($_ eq '+Prv:') {
|
||||||
$prv = 1 if $pkg;
|
$prv = 1 if $pkg;
|
||||||
next;
|
next;
|
||||||
@ -272,6 +287,18 @@ for my $pkg (sort keys %con) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for my $pkg (sort keys %obs) {
|
||||||
|
next unless $pkgneeded{$pkg};
|
||||||
|
for my $c (@{$obs{$pkg}}) {
|
||||||
|
for my $p (@{$whatprovides{$c} || []}) {
|
||||||
|
next if $p eq $pkg;
|
||||||
|
next unless $p =~ /^\Q$c\E /;
|
||||||
|
$conflicts{"$pkg\n$p"} = 1;
|
||||||
|
$conflicts{"$p\n$pkg"} = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# let 32bit packages conflict with the i586 version
|
# let 32bit packages conflict with the i586 version
|
||||||
for my $pkg (sort keys %pkgneeded) {
|
for my $pkg (sort keys %pkgneeded) {
|
||||||
next unless $pkg =~ /^([^ ]+)-32bit /;
|
next unless $pkg =~ /^([^ ]+)-32bit /;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user