Hello community, here is the log from the commit of package obs-service-set_version for openSUSE:Factory checked in at 2013-05-16 11:15:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/obs-service-set_version (Old) and /work/SRC/openSUSE:Factory/.obs-service-set_version.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "obs-service-set_version" Changes: -------- --- /work/SRC/openSUSE:Factory/obs-service-set_version/obs-service-set_version.changes 2012-06-28 15:38:22.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.obs-service-set_version.new/obs-service-set_version.changes 2013-05-16 11:15:15.000000000 +0200 @@ -1,0 +2,5 @@ +Tue Apr 16 09:30:01 UTC 2013 - adr...@suse.de + +- add support for PKGBUILD aka Arch Linux files + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ obs-service-set_version.spec ++++++ --- /var/tmp/diff_new_pack.r2IFVq/_old 2013-05-16 11:15:16.000000000 +0200 +++ /var/tmp/diff_new_pack.r2IFVq/_new 2013-05-16 11:15:16.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package obs-service-set_version # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed ++++++ set_version ++++++ --- /var/tmp/diff_new_pack.r2IFVq/_old 2013-05-16 11:15:16.000000000 +0200 +++ /var/tmp/diff_new_pack.r2IFVq/_new 2013-05-16 11:15:16.000000000 +0200 @@ -45,21 +45,25 @@ get_version_from_file () { if [ -z "$MYVERSION" ]; then - MYVERSION=`ls -1t | sed -n "s,$BASENAME.*-\([0123456789].*\).tar.*,\1,p" | head -n 1` + MYVERSION=`ls -1t | sed -n "s,$BASENAME.*[-_]\([0123456789].*\).tar.*,\1,p" | head -n 1` fi if [ -z "$MYVERSION" ]; then - MYVERSION=`ls -1t | sed -n "s,$BASENAME.*-\([0123456789].*\).tgz$,\1,p" | head -n 1` + MYVERSION=`ls -1t | sed -n "s,$BASENAME.*[-_]\([0123456789].*\).tgz$,\1,p" | head -n 1` fi if [ -z "$MYVERSION" ]; then - MYVERSION=`ls -1t | sed -n "s,$BASENAME.*-\([0123456789].*\).tbz2$,\1,p" | head -n 1` + MYVERSION=`ls -1t | sed -n "s,$BASENAME.*[-_]\([0123456789].*\).tbz2$,\1,p" | head -n 1` fi if [ -z "$MYVERSION" ]; then - MYVERSION=`ls -1t | sed -n "s,$BASENAME.*-\([0123456789].*\).zip$,\1,p" | head -n 1` + MYVERSION=`ls -1t | sed -n "s,$BASENAME.*[-_]\([0123456789].*\).zip$,\1,p" | head -n 1` fi if [ -z "$MYVERSION" ]; then echo "ERROR: no version is given and can't get detected automatically" exit 1 fi + + # remove trailing ".orig", used by dpkg sources + MYVERSION=`sed s/.orig$// <<<$MYVERSION` + echo "Detected version as $MYVERSION" } @@ -89,6 +93,16 @@ rm -f "$FILE" fi done + + if [ -e PKGBUILD ]; then + FILE=`ls -1 _service:*[-_]${MYVERSION}* | head -n 1` + [ -z "$FILE" ] && FILE=`ls -1 *[-_]${MYVERSION}* | head -n 1` + MD5=`md5sum "$FILE" | head -n 1 | cut -d\ -f 1` + + sed "0,/^pkgver=\(\s*\)[^%]*/s//pkgver=\1$MYVERSION/" PKGBUILD > "$MYOUTDIR/PKGBUILD" || exit 1 + sed -r -i "s,^pkgrel=.*,pkgrel=0," "$MYOUTDIR/PKGBUILD" || exit 1 + sed -r -i "s,^md5sums=.*,md5sums=('$MD5')," "$MYOUTDIR/PKGBUILD" || exit 1 + fi } get_version_from_file ++++++ set_version.service ++++++ --- /var/tmp/diff_new_pack.r2IFVq/_old 2013-05-16 11:15:16.000000000 +0200 +++ /var/tmp/diff_new_pack.r2IFVq/_new 2013-05-16 11:15:16.000000000 +0200 @@ -1,5 +1,5 @@ <service name="set_version"> - <summary>Updates version in spec file</summary> + <summary>Updates version in spec and dsc files</summary> <description>This service updates a spec file according to the existing files. Can be used after download_url or tar_scm service. </description> -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org