Mailinglist Archive: opensuse-buildservice (245 mails)

< Previous Next >
Re: [opensuse-buildservice] bug in set_version service
  • From: Adrian Schröter <adrian@xxxxxxx>
  • Date: Mon, 25 Oct 2010 11:20:35 +0200
  • Message-id: <201010251120.35635.adrian@xxxxxxx>
Am Sonntag, 24. Oktober 2010, 21:46:38 schrieb Jon Nelson:
I noticed a bug in the set_version service.
If the destination file is a specfile, then the file gets overwritten
/twice/ - once with the new version, and once with 'Release: 0' which
throws out the first (version) change.

Here is my recommended fix:

if [ "${FILE%.spec}" != "$FILE" ]; then
# set release back to zero after version upgrade, will be
increased by OBS during build
sed -e "s,^Release:.*,Release: 0," -e "s,^Version:.*,Version:
$MYVERSION," "$FILE" > "$MYOUTDIR/$FILE" || exit 1

The problem with that is that it would also remove any possible used special
hacks which modify the release number.

So, we would need an option here to disable it.

Would be great if you could submit that to the openSUSE:Tools package via
a submit request.

sed -e "s,^Version:.*,Version: $MYVERSION," "$FILE" >
"$MYOUTDIR/$FILE" || exit 1

I generally prefer to see '-e' used whenever possible.

Adrian Schroeter
SUSE Linux Products GmbH
email: adrian@xxxxxxx
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups