[game-data-packager] 01/01: PPA: automatic backport to previous debhelper 9

Alexandre Detiste detiste-guest at moszumanska.debian.org
Sun Mar 12 16:04:31 UTC 2017


This is an automated email from the git hooks/post-receive script.

detiste-guest pushed a commit to branch master
in repository game-data-packager.

commit 2a01e3d96fe1af5289b2f77e22e8201e352d6043
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Sun Mar 12 17:04:11 2017 +0100

    PPA: automatic backport to previous debhelper 9
---
 tools/ppa.py | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/tools/ppa.py b/tools/ppa.py
index c41b9c9..649d0d6 100755
--- a/tools/ppa.py
+++ b/tools/ppa.py
@@ -26,6 +26,10 @@ GDP = os.path.join(BASE, 'game-data-packager')
 
 subprocess.check_call(['git', 'checkout', 'debian/changelog'],
                        cwd = GDP)
+subprocess.check_call(['git', 'checkout', 'debian/compat'],
+                       cwd = GDP)
+subprocess.check_call(['git', 'checkout', 'debian/control'],
+                       cwd = GDP)
 
 with open('/usr/share/distro-info/ubuntu.csv', 'r') as data:
     for line in data.readlines():
@@ -43,21 +47,46 @@ version = subprocess.check_output(['dpkg-parsechangelog',
                                   universal_newlines = True).strip()
 releases = sorted(set([lts, current]))
 
+with open('debian/compat', 'r') as compat:
+    current_debhelper =  int(compat.readline().strip())
+
 for release in releases:
+
+    supported_debhelper = {
+            'xenial': 9,
+            }.get(release, current_debhelper)
+    BACKPORT = supported_debhelper < current_debhelper
+
+    if BACKPORT:
+        with open('debian/compat', 'w') as compat:
+            compat.write('%d\n' % supported_debhelper)
+        subprocess.check_call(['sed', '-i',
+                               's/\ *debhelper.*/ debhelper (>= %d~),/' % supported_debhelper,
+                               'debian/control'],
+                              cwd = GDP)
+
     snapshot = version + '~git' + today + '+' + release
     subprocess.check_call(['dch', '-b',
                            '-D', release,
                            '-v', snapshot,
                            "Git snapshot"],
                           cwd = GDP)
+
     # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853795
     # "Ubuntu ppa's (launchpad) do not support .buildinfo files and reject them"
     subprocess.check_call(['debuild', '-S', '-i', '--buildinfo-option=-O'],cwd = GDP)
     subprocess.check_call(['dput', 'my-ppa',
                            'game-data-packager_%s_source.changes' % snapshot],
                            cwd = BASE)
+
     subprocess.check_call(['git', 'checkout', 'debian/changelog'],
                           cwd = GDP)
+    if BACKPORT:
+        subprocess.check_call(['git', 'checkout', 'debian/compat'],
+                               cwd = GDP)
+        subprocess.check_call(['git', 'checkout', 'debian/control'],
+                               cwd = GDP)
+
     for file in ('.tar.xz',
                  '.dsc',
                  '_source.build',

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list