Debian Bug report logs - #400001
python-support should warn and not fail when some files can't be byte-compiled

version graph

Package: python-support; Maintainer for python-support is Josselin Mouette <joss@debian.org>; Source for python-support is src:python-support (PTS, buildd, popcon).

Reported by: Alex Kuklin <alexkuklin@asou.ru>

Date: Wed, 15 Nov 2006 13:48:10 UTC

Severity: serious

Tags: patch

Found in version 0.5.5

Fixed in version python-support/0.5.6

Done: Josselin Mouette <joss@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Mailman for Debian <pkg-mailman-hackers@lists.alioth.debian.org>:
Bug#398771; Package mailman. (full text, mbox, link).


Acknowledgement sent to Alex Kuklin <alexkuklin@asou.ru>:
New Bug report received and forwarded. Copy sent to Mailman for Debian <pkg-mailman-hackers@lists.alioth.debian.org>. (full text, mbox, link).


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

From: Alex Kuklin <alexkuklin@asou.ru>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: installing mailman with python 2.3 causes loop condition during python upgrade
Date: Wed, 15 Nov 2006 16:44:09 +0300
Package: mailman
Version: 1:2.1.9-2
Severity: important

Configuring python (2.4.4-1) ...
running python rtupdate hooks for python2.4...
Traceback (most recent call last):
  File "/usr/sbin/update-python-modules", line 268, in ?
    bytecompile_privatedir(basedir)
  File "/usr/sbin/update-python-modules", line 205, in bytecompile_privatedir
    process(basedir,bytecompile_only)
  File "/usr/sbin/update-python-modules", line 154, in process
    func(basedir, dir, file)
  File "/usr/sbin/update-python-modules", line 90, in bytecompile_only
    compile(fullpath)
  File "/usr/lib/python2.4/py_compile.py", line 115, in compile
    f = open(file, 'U')
IOError: [Errno 2] No such file or directory: '/usr/lib/mailman/Mailman/mm_cfg.py'
error running python rtupdate hook python-support

Removing mailman allows python to be configured correctly.
Mailman may be successfully installed then.


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-2-686
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)

Versions of packages mailman depends on:
ii  adduser                       3.87       Add and remove users and groups
ii  apache2                       2.2.3-3.1  Next generation, scalable, extenda
ii  apache2-mpm-worker [httpd]    2.2.3-3.1  High speed threaded model for Apac
ii  cron                          3.0pl1-94  management of regular background p
ii  debconf [debconf-2.0]         1.5.1      Debian configuration management sy
ii  libc6                         2.3.6-13   GNU C Library: Shared libraries
ii  logrotate                     3.7.1-3    Log rotation utility
ii  lsb-base                      3.1-10     Linux Standard Base 3.1 init scrip
ii  postfix [mail-transport-agent 2.2.10-2   A high-performance mail transport 
ii  pwgen                         2.05-1     Automatic Password generation
ii  python                        2.4.4-1    An interactive high-level object-o
ii  python-support                0.5.4      automated rebuilding support for p
ii  ucf                           2.0010     Update Configuration File: preserv

mailman recommends no packages.

-- debconf information:
  mailman/queue_files_present:
  mailman/default_server_language: en
  mailman/gate_news: false
  mailman/site_languages: en
* mailman/used_languages:
* mailman/create_site_list:



Information forwarded to debian-bugs-dist@lists.debian.org, Mailman for Debian <pkg-mailman-hackers@lists.alioth.debian.org>:
Bug#398771; Package mailman. (full text, mbox, link).


Acknowledgement sent to Lionel Elie Mamane <lionel@mamane.lu>:
Extra info received and forwarded to list. Copy sent to Mailman for Debian <pkg-mailman-hackers@lists.alioth.debian.org>. (full text, mbox, link).


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

From: Lionel Elie Mamane <lionel@mamane.lu>
To: Alex Kuklin <alexkuklin@asou.ru>, 398771@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Bug#398771: installing mailman with python 2.3 causes loop condition during python upgrade
Date: Thu, 16 Nov 2006 14:13:47 +0100
severity 398771 serious
thanks

This bug, in my opinion, makes the package unsuitable for release with
etch. It breaks upgrades from sarge to etch, if I understand well.

There is probably verbiage in the policy / RC policy to support that,
but I'm too lazy to dig it out.

On Wed, Nov 15, 2006 at 04:44:09PM +0300, Alex Kuklin wrote:

> Configuring python (2.4.4-1) ...
> running python rtupdate hooks for python2.4...
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/py_compile.py", line 115, in compile
>     f = open(file, 'U')
> IOError: [Errno 2] No such file or directory: '/usr/lib/mailman/Mailman/mm_cfg.py'
> error running python rtupdate hook python-support

That file usually is a symlink to /etc/mailman/mm_cfg.py, a
configuration file. I'm not terribly convinced it should be compiled
at all, actually. It is a bug for it to be compiled unless it is
*automatically* read from source when the source is newer than the
compiled version. Any python expert could tell me whether it is the
case?

Alex, you did have the file /etc/mailman/mm_cfg.py, right?

-- 
Lionel



Severity set to `serious' from `important' Request was from Lionel Elie Mamane <lionel@mamane.lu> to control@bugs.debian.org. (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Mailman for Debian <pkg-mailman-hackers@lists.alioth.debian.org>:
Bug#398771; Package mailman. (full text, mbox, link).


Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Mailman for Debian <pkg-mailman-hackers@lists.alioth.debian.org>. (full text, mbox, link).


Message #17 received at 398771@bugs.debian.org (full text, mbox, reply):

From: Raphael Hertzog <hertzog@debian.org>
To: Lionel Elie Mamane <lionel@mamane.lu>
Cc: Alex Kuklin <alexkuklin@asou.ru>, 398771@bugs.debian.org
Subject: Re: Bug#398771: installing mailman with python 2.3 causes loop condition during python upgrade
Date: Thu, 23 Nov 2006 12:42:10 +0100
clone 398771 -1
reassign -1 python-support 0.5.5
retitle -1 python-support should warn and not fail when some files can't be byte-compiled
thanks

On Thu, 16 Nov 2006, Lionel Elie Mamane wrote:
> This bug, in my opinion, makes the package unsuitable for release with
> etch. It breaks upgrades from sarge to etch, if I understand well.

The bug is both in python-support and in mailman.

Python-support shouldn't fail when some files can't be byte-compiled but
just warn the user that something is not 100% normal. It looks like wrong
to make the installation of python2.4 fail when just one module is
kind of broken. Thus the clone and reassign.

> That file usually is a symlink to /etc/mailman/mm_cfg.py, a
> configuration file. I'm not terribly convinced it should be compiled
> at all, actually. It is a bug for it to be compiled unless it is
> *automatically* read from source when the source is newer than the
> compiled version. Any python expert could tell me whether it is the
> case?
> 
> Alex, you did have the file /etc/mailman/mm_cfg.py, right?

At least the file doesn't exist when python2.4 got installed. If the
mailman upgrade make the file disappear then this is the RC bug. But since
it's a configuration file, it might also be that the user removed it
manually and it doesn't get reinstalled because of dpkg's conffile
handling.

Unless someone comes up with evidence that the file gets removed during a
normal upgrade I don't think that this bug is RC. That said I haven't
tried the upgrade myself and someone should do that since the bug reporter
hasn't confirmed/denied yet. Alex ?

Cheers,
-- 
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/



Bug 398771 cloned as bug 400001. Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Bug reassigned from package `mailman' to `python-support'. Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Changed Bug title. Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Josselin Mouette <joss@debian.org>:
Bug#400001; Package python-support. (full text, mbox, link).


Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Josselin Mouette <joss@debian.org>. (full text, mbox, link).


Message #28 received at 400001@bugs.debian.org (full text, mbox, reply):

From: Raphael Hertzog <hertzog@debian.org>
To: 400001@bugs.debian.org
Subject: python-support: possible patch
Date: Thu, 23 Nov 2006 14:40:23 +0100
[Message part 1 (text/plain, inline)]
tags 400001 + patch
thanks

Hi,

Attached is a possible patch to fix this issue. I tested it here by
creating an error in a private module:
$ sudo /var/lib/dpkg/info/linda.postinst configure
WARNING: compile error while trying to byte-compile /usr/share/linda/checks/shebang.py:   File "/usr/share/linda/checks/shebang.py", line 4
    ; + beur
    ^
SyntaxError: invalid syntax

(sid) rhertzog@rivendell:~/local/debian$ echo $?
0

Note however that the problem only existed with private modules since the
public modules are byte-compiled by compile_all which is spawned as a
separate process and whose return value we don't check. However the process
displays similar warnings.

For consistency of output I decided to ask compile() to raise an exception but
in fact it's not really needed. I could have checked only the IOError
exception (or only the generic one).

Feel free to adapt to suit your needs.

Cheers,
-- 
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/
[python-support-0.5.6-nmu.diff (text/plain, attachment)]

Tags added: patch Request was from Raphael Hertzog <hertzog@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Tags added: pending Request was from Josselin Mouette <joss@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Reply sent to Josselin Mouette <joss@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Alex Kuklin <alexkuklin@asou.ru>:
Bug acknowledged by developer. (full text, mbox, link).


Message #37 received at 400001-close@bugs.debian.org (full text, mbox, reply):

From: Josselin Mouette <joss@debian.org>
To: 400001-close@bugs.debian.org
Subject: Bug#400001: fixed in python-support 0.5.6
Date: Thu, 23 Nov 2006 22:02:10 +0000
Source: python-support
Source-Version: 0.5.6

We believe that the bug you reported is fixed in the latest version of
python-support, which is due to be installed in the Debian FTP archive:

python-support_0.5.6.dsc
  to pool/main/p/python-support/python-support_0.5.6.dsc
python-support_0.5.6.tar.gz
  to pool/main/p/python-support/python-support_0.5.6.tar.gz
python-support_0.5.6_all.deb
  to pool/main/p/python-support/python-support_0.5.6_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 400001@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Josselin Mouette <joss@debian.org> (supplier of updated python-support package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu, 23 Nov 2006 22:34:58 +0100
Source: python-support
Binary: python-support
Architecture: source all
Version: 0.5.6
Distribution: unstable
Urgency: medium
Maintainer: Josselin Mouette <joss@debian.org>
Changed-By: Josselin Mouette <joss@debian.org>
Description: 
 python-support - automated rebuilding support for python modules
Closes: 400001
Changes: 
 python-support (0.5.6) unstable; urgency=medium
 .
   * pysupport-parseversions, dh_pysupport: remove the remaining calls to
     pyversions, thanks Pawel Tecza.
   * This allows to loosen dependencies on python to 2.3.
   * update-python-modules: only show a warning when byte-compilation
     fails, but don't stop the whole process, thanks Raphaël Hertzog
     (closes: #400001).
   * pysupport-parseversions: fix parsing of XS-Python-Version field.
Files: 
 63df64319badc13125733f94e94cda74 553 python optional python-support_0.5.6.dsc
 e11d183165dc7404d4fdaab3fe34e31f 26796 python optional python-support_0.5.6.tar.gz
 8a27035e64e90631930cef2302905c6a 23854 python optional python-support_0.5.6_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFZhY6rSla4ddfhTMRAqGwAJ9uWtomHIEjHGoX1Gdpv5rSwXWdgwCgoA/j
qodj1aHsminocKdZzDxsLMA=
=Z4iB
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 24 Jun 2007 08:37:53 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Jan 5 19:28:45 2018; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.