Skip to content

Commit

Permalink
fix bug in self-provides extraction code
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Dec 5, 2014
1 parent d88d96a commit 25b466b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Build.pm
Original file line number Diff line number Diff line change
Expand Up @@ -666,13 +666,13 @@ sub readdeps {
# try to get epoch from self-provides
my $vr = $pkg->{'version'};
$vr .= "-$pkg->{'release'}" if defined $pkg->{'release'};
@sp = grep {/^\Q$n\E = \d+:\Q$vr\E/} $pkg->{'provides'};
@sp = grep {/^\Q$n\E\s*=\s*\d+:\Q$vr\E/} @{$pkg->{'provides'}};
} else {
@sp = grep {/^\Q$n\E = /} $pkg->{'provides'};
@sp = grep {/^\Q$n\E\s*=\s*/} @{$pkg->{'provides'}};
}
if (@sp) {
my $evr = $sp[-1];
$evr =~ s/^\Q$n\E =\s*//;
$evr =~ s/^\Q$n\E\s*=\s*//;
$pkg->{'epoch'} = $1 if $evr =~ s/^(\d+)://;
$pkg->{'release'} = $1 if $evr =~ s/-([^-]*)$//;
$pkg->{'version'} = $evr;
Expand Down

0 comments on commit 25b466b

Please sign in to comment.