Backport r1911 and r1935: recognise and ignore Breaks: and Enhances: lines

This commit is contained in:
cd-builder user 2010-05-22 00:58:21 +00:00
parent 81ee003aed
commit 7d2a9a47cc
1 changed files with 5 additions and 2 deletions

View File

@ -313,14 +313,17 @@ sub read_depends {
my $i = shift; # Ref
my $lines = shift; # Ref
my $pkg = shift; # string
my $types = "(?:Pre)?Depends|Suggests|Recommends|Replaces|Conflicts";
my $types = "(?:Pre)?Depends|Suggests|Recommends|Replaces|Conflicts|Breaks|Enhances";
my (@dep, @rec, @sug);
my ($type, $or, $elt);
while ($lines->[$$i] =~ m/^\s([\s\|])($types):/) {
$type = $2; $or = $1;
# Get rid of replaces and conflicts ...
if (($type eq "Replaces") or ($type eq "Conflicts")) {
if (($type eq "Replaces") or
($type eq "Conflicts") or
($type eq "Breaks") or
($type eq "Enhances")) {
$$i++;
while ($lines->[$$i] =~ m/^\s{4}/) {
$$i++;