diff options
author | Michael Schröder <mls@suse.de> | 2009-01-07 14:53:49 +0000 |
---|---|---|
committer | Michael Schröder <mls@suse.de> | 2009-01-07 14:53:49 +0000 |
commit | fec5bc52ec22a3f16f9a8e25425a0b3823a3b8b8 (patch) | |
tree | 3b7501cba365ba57a37162a2963bece42ce52e17 /substitutedeps | |
parent | c14eef8aecb11aaf7a8a4b03cc83c3baaa4609ef (diff) |
- add hack for CI_CNT/B_CNT substitution
Diffstat (limited to 'substitutedeps')
-rwxr-xr-x | substitutedeps | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/substitutedeps b/substitutedeps index 93d6153..3d0e328 100755 --- a/substitutedeps +++ b/substitutedeps @@ -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; + } } } } |