Package: devscripts
Version: 2.10.64
Severity: normal
Tags: patch

Please append -0ubuntu1 instead of -1 on Ubuntu (patch attached). The initial 
patch was written by Guillaume Martres.
diff --git a/scripts/uupdate.sh b/scripts/uupdate.sh
index ab24d54..152265f 100755
--- a/scripts/uupdate.sh
+++ b/scripts/uupdate.sh
@@ -106,6 +106,13 @@ DEFAULT_UUPDATE_ROOTCMD=
 DEFAULT_UUPDATE_PRISTINE=yes
 DEFAULT_UUPDATE_SYMLINK_ORIG=yes
 VARS="UUPDATE_ROOTCMD UUPDATE_PRISTINE UUPDATE_SYMLINK_ORIG"
+SUFFIX="1"
+
+case "$(test -x /usr/bin/lsb_release && /usr/bin/lsb_release --short --id 2>/dev/null)" in
+    "Ubuntu")
+	SUFFIX="0ubuntu1"
+    ;;
+esac
 
 if [ "$1" = "--no-conf" -o "$1" = "--noconf" ]; then
     shift
@@ -320,9 +327,9 @@ if [ "$PATCH" ]; then
 	fi
 
 	if [ -n "$EPOCH" ]; then
-	    echo "New Release will be $EPOCH:$NEW_VERSION-1."
+	    echo "New Release will be $EPOCH:$NEW_VERSION-$SUFFIX."
 	else
-	    echo "New Release will be $NEW_VERSION-1."
+	    echo "New Release will be $NEW_VERSION-$SUFFIX."
 	fi
     fi
 
@@ -333,8 +340,8 @@ if [ "$PATCH" ]; then
     fi
 
     # Sanity check
-    if dpkg --compare-versions "$NEW_VERSION-1" le "$VERSION"; then
-	echo "$PROGNAME: new version $NEW_VERSION-1 <= current version $VERSION; aborting!" >&2
+    if dpkg --compare-versions "$NEW_VERSION-$SUFFIX" le "$VERSION"; then
+	echo "$PROGNAME: new version $NEW_VERSION-$SUFFIX <= current version $VERSION; aborting!" >&2
 	exit 1
     fi
 
@@ -456,7 +463,7 @@ if [ "$PATCH" ]; then
 	    STATUS=1
 	fi
 	chmod a+x debian/rules
-	debchange -v "$NEW_VERSION-1" "New upstream release"
+	debchange -v "$NEW_VERSION-$SUFFIX" "New upstream release"
 	echo "Remember: Your current directory is the OLD sourcearchive!"
 	echo "Do a \"cd ../$PACKAGE-$SNEW_VERSION\" to see the new package"
 	exit
@@ -533,9 +540,9 @@ else
 	fi
     fi
     if [ -n "$EPOCH" ]; then
-	echo "New Release will be $EPOCH:$NEW_VERSION-1."
+	echo "New Release will be $EPOCH:$NEW_VERSION-$SUFFIX."
     else
-	echo "New Release will be $NEW_VERSION-1."
+	echo "New Release will be $NEW_VERSION-$SUFFIX."
     fi
 
     # Strip epoch number
@@ -545,8 +552,8 @@ else
     fi
 
     # Sanity check
-    if dpkg --compare-versions "$NEW_VERSION-1" le "$VERSION"; then
-	echo "$PROGNAME: new version $NEW_VERSION-1 <= current version $VERSION; aborting!" >&2
+    if dpkg --compare-versions "$NEW_VERSION-$SUFFIX" le "$VERSION"; then
+	echo "$PROGNAME: new version $NEW_VERSION-$SUFFIX <= current version $VERSION; aborting!" >&2
 	exit 1
     fi
 
@@ -809,7 +816,7 @@ else
 	exit 1
     fi
     chmod a+x debian/rules
-    debchange -v "$NEW_VERSION-1" New upstream release
+    debchange -v "$NEW_VERSION-$SUFFIX" New upstream release
     echo "Remember: Your current directory is the OLD sourcearchive!"
     echo "Do a \"cd ../$PACKAGE-$SNEW_VERSION\" to see the new package"
 fi
diff -pruN 2.10.61/scripts/uupdate.1 2.10.61ubuntu2/scripts/uupdate.1
--- 2.10.61/scripts/uupdate.1	2010-01-03 03:20:42.000000000 +0000
+++ 2.10.61ubuntu2/scripts/uupdate.1	2010-01-19 09:52:46.000000000 +0000
@@ -32,7 +32,7 @@ Usually \fBuupdate\fR will be able to de
 the source archive name (as long as it only contains digits and
 periods).  If that fails, you need to specify the version number
 explicitly (without the Debian release number which will always be
-initially 1!).  This can be done with an initial
+initially "1", or "0ubuntu1" on Ubuntu-detected systems).  This can be done with an initial
 \fB\-\-upstream-version\fR or \fB\-v\fR option, or in the case of an
 archive, with a version number after the filename.  (The reason for
 the latter is so that \fBuupdate\fR can be called directly from
@@ -159,6 +159,10 @@ with non-zero exit status.
 .B Changelog update
 A changelog entry with the new version number is generated with the
 text "New upstream release".
+.PP
+When used on Ubuntu systems, \fBlsb_release\fR detection is used to set
+the default distribution postfix.  You may change \fIdebian/changelog\fR
+manually afterwards.
 .SH "SEE ALSO"
 .BR debuild (1),
 .BR fakeroot (1),

Reply via email to