summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@luon.net>2012-07-11 11:43:49 (GMT)
committerHéctor Orón Martínez <hector.oron@collabora.co.uk>2014-02-17 13:45:03 (GMT)
commit9314d3b267946bfe426b0ccc12283cc84273c0e5 (patch)
tree739d811e2902f6da181b5553605c4e5f6cd60704
parentc268e5788dc13adf4b359a8ef0246629d6dc8882 (diff)
downloadobs-build-9314d3b267946bfe426b0ccc12283cc84273c0e5.tar.gz
obs-build-9314d3b267946bfe426b0ccc12283cc84273c0e5.tar.xz
Parse version from the dsc file directly to handle epochs
Signed-off-by: Héctor Orón Martínez <hector.oron@collabora.co.uk>
-rwxr-xr-xbuild2
1 files changed, 1 insertions, 1 deletions
diff --git a/build b/build
index 6cb5495..34f9ced 100755
--- a/build
+++ b/build
@@ -1959,7 +1959,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do
DEB_DSCFILE="${DEB_DSCFILE##*/}"
fi
DEBBUILDDIR=$TOPDIR/BUILD/$(echo $DEB_DSCFILE | sed -e 's/\([^_]*\)_\([^-]*\).*\.dsc$/\1-\2/')
- DEBVERSION=$(echo $DEB_DSCFILE | sed -e 's/[^_]*_\(.*\).*\.dsc$/\1/')
+ DEBVERSION=$(egrep -m1 '^Version: ' $BUILD_ROOT/$DEB_SOURCEDIR/$DEB_DSCFILE | sed 's/^Version:[ ]*//')
chroot $BUILD_ROOT su -c "dpkg-source -x $DEB_SOURCEDIR/$DEB_DSCFILE $DEBBUILDDIR" - $BUILD_USER
chroot $BUILD_ROOT su -c "cd $DEBBUILDDIR && dch --force-distribution -D unstable -v ${DEBVERSION}+${RELEASE} $REASON" - $BUILD_USER