Debian Bug report logs - #638679
[dh_python2] Please don't error out on unknown options

version graph

Package: python; Maintainer for python is Matthias Klose <doko@debian.org>; Source for python is src:python-defaults.

Reported by: Iain Lane <laney@debian.org>

Date: Sat, 20 Aug 2011 19:15:02 UTC

Severity: important

Found in version python-defaults/2.6.7-3

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, laney@debian.org, Matthias Klose <doko@debian.org>:
Bug#638679; Package python. (Sat, 20 Aug 2011 19:15:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Iain Lane <laney@debian.org>:
New Bug report received and forwarded. Copy sent to laney@debian.org, Matthias Klose <doko@debian.org>. (Sat, 20 Aug 2011 19:15:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Iain Lane <laney@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: [dh_python2] Please don't error out on unknown options
Date: Sat, 20 Aug 2011 20:08:20 +0100
Package: python
Version: 2.6.7-3
Severity: minor

Hi,

If I pass an unknown option to dh_python2, I get an error and a nonzero exit
code which fails the build:

,----
| laney@raleigh> DH_NO_ACT=1 dh_clean --foo; echo $?
| Unknown option: foo
| 0
| laney@raleigh> DH_NO_ACT=1 dh_python2 --foo; echo $?
| Usage: dh_python2 -p PACKAGE [-V [X.Y][-][A.B]] DIR [-X REGEXPR]
| 
| 
| dh_python2: error: no such option: --foo
| 2
`----

This is in contradiction to the guarantee given in debhelper(7) (which talks
about using DH_OPTIONS. I only gave an example without this for simplicity):

,----
| DH_OPTIONS
| 	Anything in this variable will be prepended to the command line arguments
|   of all debhelper commands. Command-specific options will be ignored by commands
|   that do not support them.
`----

It'd be nice if dh_python2 respected this.

Cheers,
Iain

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python depends on:
ii  python-minimal                2.6.7-3    minimal subset of the Python langu
ii  python2.6                     2.6.7-4    An interactive high-level object-o

python recommends no packages.

Versions of packages python suggests:
pn  python-doc                    <none>     (no description available)
pn  python-tk                     <none>     (no description available)

-- no debconf information




Severity set to 'important' from 'minor' Request was from Mathieu Malaterre <mathieu.malaterre@gmail.com> to control@bugs.debian.org. (Wed, 07 Sep 2011 10:30:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#638679; Package python. (Wed, 07 Sep 2011 15:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. Copy sent to Matthias Klose <doko@debian.org>. (Wed, 07 Sep 2011 15:00:03 GMT) Full text and rfc822 format available.

Message #12 received at 638679@bugs.debian.org (full text, mbox):

From: Joey Hess <joeyh@debian.org>
To: 638679@bugs.debian.org
Subject: please write debhelper commands using debhelper
Date: Wed, 7 Sep 2011 10:57:42 -0400
[Message part 1 (text/plain, inline)]
It's fundamentally a wrong choice to write a debhelper command that
re-implements Dh_Lib instead of using it. It requires you to constantly
play catchup, and means your users have to constantly deal with a poor
emulation. And I'll bet your command would not be 700 lines long if it
used the library (average debhelper command is 128 lines including man
page). A good way to handle this is to write a non-debhelper-specific
tool, with a proper, stable interface, containing all the interesting
stuff (in whatever language you want) and then letting a regular
debhelper command use that tool.

Regarding this bug report, debhelper commands should fail on unknown
options in v8 and above, but only warn about them in v7 and below.

dh_python2 and dh_python3 also don't handle -O properly, which makes it
impossible to pass options to them from dh.

And, they don't treat DH_OPTIONS specially; uknown options there
should always be only a warning.

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 23:21:50 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.