Bug#384189: python-gtk2: i can reproduce this bug

2006-09-12 Thread Steve Langasek
On Tue, Sep 12, 2006 at 07:45:10PM +0200, Josselin Mouette wrote:
> Le mardi 12 septembre 2006 à 10:16 +0200, Loïc Minier a écrit :
> >  That's the bulk of the problem; Josselin: I think the alternatives
> >  system doesn't offer any guarantee that any link will be touched, the
> >  symlink might not even exist.  Do you think we should consider
> >  upgrading existing installs with a diversion based system instead of
> >  the alternatives?  Or perhaps drop support for gtk1.2 via alternatives?

> I think we should entirely drop the alternatives, yes. How about the
> following plan?
>   * Remove the alternative in pygtk in favor of shipping pygtk
> in /usr/lib/python2.4, just like the rest of the package which
> isn't python-{support,central}ized.
>   * Just ship pygtk.py with the other files in python-gtk2, provided
> by python-support; introduce a conflict with the previous
> python-gtk-1.2 package to avoid upgrade issues.

> Because of the way sys.path works with .pth files, pygtk will always be
> imported from python-gtk2 first, if both packages are installed. This is
> a bit hackish, but it is only a temporary measure until we can remove
> python-gtk-1.2.

If you're confident that the path preferences are stable and will ensure
python-gtk2 is always found first when installed, this seems quite
reasonable to me, and not really hackish at all.  The current behavior in
contrast really is quite hackish, since as we discussed on IRC, the desired
behavior here never fell into the intended use of alternatives.

Cheers,
-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/



Bug#384189: python-gtk2: i can reproduce this bug

2006-09-12 Thread Josselin Mouette
Le mardi 12 septembre 2006 à 10:16 +0200, Loïc Minier a écrit :
>  That's the bulk of the problem; Josselin: I think the alternatives
>  system doesn't offer any guarantee that any link will be touched, the
>  symlink might not even exist.  Do you think we should consider
>  upgrading existing installs with a diversion based system instead of
>  the alternatives?  Or perhaps drop support for gtk1.2 via alternatives?

I think we should entirely drop the alternatives, yes. How about the
following plan?
  * Remove the alternative in pygtk in favor of shipping pygtk
in /usr/lib/python2.4, just like the rest of the package which
isn't python-{support,central}ized.
  * Just ship pygtk.py with the other files in python-gtk2, provided
by python-support; introduce a conflict with the previous
python-gtk-1.2 package to avoid upgrade issues.

Because of the way sys.path works with .pth files, pygtk will always be
imported from python-gtk2 first, if both packages are installed. This is
a bit hackish, but it is only a temporary measure until we can remove
python-gtk-1.2.
-- 
 .''`.   Josselin Mouette/\./\
: :' :   [EMAIL PROTECTED]
`. `'[EMAIL PROTECTED]
  `-  Debian GNU/Linux -- The power of freedom


signature.asc
Description: Ceci est une partie de message	numériquement signée


Bug#384189: python-gtk2: i can reproduce this bug

2006-09-12 Thread Loïc Minier
Hi,

On Mon, Sep 11, 2006, ilya margolin wrote:
> + update-alternatives --verbose --install 
> /usr/share/python-support/python-gtk python-gtk /usr/share/python-gtk-2.0 20
> Checking available versions of python-gtk, updating links in 
> /etc/alternatives ...
> (You may modify the symlinks there yourself if desired - see `man ln'.)
> Automatic updates of /etc/alternatives/python-gtk are disabled, leaving 
> it alone.
> To return to automatic updates use `update-alternatives --auto python-gtk'.

 That's the bulk of the problem; Josselin: I think the alternatives
 system doesn't offer any guarantee that any link will be touched, the
 symlink might not even exist.  Do you think we should consider
 upgrading existing installs with a diversion based system instead of
 the alternatives?  Or perhaps drop support for gtk1.2 via alternatives?


Bye,
-- 
Loïc Minier <[EMAIL PROTECTED]>



Bug#384189: python-gtk2: i can reproduce this bug

2006-09-12 Thread ilya margolin

Loïc Minier wrote:

reopen 384189
stop

On Mon, Sep 11, 2006, Ilya Margolin wrote:

/etc/alternatives/python-gtk points to /usr/share/python-gtk-2.0


 Thanks for the report, could you please report the output of:
file /usr/share/python-support/python-gtk


it is not there:

/usr/share/python-support/python-gtk: ERROR: cannot open 
`/usr/share/python-support/python-gtk' (No such file or directory)


ls -l /usr/share/python-support/ gives me
-rw-r--r-- 1 root root   18 Aug 10 11:20 gnome-doc-utils.dirs
drwxr-xr-x 2 root root 4096 Sep 11 17:02 python-gnupginterface
drwxr-xr-x 3 root root 4096 Sep 11 19:21 python-gtk2
drwxr-xr-x 2 root root 4096 Sep 10 18:48 python-libxml2
drwxr-xr-x 3 root root 4096 Sep 10 16:16 python-pyogg
drwxr-xr-x 2 root root 4096 Jul 16 06:26 python-pyvorbis
-rw-r--r-- 1 root root   33 Jun 18 14:19 python-support.dirs


i added more verbosity to postinst script:
# dpkg --configure python-gtk2
Setting up python-gtk2 (2.8.6-5) ...
+ rm -f '/usr/lib/python2.[34]/site-packages/pygtk.py[co]'
+ update-alternatives --verbose --install 
/usr/share/python-support/python-gtk python-gtk /usr/share/python-gtk-2.0 20
Checking available versions of python-gtk, updating links in 
/etc/alternatives ...

(You may modify the symlinks there yourself if desired - see `man ln'.)
Automatic updates of /etc/alternatives/python-gtk are disabled, leaving 
it alone.

To return to automatic updates use `update-alternatives --auto python-gtk'.
+ update-python-modules -v -i python-gtk
Traceback (most recent call last):
  File "/usr/sbin/update-python-modules", line 262, in ?
raise "%s does not exist"%arg
/usr/share/python-support/python-gtk does not exist
dpkg: error processing python-gtk2 (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 python-gtk2


sorry to disappoint you, but my results are not reliable anymore, i have 
tinkered with things i do not really understand.
these are steps i used to clean up the situation and reproduce error 
once again:


update-alternatives --remove-all python-gtk
rm -rf /usr/share/python-support/python-gtk*
dpkg -P --force-depends python-gtk2
cat /var/lib/dpkg/info/python-gtk2.list |xargs rm
rm -rf /usr/lib/python-support/python-gtk2 \
/usr/share/python-gtk-2.0 /usr/share/doc/python-gtk2\ 
/usr/share/python-support/python-gtk2

rm /var/lib/dpkg/info/python-gtk2.*
update-python-modules

and then,
apt-get install python-gtk2

this gives the same error as above, only not verbose

hope this helps,
ilya margolin




Bug#384189: python-gtk2: i can reproduce this bug

2006-09-11 Thread Loïc Minier
reopen 384189
stop

On Mon, Sep 11, 2006, Ilya Margolin wrote:
> /etc/alternatives/python-gtk points to /usr/share/python-gtk-2.0

 Thanks for the report, could you please report the output of:
file /usr/share/python-support/python-gtk

-- 
Loïc Minier <[EMAIL PROTECTED]>



Bug#384189: python-gtk2: i can reproduce this bug

2006-09-11 Thread Ilya Margolin
Package: python-gtk2
Version: 2.8.6-5
Followup-For: Bug #384189

i got this error when configuring python-gtk2:
(i have added "set -x" to /var/lib/dpkg/info/python-gtk2.postinst)
$ dpkg --configure python-gtk2

Setting up python-gtk2 (2.8.6-5) ...
+ rm -f '/usr/lib/python2.[34]/site-packages/pygtk.py[co]'
+ update-alternatives --install /usr/share/python-support/python-gtk
python-gtk /usr/share/python-gtk-2.0 20
+ update-python-modules -i python-gtk
Traceback (most recent call last):
  File "/usr/sbin/update-python-modules", line 262, in ?
  raise "%s does not exist"%arg
/usr/share/python-support/python-gtk does not exist
dpkg: error processing python-gtk2 (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 python-gtk2


/etc/alternatives/python-gtk points to /usr/share/python-gtk-2.0


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

Versions of packages python-gtk2 depends on:
ii  libatk1.0-0  1.12.1-1The ATK accessibility toolkit
ii  libc62.3.6.ds1-4 GNU C Library: Shared libraries
ii  libcairo21.2.4-1 The Cairo 2D vector graphics libra
ii  libfontconfig1   2.3.2-7 generic font configuration library
ii  libglib2.0-0 2.10.3-3The GLib library of C routines
ii  libgtk2.0-0  2.8.20-1The GTK+ graphical user interface 
ii  libpango1.0-01.12.3-1+b1 Layout and rendering of internatio
ii  libx11-6 2:1.0.0-8   X11 client-side library
ii  libxcursor1  1.1.5.2-5   X cursor management library
ii  libxext6 1:1.0.1-2   X11 miscellaneous extension librar
ii  libxfixes3   1:3.0.1.2-4 X11 miscellaneous 'fixes' extensio
ii  libxi6   1:1.0.1-3   X11 Input extension library
ii  libxinerama1 1:1.0.1-4.1 X11 Xinerama extension library
ii  libxrandr2   2:1.1.0.2-4 X11 RandR extension library
ii  libxrender1  1:0.9.0.2-4 X Rendering Extension client libra
ii  python   2.4.3-11An interactive high-level object-o
ii  python-cairo 1.2.0-1 Python bindings for the Cairo vect
ii  python-numeric   24.2-6  Numerical (matrix-oriented) Mathem
ii  python-support   0.4.3   automated rebuilding support for p

python-gtk2 recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]