Skip to content

Commit

Permalink
- add hack for CI_CNT/B_CNT substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Jan 7, 2009
1 parent c14eef8 commit fec5bc5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion substitutedeps
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,19 @@ for my $l (@$xspec) {
if ($release) {
if ($l =~ /^Release:/i) {
if (!($l =~ s/<RELEASE>/$release/g)) {
$l =~ s/^(Release:\s*).*/$1$release/i;
if ($l =~ /<(?:CI_CNT|B_CNT)>/) {
# XXX: should pass ci_cnt/b_cnt instead
if ($release =~ /(\d+)\.(\d+)$/) {
my ($ci, $b) = ($1, $2);
$l =~ s/<CI_CNT>/$ci/;
$l =~ s/<B_CNT>/$b/;
} elsif ($release =~ /(\d+)$/) {
my $b = $1;
$l =~ s/<B_CNT>/$b/ unless $l =~ s/<CI_CNT>/$b/;
}
} else {
$l =~ s/^(Release:\s*).*/$1$release/i;
}
}
}
}
Expand Down

0 comments on commit fec5bc5

Please sign in to comment.