Article View: linux.debian.maint.dpkg
Article #11Bug#1061450: dpkg-dev: Please add bash completion for dpkg-buildpackage
From: Cheng Li
Date: Tue, 03 Nov 2026 08:50
Date: Tue, 03 Nov 2026 08:50
45 lines
5113 bytes
5113 bytes
Hi Guillem, Here is v2 of the series. It no longer contains the --sign-pause fix, since you have merged that locally already. Patch 1/2 is new (the .gitignore change), and patch 2/2 is the updated completion file. > But it seems some of my changes complement some of yours. So it would > make sense if you adopted some of those into your patch? I fetched your pu/bash-completions branch (4198c5e9b) and compared it with mine. I adopted your approach of completing --sign-command with a curated list: mine used _comp_compgen_commands, which expands to 7024 entries here, so it was not usable interactively. My values differ from yours in two ways. First, neither auto nor none is offered, as dpkg-buildpackage validates the value with find_command() before it reaches the backend (scripts/dpkg-buildpackage.pl:674), so both error out with "sign-command 'auto' not found". Second, the *v commands (sqopv, rsopv, sqv, gpgv-sq and gpgv) are the verification commands (DEFAULT_CMDV), rather than the signing ones. The final list is the DEFAULT_CMD of each supported backend, in the backend preference order from dpkg-buildpackage(1). I did not adopt -x dpkg_architecture, because the xfunc is defined in the dpkg-architecture completion file, which is not in main yet; adding it now makes --host-arch complete nothing. I will switch to it once that file lands. > Right, it looks I was also bothered by this, and ended up adding negated > entries (in a commit in that branch). But I think I do prefer your > proposed fix better. So feel free to provide a patch for that. Patch 1/2 does this. It anchors every entry in scripts/, src/, dselect/ and utils/, which are the four directories containing a completion/bash/ subdirectory. Once it is applied, the negated entries you added in 3c498a0c3 will no longer be needed. > Nice catch as well. I was curious whether the current completion files > were fine, so added this locally now (with attribution), and fixed a > couple of issues with the dpkg-deb completion. Thank you, both for adding the test and for the attribution. Best regards, Cheng Li
Technical Details
Message-ID:
<NVinn-9zqs-3@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.twilightnode.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!bofh.it!news.nic.it!robomodReferences:
<NUnfr-93Yz-1@gated-at.bofh.it> <HZQX0-5jPa-15@gated-at.bofh.it> <NUnfr-93Yz-1@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.twilightnode.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!bofh.it!news.nic.it!robomod
From: Cheng Li <shiptux@gmail.com>
Newsgroups: linux.debian.bugs.dist,linux.debian.maint.dpkg
Subject: Bug#1061450: dpkg-dev: Please add bash completion for dpkg-buildpackage
Date: Tue, 03 Nov 2026 09:50:01 +0100
Message-ID: <NVinn-9zqs-3@gated-at.bofh.it>
References: <NUnfr-93Yz-1@gated-at.bofh.it> <HZQX0-5jPa-15@gated-at.bofh.it> <NUnfr-93Yz-1@gated-at.bofh.it>
X-Original-To: 1061450@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Tue Nov 3 08:41:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -0.547
Reply-To: Cheng Li <shiptux@gmail.com>, 1061450@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-dpkg@lists.debian.org
X-Debian-Pr-Message: followup 1061450
X-Debian-Pr-Package: dpkg-dev
X-Debian-Pr-Keywords: patch newcomer
X-Debian-Pr-Source: dpkg
X-Gm-Message-State: APuU4Z/1lWvwKwsufAx2eyJeo1/sZqPjlUUwDdTuGKspww9lnauHiwh8
iF2ecTkpGdC866pavZl9tGlSXC9nDU35FiTofjGjaEqAutUW6LHglKFfDCHkHHG1
X-Gm-Gg: AYBFou327NZ/VGAtd8E7enaPV03wyZCW32oH9G8sAXaFv83oqjTvhKeQ8awy1lzxwS5
CRQAZ52fcK/gLA1s2OCnyjnlvd1TJKBPG3L2p1JDd7qqbwfq56RBPd8p8CPwsmfK1fvFhKvq6Mt
hNoJ3S5QSUsRQcx9UoDwe2RCgO2isQxEiEbtLJlbP2x1s/YsiQ/jkdTqADg8JGyKc34vtqoY8oH
2iQ+aRw/RLKLhgrdM9TpJcsTDZq3TNh5fjsW/etrl+xKqZljaTZzrQWPao+x4vsk1udCc9Yyb69
qf/xTRzsIVpye5S+JiB6FrC5djrLkJPx3kthE2KqbFWJ85jkv84ZvzljG7+o+cx8tHspL9+epjS
USiixFV1UBflJg2w/cGB3LY4SYFPVRm+2skFfFW4uRvfm5IgdrpAQDXqdxPwiAqcYTLkxnkIRBu
b98V30bBP0sIFOL3B4HVT04cv+f8yc7jxf1qcQnDaKXeCLCJqV3blDTZ4SSVhN8VjjLaStWT62s
pFaRq4Bwni+iaxVD/oTvM3bVhwUyFy7gOnYLoRnt9olDDeAK4WDPUaHpMayU4gfoQjnXK66Yrdw
af6wnnW6ot6E52IxbHcpmu+f+pbvASQc3yvjmM+3Mc3GTvk/O+sPZhR+VVqLcxvk2H8JQlIVmHo
g5ag92aGX
X-Received: by 2002:a17:90b:3b51:b0:3ac:450b:164c with SMTP id 98e67ed59e1d1-3ae89831c86mr11595736a91.47.1793695123928;
Tue, 03 Nov 2026 00:38:43 -0800 (PST)
X-Mailer: git-send-email 2.47.3
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2000370
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 45
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: Guillem Jover <guillem@debian.org>
X-Original-Date: Tue, 3 Nov 2026 17:38:37 +0900
X-Original-Message-ID: <20261103083839.1737133-1-shiptux@gmail.com>
X-Original-References: <auZEc9gZS01yWzHJ@thunder.hadrons.org> <170612389523.16223.12946706258590361740.reportbug@ag474u.eng.vyatta.net> <auZEc9gZS01yWzHJ@thunder.hadrons.org>