Bug#683755: [Multiarch-devel] Updated multiarch patch for python2.7

2012-11-22 Thread Guillem Jover
Hi!

On Fri, 2012-09-14 at 17:13:09 +0300, Riku Voipio wrote:
 On Wed, Sep 12, 2012 at 05:58:22PM +0200, Jakub Wilk wrote:
  python2.7{,-minimal,-dbg} must not be Multi-Arch: foreign.
 
 I'll keep this now for my testings, it is trivial enough to remove
 when needed.

Just to clarify, the packages that end up shipping the interpreter
that has the dual role of loading script and dynamically linked
objects, should be M-A:allowed instead. Setting it to foreign will
allow to break the system when installing arch-dependent python
modules.

Thanks,
Guillem


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



Bug#683755: [Multiarch-devel] Updated multiarch patch for python2.7

2012-09-14 Thread Riku Voipio
On Wed, Sep 12, 2012 at 05:58:22PM +0200, Jakub Wilk wrote:
 + #endif
 ++#ifdef MULTIARCH
 ++{. MULTIARCH .so, rb, C_EXTENSION},
 ++#endif
 + {.so, rb, C_EXTENSION},
 + {module.so, rb, C_EXTENSION},
 + #endif
 
 What about loading extensions for the -dbg interpreter?

Added, although I'm not sure how interesting multiarch is for debug
packages.

 Python modules from the standard library are not byte-compiled anymore.

This affects speed rather than functionality, so will look at it later

 At least the following files (that are shipped in a M-A: same
 package) vary with architecture:

 /usr/lib/python2.7/lib-dynload/*_d.so
 /usr/lib/python2.7/_sysconfigdata_nd.py
 /usr/lib/python2.7/lib-dynload/_sysconfigdata.py

hopefully fixed

 /usr/lib/python2.7/lib2to3/*Grammar*.pickle

Seem to be only used by 2to3 app, so moved whole lib2to3 directory to python2.7 
package
 
 These are broken symlinks:
 
 /usr/lib/python2.7/config-*_d/libpython2.7_d.so
 /usr/lib/python2.7/config-*_d/libpython2.7.so
 /usr/lib/libpython2.7.a

fixed

 libpython2.7-{minimal,stdlib} don't ship any shared libraries, so
 Pre-Depends on multiarch-support shouldn't be needed.

dropped. 

 python2.7{,-minimal,-dbg} must not be Multi-Arch: foreign.

I'll keep this now for my testings, it is trivial enough to remove
when needed.

 Apparently the patch reopens #684612.

 argparse.egg-info should be in libpython2.7-stdlib, not in python2.7.

Changed

Since you clearly know more about python than I do, do you have good
ideas howto verify that everything still works now that all the files
have been moved around? Even better if you want to test and finish the
patch yourself ;)

Riku


diff -u python2.7-2.7.3/debian/control python2.7-2.7.3/debian/control
--- python2.7-2.7.3/debian/control
+++ python2.7-2.7.3/debian/control
@@ -23,36 +23,67 @@
 Package: python2.7
 Architecture: any
 Priority: optional
-Depends: python2.7-minimal (= ${binary:Version}), mime-support, ${shlibs:Depends}, ${misc:Depends}
+Depends: python2.7-minimal (= ${binary:Version}), libpython2.7-stdlib (= ${binary:Version}), mime-support, ${shlibs:Depends}, ${misc:Depends}
 Suggests: python2.7-doc, binutils
-Provides: python2.7-cjkcodecs, python2.7-ctypes, python2.7-elementtree, python2.7-celementtree, python2.7-wsgiref, python2.7-profiler, python2.7-argparse, python-argparse
 Conflicts: python-profiler (= 2.7.1-2)
 Breaks: python-virtualenv ( 1.7.1.2-2~), vim-nox ( 2:7.3.547-4), vim-gtk ( 2:7.3.547-4), vim-gnome ( 2:7.3.547-4), vim-athena ( 2:7.3.547-4)
 Replaces: python-profiler (= 2.7.1-2)
+Multi-Arch: foreign
+Description: Interactive high-level object-oriented language (version 2.7)
+ Version 2.7 of the high-level, interactive object oriented language,
+ includes an extensive class library with lots of goodies for
+ network programming, system administration, sounds and graphics.
+
+Package: libpython2.7-stdlib
+Architecture: any
+Multi-Arch: same
+Priority: optional
+Depends: libpython2.7-minimal (= ${binary:Version}), mime-support, ${shlibs:Depends}, ${misc:Depends}
+Suggests: python2.7-profiler
+Provides: python2.7-cjkcodecs, python2.7-ctypes, python2.7-elementtree, python2.7-celementtree, python2.7-wsgiref, python2.7-profiler, python2.7-argparse, python-argparse
+Replaces: python2.7 ( 2.7.3-6)
 Description: Interactive high-level object-oriented language (version 2.7)
  Version 2.7 of the high-level, interactive object oriented language,
  includes an extensive class library with lots of goodies for
  network programming, system administration, sounds and graphics.
+ .
+ This package contains the standard library. It is normally not
+ used on it's own, but as a dependency of python2.7.
 
 Package: python2.7-minimal
 Architecture: any
 Priority: optional
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: libpython2.7-minimal (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
 Recommends: python2.7
 Suggests: binfmt-support
 Replaces: python2.7 ( 2.7.1~rc1-2~)
 Conflicts: binfmt-support ( 1.1.2)
+Multi-Arch: foreign
 Description: Minimal subset of the Python language (version 2.7)
  This package contains the interpreter and some essential modules.  It can
  be used in the boot process for some basic tasks.
  See /usr/share/doc/python2.7-minimal/README.Debian for a list of the modules
  contained in this package.
 
+Package: libpython2.7-minimal
+Architecture: any
+Multi-Arch: same
+Priority: optional
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: libpython2.7-stdlib
+Replaces: python2.7 ( 2.7.1~rc1-2~), python2.7-minimal ( 2.7.3-6)
+Conflicts: binfmt-support ( 1.1.2)
+Description: Minimal subset of the Python language (version 2.7)
+ This package contains some essential modules. It is normally not
+ used on it's own, but as a dependency of python2.7-minimal.
+
 Package: libpython2.7
 Architecture: any
+Multi-Arch: same
 Section: libs
 Priority: optional
-Depends: python2.7 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: 

Bug#683755: [Multiarch-devel] Updated multiarch patch for python2.7

2012-09-12 Thread Jakub Wilk

* Riku Voipio riku.voi...@iki.fi, 2012-09-12, 13:54:

--- python2.7-2.7.3.orig/debian/libPVER-minimal.postinst.in
+++ python2.7-2.7.3/debian/libPVER-minimal.postinst.in
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+set -e
+
+if [ ! -f /etc/@PVER@/sitecustomize.py ]; then
+cat -EOF
+   # Empty sitecustomize.py to avoid a dangling symlink
+EOF
+fi


This looks broken. (Not a regression, just sayin'...)


+--- python-multiarch.orig/Python/dynload_shlib.c   2012-09-10 
08:41:17.0 +
 python-multiarch/Python/dynload_shlib.c2012-09-10 08:42:54.676828325 
+
+@@ -50,6 +50,9 @@
+ {_d.so, rb, C_EXTENSION},
+ {module_d.so, rb, C_EXTENSION},
+ #endif
++#ifdef MULTIARCH
++{. MULTIARCH .so, rb, C_EXTENSION},
++#endif
+ {.so, rb, C_EXTENSION},
+ {module.so, rb, C_EXTENSION},
+ #endif


What about loading extensions for the -dbg interpreter?

Python modules from the standard library are not byte-compiled anymore.

At least the following files (that are shipped in a M-A: same package) 
vary with architecture:


/usr/lib/python2.7/lib-dynload/*_d.so
/usr/lib/python2.7/_sysconfigdata_nd.py
/usr/lib/python2.7/lib2to3/*Grammar*.pickle
/usr/lib/python2.7/lib-dynload/_sysconfigdata.py

These are broken symlinks:

/usr/lib/python2.7/config-*_d/libpython2.7_d.so
/usr/lib/python2.7/config-*_d/libpython2.7.so
/usr/lib/libpython2.7.a

libpython2.7-{minimal,stdlib} don't ship any shared libraries, so 
Pre-Depends on multiarch-support shouldn't be needed.


python2.7{,-minimal,-dbg} must not be Multi-Arch: foreign.

Apparently the patch reopens #684612.

argparse.egg-info should be in libpython2.7-stdlib, not in python2.7.

Now that libpython2.7 doesn't depend on python2.7, Breaks on vim-* ( 
2:7.3.547-4) should be moved to the former package. (And who knows what 
else lack of this dependency will break...?)


--
Jakub Wilk


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



Bug#683755: [Multiarch-devel] Updated multiarch patch for python2.7

2012-09-12 Thread Matthias Klose
On 12.09.2012 17:58, Jakub Wilk wrote:
 Now that libpython2.7 doesn't depend on python2.7,

no, it never did this.


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