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

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=eb4962aa352c92dda998fbef6ef48baec502232f

commit eb4962aa352c92dda998fbef6ef48baec502232f (HEAD -> main)
Author: Guillem Jover <[email protected]>
AuthorDate: Thu Jan 20 04:54:32 2022 +0100

    scripts: Unify deprecated command-line option warnings
---
 scripts/dpkg-buildpackage.pl | 6 +++---
 scripts/dpkg-genbuildinfo.pl | 4 ++--
 scripts/dpkg-gencontrol.pl   | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index eba46a190..8086bfbd3 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -272,9 +272,9 @@ while (@ARGV) {
        usageerr(g_('missing hook %s command'), $hook_name)
            if not defined $hook_cmd;
        $hook{$hook_name} = $hook_cmd;
-    } elsif (/^--buildinfo-id=.*$/) {
+    } elsif (/^(--buildinfo-id)=.*$/) {
        # Deprecated option
-       warning('--buildinfo-id is deprecated, it is without effect');
+       warning(g_('%s is deprecated; it is without effect'), $1);
     } elsif (/^(?:-p|--sign-command=)(.*)$/) {
        $signcommand = $1;
     } elsif (/^(?:-k|--sign-key=)(.*)$/) {
@@ -376,7 +376,7 @@ while (@ARGV) {
        $desc = $1;
     } elsif (m/^-[EW]$/) {
        # Deprecated option
-       warning(g_('-E and -W are deprecated, they are without effect'));
+       warning(g_('%s is deprecated; it is without effect'), $_);
     } elsif (/^-R(.*)$/ or /^--rules-file=(.*)$/) {
        my $arg = $1;
        @debian_rules = split ' ', $arg;
diff --git a/scripts/dpkg-genbuildinfo.pl b/scripts/dpkg-genbuildinfo.pl
index 9498451b0..e05fce048 100755
--- a/scripts/dpkg-genbuildinfo.pl
+++ b/scripts/dpkg-genbuildinfo.pl
@@ -324,9 +324,9 @@ while (@ARGV) {
         $stdout = 1;
     } elsif (m/^-O(.*)$/) {
         $outputfile = $1;
-    } elsif (m/^--buildinfo-id=.*$/) {
+    } elsif (m/^(--buildinfo-id)=.*$/) {
         # Deprecated option
-        warning('--buildinfo-id is deprecated, it is without effect');
+        warning(g_('%s is deprecated; it is without effect'), $1);
     } elsif (m/^--always-include-kernel$/) {
         $use_feature{kernel} = 1;
     } elsif (m/^--always-include-path$/) {
diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl
index dca5209f4..9753a4d9f 100755
--- a/scripts/dpkg-gencontrol.pl
+++ b/scripts/dpkg-gencontrol.pl
@@ -117,8 +117,8 @@ while (@ARGV) {
         $stdout= 1;
     } elsif (m/^-O(.+)$/) {
         $outputfile = $1;
-    } elsif (m/^-i([sp][sp]?)$/) {
-        warning(g_('-i%s is deprecated; it is without effect'), $1);
+    } elsif (m/^-i[sp][sp]?$/) {
+        warning(g_('%s is deprecated; it is without effect'), $_);
     } elsif (m/^-F([0-9a-z]+)$/) {
         $changelogformat=$1;
     } elsif (m/^-D([^\=:]+)[=:]/p) {

-- 
Dpkg.Org's dpkg

Reply via email to