[Pkg-haskell-commits] darcs: tools: Handle epochs better

Joachim Breitner mail at joachim-breitner.de
Sun Oct 21 13:57:14 UTC 2012


Fri Oct 19 18:58:02 UTC 2012  Joachim Breitner <mail at joachim-breitner.de>
  * Handle epochs better
  Ignore-this: 91b92dac11cee7d7b7471ca911a945cc

    M ./debian2dsc.sh +2
    M ./mass-build.sh -6 +16

Fri Oct 19 18:58:02 UTC 2012  Joachim Breitner <mail at joachim-breitner.de>
  * Handle epochs better
  Ignore-this: 91b92dac11cee7d7b7471ca911a945cc
diff -rN -u old-tools//debian2dsc.sh new-tools//debian2dsc.sh
--- old-tools//debian2dsc.sh	2012-10-21 13:57:14.310720131 +0000
+++ new-tools//debian2dsc.sh	2012-10-21 13:57:14.330721670 +0000
@@ -41,6 +41,7 @@
     UPSTREAM=`echo $VERSION | cut -d- -f1` # this could be improved
     if echo $UPSTREAM | fgrep -q : ; then
     	UPSTREAM=`echo $UPSTREAM | cut -d: -f2-`
+    	VERSION=`echo $VERSION | cut -d: -f2-`
     fi
     TARBALL_GZ=${PACKAGE}_$UPSTREAM.orig.tar.gz
     TARBALL_BZ2=${PACKAGE}_$UPSTREAM.orig.tar.bz2
@@ -91,6 +92,7 @@
     tar --create \
     	--gzip \
 	--transform s,^.,debian, \
+	--force-local \
 	--file $DEBIAN_TARBALL \
 	--directory $DIR \
 	"--exclude=*.a" "--exclude=*.la" "--exclude=*.o" "--exclude=*.so" "--exclude=.*.sw?" "--exclude=*/*~" "--exclude=,,*" "--exclude=.[#~]*" "--exclude=.arch-ids" "--exclude=.arch-inventory" "--exclude=.be" "--exclude=.bzr" "--exclude=.bzr.backup" "--exclude=.bzr.tags" "--exclude=.bzrignore" "--exclude=.cvsignore" "--exclude=.deps" "--exclude=.git" "--exclude=.gitattributes" "--exclude=.gitignore" "--exclude=.gitmodules" "--exclude=.hg" "--exclude=.hgignore" "--exclude=.hgsigs" "--exclude=.hgtags" "--exclude=.shelf" "--exclude=.svn" "--exclude=CVS" "--exclude=DEADJOE" "--exclude=RCS" "--exclude=_MTN" "--exclude=_darcs" "--exclude={arch}" \
diff -rN -u old-tools//mass-build.sh new-tools//mass-build.sh
--- old-tools//mass-build.sh	2012-10-21 13:57:14.310720131 +0000
+++ new-tools//mass-build.sh	2012-10-21 13:57:14.419719255 +0000
@@ -133,12 +133,17 @@
 
 	PACKAGE=`dpkg-parsechangelog -l$repodir/changelog -c1 | grep-dctrl -n -s Source .`
 	VERSION=`dpkg-parsechangelog -l$repodir/changelog -c1 | grep-dctrl -n -s Version .`
+        UPSTREAM=`echo $VERSION | cut -d- -f1` # this could be improved
+        if echo $UPSTREAM | fgrep -q : ; then
+        	UPSTREAM=`echo $UPSTREAM | cut -d: -f2-`
+        	VERSION=`echo $VERSION | cut -d: -f2-`
+        fi
 	DISTRIBUTION=$(dpkg-parsechangelog -l$repodir/changelog -c1 |grep-dctrl -n -s Distribution .)
 	DSC=${PACKAGE}_${VERSION}.dsc
 
-	if ! $DEBIAN2DSC $repodir
+	if ! $DEBIAN2DSC $repodir && [ -e $DSC ]
 	then
-		echo "Failed to create .dsc for $dir."
+		echo "Failed to create $DSC for $dir."
 		buildfailed="$buildfailed $dir"
 		popd >/dev/null
 		continue
@@ -195,6 +200,11 @@
 
 	PACKAGE=`dpkg-parsechangelog -l$repodir/changelog -c1 | grep-dctrl -n -s Source .`
 	VERSION=`dpkg-parsechangelog -l$repodir/changelog -c1 | grep-dctrl -n -s Version .`
+        UPSTREAM=`echo $VERSION | cut -d- -f1` # this could be improved
+        if echo $UPSTREAM | fgrep -q : ; then
+        	UPSTREAM=`echo $UPSTREAM | cut -d: -f2-`
+        	VERSION=`echo $VERSION | cut -d: -f2-`
+        fi
 	DISTRIBUTION=$(dpkg-parsechangelog -l$repodir/changelog -c1 |grep-dctrl -n -s Distribution .)
 	DSC=${PACKAGE}_${VERSION}.dsc
 
@@ -209,9 +219,9 @@
 
 	dpkg-scanpackages . > Packages
 
-	if ! $DEBIAN2DSC $repodir
+	if [ ! -e $DSC ]
 	then
-		echo "Failed to create $DSC."
+		echo "File $DSC not found, should have been created earlier."
 		buildfailed="$buildfailed $dir"
 		popd >/dev/null
 		continue
@@ -265,9 +275,9 @@
 echo $nottobuild
 echo "Packages already released:"
 echo $released
+echo "Packages not yet buildable:"
+echo $uninstallable
 echo "Packages successfully build:"
 echo $buildok
 echo "Packages failed to build:"
 echo $buildfailed
-echo "Packages not yet buildable:"
-echo $uninstallable





More information about the Pkg-haskell-commits mailing list