The following commit has been merged in the master branch:
commit 09fba1a4b979849e945c62ba6fa89cef7cde998e
Author: James Vega <[email protected]>
Date: Sun Jul 11 15:45:11 2010 -0400
uupdate: Use Ubuntu-style Debian revision for the new changelog version.
Closes: #577998
Signed-off-by: James Vega <[email protected]>
diff --git a/debian/changelog b/debian/changelog
index 1150b32..717d397 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -40,6 +40,9 @@ devscripts (2.10.65) UNRELEASED; urgency=low
suggested wording. (Closes: #530581)
* debchange: When running “dch -r”, use <dist>-backports if a backports
upload is detected. (Closes: #588502)
+ * uupdate: Use “0ubuntu1” for the Debian revision of the version number when
+ running uupdate on Ubuntu systems. Based on a patch by Guillaume Martres.
+ (Closes: #577998)
[ Martin Zobel-Helas ]
* Remove svk from Recommends, it is no longer in the archive. (Closes:
diff --git a/scripts/uupdate.1 b/scripts/uupdate.1
index 161d1f5..b370b59 100644
--- a/scripts/uupdate.1
+++ b/scripts/uupdate.1
@@ -32,11 +32,11 @@ Usually \fBuupdate\fR will be able to deduce the version
number from
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
-\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
-\fBuscan\fR.)
+initially \(lq1\(rq, or \(lq0ubuntu1\(rq 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 \fBuscan\fR.)
.PP
Since \fBuupdate\fR uses \fBdebuild\fR to clean the current archive
before trying to apply a patch file, it accepts a \fB\-\-rootcmd\fR or
@@ -130,7 +130,11 @@ files created by \fBpatch\fR are deleted.
.TP
.B Changelog update
A changelog entry with the new version number is generated with the
-text "New upstream release".
+text \(lqNew upstream release\(rq.
+
+When used on Ubuntu systems, \fBlsb_release\fR detection is used to set
+the Debian revision to \(lq0ubuntu1\(rq. You may change
+\fIdebian/changelog\fR manually afterwards.
.SH "ACTIONS TAKEN ON A PATCH FILE"
.TP
.B Figure out new version number
@@ -158,7 +162,11 @@ with non-zero exit status.
.TP
.B Changelog update
A changelog entry with the new version number is generated with the
-text "New upstream release".
+text \(lqNew upstream release\(rq.
+
+When used on Ubuntu systems, \fBlsb_release\fR detection is used to set
+the Debian revision to \(lq0ubuntu1\(rq. You may change
+\fIdebian/changelog\fR manually afterwards.
.SH "SEE ALSO"
.BR debuild (1),
.BR fakeroot (1),
diff --git a/scripts/uupdate.sh b/scripts/uupdate.sh
index ab24d54..86851b4 100755
--- a/scripts/uupdate.sh
+++ b/scripts/uupdate.sh
@@ -106,6 +106,15 @@ DEFAULT_UUPDATE_ROOTCMD=
DEFAULT_UUPDATE_PRISTINE=yes
DEFAULT_UUPDATE_SYMLINK_ORIG=yes
VARS="UUPDATE_ROOTCMD UUPDATE_PRISTINE UUPDATE_SYMLINK_ORIG"
+SUFFIX="1"
+
+if which lsb_release >/dev/null 2>&1; then
+ case "$(lsb_release --short --id 2>/dev/null)" in
+ "Ubuntu")
+ SUFFIX="0ubuntu1"
+ ;;
+ esac
+fi
if [ "$1" = "--no-conf" -o "$1" = "--noconf" ]; then
shift
@@ -320,9 +329,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 +342,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 +465,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 +542,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 +554,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 +818,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
--
Git repository for devscripts
--
To unsubscribe, send mail to [email protected].