[dpkg] 131/192: dpkg-buildpackage: Error out if --as-root is passed w/o --rules-target

Ximin Luo infinity0 at debian.org
Tue Oct 17 11:04:10 UTC 2017


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

infinity0 pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit 2ed19233dc9a6e123e3f66d3f475d65dc5933ea9
Author: Guillem Jover <guillem at debian.org>
Date:   Mon Sep 18 12:25:59 2017 +0200

    dpkg-buildpackage: Error out if --as-root is passed w/o --rules-target
---
 debian/changelog             | 2 ++
 scripts/dpkg-buildpackage.pl | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 13b81ea..8d996ab 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ dpkg (1.19.0) UNRELEASED; urgency=medium
     group for the control.tar entries to root:root, and making it possible to
     do the same for the data.tar entries via the new --root-owner-group option.
     Based on a patch by Niels Thykier <niels at thykier.net>. Closes: #291320
+  * Make dpkg-buildpackage error out if --as-root is passed without
+    --rules-target.
   * Perl modules:
     - Switch from Dpkg::Util to List::Util, now that the module in the
       new required Perl contains the needed functions.
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index bb750f0..9ff03b6 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -379,6 +379,11 @@ if (@rootcommand and not find_command($rootcommand[0])) {
     }
 }
 
+if ($call_target_as_root and @call_target == 0) {
+    error(g_('option %s is only meaningful with option %s'),
+          '--as-root', '--rules-target');
+}
+
 if ($check_command and not find_command($check_command)) {
     error(g_("check-command '%s' not found"), $check_command);
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list