On Wed, 30 May 2007, Dries Verachtert wrote:
Hello, If i understand the code correctly, then the release tag is changed by the perl script 'substitutedeps', called from the bash script 'build'. The following small patch would allow some very minimal support for a suffix for the release tag (patch made in the dir trunk/buildservice/src/build/:
Index: substitutedeps =================================================================== --- substitutedeps (revision 1692) +++ substitutedeps (working copy) @@ -80,7 +80,8 @@ next; }
- $l =~ s/^(Release:\s*).*/$1$release/i if $release; + my $releasesuffixtag = "%{?releasesuffix}"; + $l =~ s/^(Release:\s*).*/$1$release$releasesuffixtag/i if $release;
if (!$used || ($l !~ /^BuildRequires:/i)) { print F "$l\n";
Sorry, but I don't want to find out, how to press this into one regular expression, so I do it as follows: if($release) { my $obsrelease = "%{?obsrelease}"; if(!($l =~ s/^(Release:\s*.*)$obsrelease/$1$release/i)) { $l =~ s/^(Release:\s*).*/$1$release/i; } } NOTE: Untested code :-) Generally this should do: - When %{?obsrelease} is contained in the Release line replace it by the release version and leave everything intact. - When not, replace the whole release text. Result: - Allows suffixes, prefixes, and everything else one may think of - You need not defined any additional variable in spec-file - Also works without buildservice, as %{?obsrelease} is expanded to nothing then. Ciao -- http://www.dstoecker.eu/ (PGP key available) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org