[game-data-packager] 01/01: packaging/deb: Try to use dpkg-deb --root-owner-group instead of fakeroot

Simon McVittie smcv at debian.org
Sun Oct 29 15:00:30 UTC 2017


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

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

commit c7b9ae0e3561b61a72ae546058f16a284b8ee5f0
Author: Simon McVittie <smcv at debian.org>
Date:   Sun Oct 29 14:48:58 2017 +0000

    packaging/deb: Try to use dpkg-deb --root-owner-group instead of fakeroot
    
    This makes it irrelevant whether the fakeroot alternative points
    to original fakeroot, fakeroot-ng or pseudo, and whether the chosen
    implementation actually works (Closes: #879825)
    
    Signed-off-by: Simon McVittie <smcv at debian.org>
---
 debian/changelog                    |  4 ++++
 debian/control                      | 10 ++++++----
 game_data_packager/packaging/deb.py | 13 +++++++++++--
 3 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f5a0b95..459d40e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,10 @@ game-data-packager (54) UNRELEASED; urgency=medium
     - Arx Fatalis: add download URL for Japanese demo [adetiste]
     - King's Quest VII: depend on scummvm (>= 1.10.0) [adetiste]
     - Planescape Torment: simplify YAML by using groups [Phil Morrell]
+    - packaging/deb: Try to use dpkg-deb --root-owner-group instead of
+      fakeroot. This makes it irrelevant whether the fakeroot alternative
+      points to original fakeroot, fakeroot-ng or pseudo, and whether the
+      chosen implementation actually works (Closes: #879825) [smcv]
   * Internal changes:
     - Skip some of the more elaborate consistency checks when running a
       packaged version [smcv]
diff --git a/debian/control b/debian/control
index 348a6b6..30cc758 100644
--- a/debian/control
+++ b/debian/control
@@ -29,10 +29,12 @@ Vcs-Browser: https://anonscm.debian.org/cgit/pkg-games/game-data-packager.git
 Homepage: https://wiki.debian.org/Games/GameDataPackager
 
 Package: game-data-packager
-Depends: fakeroot, ${misc:Depends},
-	python3-debian,
-	python3-yaml,
-	${python3:Depends},
+Depends:
+ ${misc:Depends},
+ ${python3:Depends},
+ dpkg (>= 1.19.0) | fakeroot,
+ python3-debian,
+ python3-yaml,
 Recommends:
  game-data-packager-runtime,
 Suggests:
diff --git a/game_data_packager/packaging/deb.py b/game_data_packager/packaging/deb.py
index 65b0282..d4fa5c9 100644
--- a/game_data_packager/packaging/deb.py
+++ b/game_data_packager/packaging/deb.py
@@ -410,11 +410,20 @@ class DebPackaging(PackagingSystem):
         elif isinstance(compress, str):
             dpkg_deb_args = ['-Z' + compress]
         elif isinstance(compress, list):
-            dpkg_deb_args = compress
+            dpkg_deb_args = compress[:]
+
+        dpkg_deb_args.insert(0, 'dpkg-deb')
+
+        dpkg_version = Version(self.current_version('dpkg'))
+
+        if dpkg_version >= Version('1.19.0'):
+            dpkg_deb_args.append('--root-owner-group')
+        else:
+            dpkg_deb_args.insert(0, 'fakeroot')
 
         try:
             logger.info('generating package %s', package.name)
-            check_output(['fakeroot', 'dpkg-deb'] +
+            check_output(
                     dpkg_deb_args +
                     ['-b', 'DESTDIR', outfile],
                     cwd=per_package_dir)

-- 
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