Bug#539187: Patch is broken - packaging is too

2009-12-04 Thread Josselin Mouette
reassign 539187 python-support 
thanks

Le jeudi 03 décembre 2009 à 19:33 +, David Claughton a écrit : 
> Specifically, prior to the call to dh_pysupport 'site-packages' contains
> the following files (I've removed the cruft from the ls -l output for
> clarity) ...
> 
> -rw-r--r--  gv.py
> lrwxrwxrwx  _gv.so -> libgv_python25.so
> -rw-r--r--  libgv_python25.so

> After dh_pysupport is called, 'pyshared' has the following ...
> 
> lrwxrwxrwx  _gv.so -> ../../python2.5/site-packages/libgv_python25.so
> -rw-r--r--  libgv_python25.so

Ah indeed. I was convinced this case was already handled, apparently it
is not, and (more surprising) this is the first package to stumble on
it.

It is a new bug in python-support 1.x. I hope not too many packages are
affected.

Cheers, 
-- 
 .''`.  Josselin Mouette
: :' :
`. `'   “I recommend you to learn English in hope that you in
  `- future understand things”  -- Jörg Schilling


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


Bug#539187: Patch is broken - packaging is too

2009-12-03 Thread David Claughton
Josselin Mouette wrote:
> Furthermore, it is not the role of dh_pysupport to fix broken symbolic
> links. 

Hi Josselin,

I think maybe I wasn't clear enough about the problem - I'm not
suggesting dh_pysupport should fix a broken symlink - I'm suggesting it
breaks a symlink that wasn't broken before :-)

Specifically, prior to the call to dh_pysupport 'site-packages' contains
the following files (I've removed the cruft from the ls -l output for
clarity) ...

$ pwd
/home/david/src/graphviz-2.24.0/debian/libgv-python/usr/lib/python2.5/site-packages
$ ls -l
-rw-r--r--  gv.py
lrwxrwxrwx  _gv.so -> libgv_python25.so
-rw-r--r--  libgv_python25.so

After dh_pysupport is called, 'pyshared' has the following ...

$ pwd
/home/david/src/graphviz-2.24.0/debian/libgv-python/usr/lib/pyshared/python2.5

$ ls -l
lrwxrwxrwx  _gv.so -> ../../python2.5/site-packages/libgv_python25.so
-rw-r--r--  libgv_python25.so

In other words, dh_pysupport moves the '_gv.so' link and adjusts it so
it continues to point to 'libgv_python25.so' in site_packages.  However
it then proceeds to also move 'libgv_python25.so' to pyshared and this
breaks the link.

The intent of my patch is to check if the link destination is in the
same directory as the link (i.e. both in site_packages) and just do a
plain 'os.renames' on the link if it is, on the assumption that the link
destination will also be moved and will end up in the same directory
under pyshared.

I don't quite see how running dh_link before dh_pysupport will help here
... I suppose I could delete the link prior to calling dh_pysupport and
then recreate it with dh_link in all the pyshared/python2.X directories
afterwards ... but it just seems to me that this is something that
dh_pysupport should be able to do for me, and of course it worked prior
to the introduction of the 'rename_subtle' function (in 1.0.3 I think)

> Also note that the package should be named python-gv instead.

Well it's not my package - although I have expressed an interest in
adopting it, which is why I thought I'd have a poke at the bug reports...

If I end up taking it on, I'll look into renaming it ;-)

Cheers,

David.




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#539187: Patch is broken - packaging is too

2009-12-03 Thread Josselin Mouette
tag 539187 - patch
reassign 539187 libgv-python
thanks

The proposed patch will completely break some other packages, and only
works for libgv-python by coincidence. Please don’t commit this.

Furthermore, it is not the role of dh_pysupport to fix broken symbolic
links. We have a tool for that, it’s named dh_link. The documentation
mentions to call dh_pysupport just before dh_installdeb, and yes, that
means after dh_link. Maybe I should mention this explicitly.

In this case, inverting the dh_pysupport and dh_link calls should fix
the issue.

Also note that the package should be named python-gv instead.

Cheers, 
-- 
 .''`.  Josselin Mouette
: :' :
`. `'   “I recommend you to learn English in hope that you in
  `- future understand things”  -- Jörg Schilling


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