Hello, Am Donnerstag, 15. August 2013 schrieb Sascha Peilicke:
On 08/15/2013 03:47 PM, Claudio Freire wrote:
On Thu, Aug 15, 2013 at 10:15 AM, Sascha Peilicke wrote:
On 08/15/2013 02:16 PM, Christian Boltz wrote:
Are there plans to make the /usr/bin/python symlink managed with update- alternatives? If yes, this will open an interesting can of worms ;-)>> I'm a bit surprised this isn't the case already.
So I'm gonna fix this ASAP :-)
I'm not sure if this is a good idea, see below for details.
In fact, I'm not a big fan of using alternatives. Both versions aren't so easily switchable. I happen to agree with the can of worms thing. The only thing needing u-a is the /usr/bin/python binary (and probably the man-page). Of course we ship a lot of Python software with she-banks like "#!/usr/bin/python" or "#!/usr/bin/env" python. Whenever one of those just accepts one specific major version, it needs adjustment.
So I would like to u-a the "python" and "python3" package with the latter having a higher priority (thus being the default). Software that insists on the old Python-2.7 can be fixed to use #!/usr/bin/python2 instead. On the other hand, most upstream codebases actually run on both, so it's not going to be a big issue.
Let me explain what I meant with "interesting can of worms" ;-) The biggest "worm" are dependencies: Assume a package currently comes with Requires: python-whatever because a python script in this package contains import whatever For python3, you'll instead need Requires: python3-whatever (Of course, py2 won't find installed py3 modules, and py3 won't find installed py2 modules because they are installed in different paths.) Now tell me which Requires: line I have to write in the spec when the user can easily change the python version behind my back (and without telling the package manager)... Hint: the only guaranteed working option is to add py2 _and_ py3 requires, but I doubt this is what we want ;-)
Let me step back a bit from technical details. At some point we have to make Python3 the default. Some bumps are expected while doing so. Now is the right time to do it.
I'd say the dependencies are a quite big bump ;-) BTW: for AppArmor, I think I have a decision: I'll create only py3 packages for the libapparmor bindings. Well, there's an exception: for 12.2, I have to create a py2 package because swig is broken for py3 there [1] and I somehow ;-) doubt someone wants to fix swig on 12.2 (tell me if I'm wrong ;-) Regards, Christian Boltz [1] probably http://sourceforge.net/p/swig/bugs/1257/ -- Die Signatur will nicht angezeigt werden. Die gewuenschte Signatur ist zur Zeit nicht verfuegbar. Moeglicherweise ist sie gerade im Urlaub oder hat einfach keine Lust angezeigt zu werden. Oder wollen Sie staendig beobachtet werden? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org