Debian Bug report logs - #629154
detect automatically when update-python-modules -p should be used

version graph

Package: python-support; Maintainer for python-support is Josselin Mouette <joss@debian.org>; Source for python-support is src:python-support.

Reported by: Jakub Wilk <jwilk@debian.org>

Date: Fri, 3 Jun 2011 23:45:02 UTC

Severity: wishlist

Found in version python-support/1.0.13

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, jwilk@debian.org, Josselin Mouette <joss@debian.org>:
Bug#629154; Package python-support. (Fri, 03 Jun 2011 23:45:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jakub Wilk <jwilk@debian.org>:
New Bug report received and forwarded. Copy sent to jwilk@debian.org, Josselin Mouette <joss@debian.org>. (Fri, 03 Jun 2011 23:45:05 GMT) Full text and rfc822 format available.

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

From: Jakub Wilk <jwilk@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: packages using python-support are configured before they are usable
Date: Sat, 4 Jun 2011 01:42:14 +0200
[Message part 1 (text/plain, inline)]
Package: python-support
Version: 1.0.13
Severity: serious

update-python-modules calls dpkg-trigger with --no-await option. This 
means that packages calling update-python-modules will be configured 
even before the trigger is run. However, this is wrong, because the 
trigger does an important thing: creates empty __init__.py. As such, 
some packages are unusable until the trigger is run.

I attached two dummy packages to illustrate the problem:
- foo ships a Python module and a script that uses this module. foo's 
modules are bytecompiled by python-support.
- bar depends on foo and uses the script provided by foo in its 
postinst, but is completely Python-agnostic.

Installing foo and bar together fails:

| # dpkg -i foo_1_all.deb bar_1_all.deb
| Selecting previously deselected package foo.
| (Reading database ... 14035 files and directories currently installed.)
| Unpacking foo (from foo_1_all.deb) ...
| Selecting previously deselected package bar.
| Unpacking bar (from bar_1_all.deb) ...
| Setting up foo (1) ...
| Setting up bar (1) ...
| Traceback (most recent call last):
|   File "/usr/bin/runfoo", line 2, in <module>
|     import foo
| ImportError: No module named foo
| dpkg: error processing bar (--install):
|  subprocess installed post-installation script returned error exit status 1
| Processing triggers for python-support ...
| Errors were encountered while processing:
|  bar

If I remove --no-await option, the packages can be successfully 
installed:

| # dpkg -i foo_1_all.deb bar_1_all.deb
| Selecting previously deselected package foo.
| (Reading database ... 14035 files and directories currently installed.)
| Unpacking foo (from foo_1_all.deb) ...
| Selecting previously deselected package bar.
| Unpacking bar (from bar_1_all.deb) ...
| Setting up foo (1) ...
| Processing triggers for python-support ...
| Setting up bar (1) ...

-- 
Jakub Wilk
[foo_1_all.deb (application/x-debian-package, attachment)]
[bar_1_all.deb (application/x-debian-package, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Josselin Mouette <joss@debian.org>:
Bug#629154; Package python-support. (Sat, 04 Jun 2011 00:57:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to 629154@bugs.debian.org:
Extra info received and forwarded to list. Copy sent to Josselin Mouette <joss@debian.org>. (Sat, 04 Jun 2011 00:57:07 GMT) Full text and rfc822 format available.

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

From: Josselin Mouette <joss@debian.org>
To: Jakub Wilk <jwilk@debian.org>, 629154@bugs.debian.org
Subject: Re: Bug#629154: packages using python-support are configured before they are usable
Date: Sat, 04 Jun 2011 02:55:37 +0200
[Message part 1 (text/plain, inline)]
Le samedi 04 juin 2011 à 01:42 +0200, Jakub Wilk a écrit : 
> Package: python-support
> Version: 1.0.13
> Severity: serious
> 
> update-python-modules calls dpkg-trigger with --no-await option. This 
> means that packages calling update-python-modules will be configured 
> even before the trigger is run. However, this is wrong, because the 
> trigger does an important thing: creates empty __init__.py. As such, 
> some packages are unusable until the trigger is run.

This is well-documented in README.Debian: such packages must use
update-python-modules -p before using the modules.

The problem without --no-await is that byte-compilation is a very slow
operation, and it would be run several times in each upgrade run.

> I attached two dummy packages to illustrate the problem:
> - foo ships a Python module and a script that uses this module. foo's 
> modules are bytecompiled by python-support.
> - bar depends on foo and uses the script provided by foo in its 
> postinst, but is completely Python-agnostic.
> 
> Installing foo and bar together fails:

Does it correspond to real-world use cases? If so, this might warrant
reconsidering, but since anyway python-support is going away I don’t
think anyone really cares.

Cheers,
-- 
 .''`.      Josselin Mouette
: :' :
`. `'
  `-
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Josselin Mouette <joss@debian.org>:
Bug#629154; Package python-support. (Sat, 16 Jun 2012 21:57:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arne Wichmann <aw@anhrefn.saar.de>:
Extra info received and forwarded to list. Copy sent to Josselin Mouette <joss@debian.org>. (Sat, 16 Jun 2012 21:57:05 GMT) Full text and rfc822 format available.

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

From: Arne Wichmann <aw@anhrefn.saar.de>
To: 629154@bugs.debian.org
Subject: Ping - packages using python-support are configured before they are usable
Date: Sat, 16 Jun 2012 23:52:01 +0200
[Message part 1 (text/plain, inline)]
Ok, this has now had time to be considered for a year - isn't it time to do
something about it?

cu

AW
-- 
[...] If you don't want to be restricted, don't agree to it. If you are
coerced, comply as much as you must to protect yourself, just don't support
it. Noone can free you but yourself. (crag, on Debian Planet)
Arne Wichmann (aw@linux.de)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Josselin Mouette <joss@debian.org>:
Bug#629154; Package python-support. (Sat, 08 Sep 2012 15:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marcin Owsiany <porridge@debian.org>:
Extra info received and forwarded to list. Copy sent to Josselin Mouette <joss@debian.org>. (Sat, 08 Sep 2012 15:33:03 GMT) Full text and rfc822 format available.

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

From: Marcin Owsiany <porridge@debian.org>
To: 629154@bugs.debian.org, Jakub Wilk <jwilk@debian.org>
Subject: Should this bug be downgraded?
Date: Sat, 8 Sep 2012 16:28:41 +0100
I'm looking at this bug as part of the BSP in Dublin, and I have a few
points:


It seems that python-support does support the correct behaviour, and
it's documented how to invoke it. It is the responsibility of the user
of this package (i.e. the maintainer of a package which build-depends on
python-support) to make sure the correct procedure is followed in
postinst.

It would be awesome if it would just DTRT every time out of the box, but
I guess there are valid reasons for it not to do it:
 - I suppose auto-detecting that "update-python-modules -p" should be
   run is non-trivial
 - just running it every time would have major effect on performance,
   and is only really needed in narrow use cases (judging by the lack of
   complaints from other package maintainers)

Thus it seems that the correct severity for this bug would be "wishlist"
rather than "serious".



Having said that, I must say I'm surprised that "python-support" is
going away, as it seems to be used by ~800 packages. Is there a
replacement? What is it?



Now for a minor nitpick: the issue is actually documented in README.gz,
not README.Debian

-- 
Marcin Owsiany <porridge@debian.org>             http://marcin.owsiany.pl/
GnuPG: 2048R/02F946FC  35E9 1344 9F77 5F43 13DD  6423 DBF4 80C6 02F9 46FC



Information stored :
Bug#629154; Package python-support. (Sat, 08 Sep 2012 19:03:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and filed, but not forwarded. (Sat, 08 Sep 2012 19:03:07 GMT) Full text and rfc822 format available.

Message #25 received at 629154-quiet@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Marcin Owsiany <porridge@debian.org>, 629154-quiet@bugs.debian.org
Subject: Re: Bug#629154: Should this bug be downgraded?
Date: Sat, 8 Sep 2012 20:58:37 +0200
[Message part 1 (text/plain, inline)]
On Sat, 08 Sep 2012 16:28:41 +0100, Marcin Owsiany wrote:

> Having said that, I must say I'm surprised that "python-support" is
> going away, as it seems to be used by ~800 packages. Is there a
> replacement? What is it?

http://wiki.debian.org/Python/PythonSupportToDHPython2

(And http://wiki.debian.org/Python/PyCentral2DhPython2 , and both
redirect to http://wiki.debian.org/Python/TransitionToDHPython2 )


Cheers,
gregor
 
-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Funny Van Dannen: Ein Herz
[signature.asc (application/pgp-signature, inline)]

Changed Bug title to 'detect automatically when update-python-modules -p should be used' from 'packages using python-support are configured before they are usable' Request was from Marcin Owsiany <porridge@debian.org> to control@bugs.debian.org. (Sat, 15 Sep 2012 13:30:02 GMT) Full text and rfc822 format available.

Severity set to 'wishlist' from 'serious' Request was from Marcin Owsiany <porridge@debian.org> to control@bugs.debian.org. (Sat, 15 Sep 2012 13:30:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Josselin Mouette <joss@debian.org>:
Bug#629154; Package python-support. (Sat, 15 Sep 2012 16:06:02 GMT) Full text and rfc822 format available.

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

From: Jakub Wilk <jwilk@debian.org>
To: 629154@bugs.debian.org
Subject: Re: retitle 629154 to detect automatically when update-python-modules -p should be used ...
Date: Sat, 15 Sep 2012 18:03:15 +0200
* Marcin Owsiany <porridge@debian.org>, 2012-09-15, 14:27:
>retitle 629154 detect automatically when update-python-modules -p should be used

This is nonsense.

-- 
Jakub Wilk



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 11:21:31 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.