[PATCH 1 of 4] builddeb: rename --release option to --codename

Anton Shestakov av6 at dwimlabs.net
Thu Dec 3 12:09:50 UTC 2015


# HG changeset patch
# User Anton Shestakov <av6 at dwimlabs.net>
# Date 1448434783 -28800
#      Wed Nov 25 14:59:43 2015 +0800
# Node ID a038414cc0ccbf0874c506765c4ca7e09358bb17
# Parent  61fbf5dc12b23e7a2a30cf04ebd9f096c42a1f61
builddeb: rename --release option to --codename

Debian and Ubuntu releases have both codenames and traditional version numbers.
An entire "branch" of releases is referred to by its codename, and version
numbers (e.g. 8.2, 14.04.3) are used to address individual releases.

Since we use codenames for building .deb packages, let's call the option and
the variable appropriately.

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -162,7 +162,7 @@ osx:
 
 deb:
 	mkdir -p packages/debian-unknown
-	contrib/builddeb --release unknown
+	contrib/builddeb --codename unknown
 
 docker-debian-jessie:
 	mkdir -p packages/debian-jessie
diff --git a/contrib/builddeb b/contrib/builddeb
--- a/contrib/builddeb
+++ b/contrib/builddeb
@@ -8,12 +8,12 @@
 
 BUILD=1
 CLEANUP=1
-DEBVERSION=jessie
+CODENAME=jessie
 while [ "$1" ]; do
     case "$1" in
-    --release )
+    --codename )
         shift
-        DEBVERSION="$1"
+        CODENAME="$1"
         shift
         ;;
     --cleanup )
@@ -82,7 +82,7 @@ if [ "$BUILD" ]; then
 fi
 if [ "$CLEANUP" ] ; then
     echo
-    OUTPUTDIR=${OUTPUTDIR:=packages/debian-$DEBVERSION}
+    OUTPUTDIR=${OUTPUTDIR:=packages/debian-$CODENAME}
     find ../mercurial*.deb ../mercurial_*.build ../mercurial_*.changes \
           -type f -newer $control -print0 | \
       xargs -Inarf -0 mv narf "$OUTPUTDIR"
diff --git a/contrib/dockerdeb b/contrib/dockerdeb
--- a/contrib/dockerdeb
+++ b/contrib/dockerdeb
@@ -8,7 +8,7 @@ export ROOTDIR=$(cd $BUILDDIR/..; pwd)
 
 checkdocker
 
-DEBPLATFORM="$1"
+CODENAME="$1"
 PLATFORM="debian-$1"
 shift # extra params are passed to build process
 
@@ -26,8 +26,8 @@ if [ $(uname) = "Darwin" ] ; then
             sh -c "cd /mnt/$dn && make clean && make local"
 fi
 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
-  sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/builddeb --build --release $DEBPLATFORM"
-contrib/builddeb --cleanup --release $DEBPLATFORM
+  sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/builddeb --build --codename $CODENAME"
+contrib/builddeb --cleanup --codename $CODENAME
 if [ $(uname) = "Darwin" ] ; then
     $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
             sh -c "cd /mnt/$dn && make clean"


More information about the Mercurial-devel mailing list