Patchwork [4,of,4,STABLE,V2] builddeb: add distroseries to tagged versions

login
register
mail settings
Submitter Sean Farley
Date May 7, 2016, 6:40 a.m.
Message ID <95b0f6746340d2da1de3.1462603234@laptop.local>
Download mbox | patch
Permalink /patch/14962/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Sean Farley - May 7, 2016, 6:40 a.m.
# HG changeset patch
# User Sean Farley <sean@farley.io>
# Date 1462568951 25200
#      Fri May 06 14:09:11 2016 -0700
# Branch stable
# Node ID 95b0f6746340d2da1de3d3295f3cae924dec7a3b
# Parent  cb7650bb00cd6e1d41f27df3278eb9adc8b6be4d
# EXP-Topic docker-ppa
builddeb: add distroseries to tagged versions

This is needed so that launchpad and friends have a unique version number for
each distroseries (trusty, wily, xenial, etc). It was discovered when trying to
upload 3.8 to launchpad.

Patch

diff --git a/contrib/builddeb b/contrib/builddeb
--- a/contrib/builddeb
+++ b/contrib/builddeb
@@ -56,10 +56,14 @@  debver="$version"
 if [ -n "$type" ] ; then
     debver="$debver~$type"
 fi
 if [ -n "$distance" ] ; then
     debver="$debver+$distance-$CODENAME-$node"
+elif [ "$DEBFLAGS" = "-S" ] ; then
+    # for building a ppa (--source-only) for a release (distance == 0), we need
+    # to version the distroseries so that we can upload to launchpad
+    debver="$debver~${CODENAME}1"
 fi
 
 control=debian/control
 changelog=debian/changelog