Skip to content

Commit

Permalink
Substitute more dependency types
Browse files Browse the repository at this point in the history
Now also Requires(pre|post) and PreReq are substituted.
  • Loading branch information
mlschroe committed Dec 13, 2017
1 parent 9cfbfb5 commit f21cd8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions substitutedeps
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ for my $line (@$xspec) {
# all compat stuff done. we return to your scheduled program
}

if (!$used || ($line !~ /^(?:Build)?Requires:/i)) {
if (!$used || ($line !~ /^(?:Requires|BuildRequires|PreReq)(?:\([^\)]+\))?:/i)) {
print F "$line\n";
next;
}
Expand All @@ -293,7 +293,7 @@ for my $line (@$xspec) {
}

my $isbuildrequires = 0;
$isbuildrequires = 1 if $line =~ /^BuildRequires:/i;
$isbuildrequires = 1 if $line =~ /^BuildRequires/i;
my $r = $line;
$r =~ s/^[^:]*:\s*//;
my @deps = $r =~ /([^\s\[,]+)(\s+[<=>]+\s+[^\s\[,]+)?[\s,]*/g;
Expand Down

0 comments on commit f21cd8b

Please sign in to comment.