Mailinglist Archive: opensuse-buildservice (245 mails)

< Previous Next >
[opensuse-buildservice] bug in set_version service
  • From: Jon Nelson <jnelson-suse@xxxxxxxxxxx>
  • Date: Sun, 24 Oct 2010 14:46:38 -0500
  • Message-id: <AANLkTik4T+iY1t_wVUj2zf79qCBt1knbHO0orJiFrWOo@xxxxxxxxxxxxxx>
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
sed -e "s,^Version:.*,Version: $MYVERSION," "$FILE" >
"$MYOUTDIR/$FILE" || exit 1

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

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups