Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#34133 closed defect (fixed)

zeroinstall-injector: 0publish still trying to use python 2.7

Reported by: dave@… Owned by: afb@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: zeroinstall-injector

Description (last modified by afb@…)

pluto:~/src/boost/svn/trunk dave% clear
pluto:~/src/boost/svn/trunk dave% 0launch -c -vv http://0install.net/2006/interfaces/0publish
INFO:root:Running 0launch 1.7 ['http://0install.net/2006/interfaces/0publish']; Python 2.6.8 (unknown, Apr 15 2012, 02:01:29) 
[GCC 4.2.1 Compatible Apple Clang 3.0 (tags/Apple/clang-211.10.1)]
INFO:root:Loading configuration from /Users/dave/.config/0install.net/injector/global
DEBUG:root:Loading cached information for http://0install.net/2006/interfaces/0publish from /Users/dave/.cache/0install.net/interfaces/http%3a%2f%2f0install.net%2f2006%2finterfaces%2f0publish
DEBUG:root:Supported systems: '{None: 3, 'MacOSX': 1, 'Darwin': 2}'
DEBUG:root:Supported processors: '{'x86_64': 0, 'i586': 2, 'i486': 3, 'i686': 1, 'i386': 4, None: 5}'
DEBUG:root:Initialising new interface object for http://0install.net/2006/interfaces/0publish
DEBUG:root:Loading cached information for http://0install.net/2006/interfaces/0publish from /Users/dave/.cache/0install.net/interfaces/http%3a%2f%2f0install.net%2f2006%2finterfaces%2f0publish
DEBUG:root:Processing feed http://0install.net/2006/interfaces/0publish
DEBUG:root:Location of 'implementation-dirs' config file being used: 'None'
DEBUG:root:Added system store '/var/cache/0install.net/implementations'
DEBUG:root:Considering command dependency <Dependency on http://0install.net/2007/interfaces/ZeroInstall.xml; bindings: [<environ PYTHONPATH prepend  None>][]>
DEBUG:root:Initialising new interface object for http://0install.net/2007/interfaces/ZeroInstall.xml
DEBUG:root:Loading cached information for http://0install.net/2007/interfaces/ZeroInstall.xml from /Users/dave/.cache/0install.net/interfaces/http%3a%2f%2f0install.net%2f2007%2finterfaces%2fZeroInstall.xml
DEBUG:root:Processing feed http://0install.net/2007/interfaces/ZeroInstall.xml
DEBUG:root:Considering command dependency <Dependency on http://repo.roscidus.com/python/python; bindings: [][<zeroinstall.injector.model.VersionRangeRestriction object at 0x10d7e8290>]>
DEBUG:root:Initialising new interface object for http://repo.roscidus.com/python/python
DEBUG:root:Loading cached information for http://repo.roscidus.com/python/python from /Users/dave/.cache/0install.net/interfaces/http%3a%2f%2frepo.roscidus.com%2fpython%2fpython
DEBUG:root:Processing feed http://repo.roscidus.com/python/python
DEBUG:root:Ignoring user-override for unknown implementation package:macports:python26:2.6.7-4:* in <Feed distribution:http://repo.roscidus.com/python/python>
DEBUG:root:Skipping '<Feed from http://0install.de/feeds/Python.xml>'; unsupported architecture Windows-None
DEBUG:root:Processing feed http://repo.roscidus.com/python/python/upstream.xml
DEBUG:root:Loading cached information for http://repo.roscidus.com/python/python/upstream.xml from /Users/dave/.cache/0install.net/interfaces/http%3a%2f%2frepo.roscidus.com%2fpython%2fpython%2fupstream.xml
DEBUG:root:Is feed-for http://repo.roscidus.com/python/python
DEBUG:root:Considering command dependency <Dependency on http://repo.roscidus.com/python/python; bindings: [][<zeroinstall.injector.model.VersionRangeRestriction object at 0x10d7e8290>]>
DEBUG:root:Considering command dependency <Dependency on http://repo.roscidus.com/python/python; bindings: [][<zeroinstall.injector.model.VersionRangeRestriction object at 0x10d7e8290>]>
DEBUG:root:Considering command dependency <Dependency on http://repo.roscidus.com/python/python; bindings: [][<zeroinstall.injector.model.VersionRangeRestriction object at 0x10d7e8290>]>
DEBUG:root:Considering command dependency <Dependency on http://repo.roscidus.com/python/python; bindings: [][<zeroinstall.injector.model.VersionRangeRestriction object at 0x10d7e8290>]>
DEBUG:root:Considering command dependency <Dependency on http://repo.roscidus.com/python/python; bindings: [][<zeroinstall.injector.model.VersionRangeRestriction object at 0x10d7e8290>]>
DEBUG:root:Considering command dependency <Dependency on http://repo.roscidus.com/python/python; bindings: [][<zeroinstall.injector.model.VersionRangeRestriction object at 0x10d7e8290>]>
DEBUG:root:Considering command dependency <Dependency on http://repo.roscidus.com/python/python; bindings: [][<zeroinstall.injector.model.VersionRangeRestriction object at 0x10d7e8290>]>
DEBUG:root:Considering command dependency <Dependency on http://0install.net/2007/interfaces/ZeroInstall.xml; bindings: [<environ PYTHONPATH prepend  None>][]>
DEBUG:root:Considering command dependency <Dependency on http://repo.roscidus.com/python/python; bindings: [][<zeroinstall.injector.model.VersionRangeRestriction object at 0x10d865850>]>
DEBUG:root:Staleness for <Feed http://repo.roscidus.com/python/python> is 0.03 hours
DEBUG:root:Staleness for <Feed http://0install.net/2006/interfaces/0publish> is 0.03 hours
DEBUG:root:Staleness for <Feed http://0install.net/2007/interfaces/ZeroInstall.xml> is 0.03 hours
DEBUG:root:Staleness for <Feed http://repo.roscidus.com/python/python/upstream.xml> is 0.03 hours
DEBUG:root:not setting PYTHONPATH as we selected a package implementation
INFO:root:Executing: [u'/opt/local/bin/python2.7', u'/Users/dave/.cache/0install.net/implementations/sha256=24533dcef144809ec544f5a52777e6d4316b4a0a207b75a7c0ef9765366dc219/0publish']
Traceback (most recent call last):
  File "/Users/dave/.cache/0install.net/implementations/sha256=24533dcef144809ec544f5a52777e6d4316b4a0a207b75a7c0ef9765366dc219/0publish", line 2, in <module>
    from zeroinstall import SafeException
ImportError: No module named zeroinstall
pluto:~/src/boost/svn/trunk dave% 

Change History (7)

comment:1 Changed 13 years ago by dave@…

Apologies for all the extra output! Search backwards from the end for these two lines and ignore everything before them:

pluto:~/src/boost/svn/trunk dave% clear
pluto:~/src/boost/svn/trunk dave% 0launch -c -vv http://0install.net/2006/interfaces/0publish

comment:2 Changed 13 years ago by dave@…

I was able to straighten this out by either

0install select -g -r http://0install.net/2006/interfaces/0publish

and making Python 2.6.8 preferred, or by

sudo port install zeroinstall-injector +python27

but I'm not sure that means there's no problem with the port. Should it be possible to get in a situation like this?

comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to afb@…
Summary: 0publish still trying to use python 2.7zeroinstall-injector: 0publish still trying to use python 2.7

comment:4 Changed 13 years ago by afb@…

Description: modified (diff)
Version: 2.0.4

comment:5 Changed 13 years ago by afb@…

Well, the default was changed from +python27 to +python26 as per your request in #33941.
And now you have changed your configuration to use the 2.7 version preferred instead ? We could change the default variant back to the highest version available: +python27...

But the answer to "Should it be possible to get in a situation like this?" is: Apparently, yes.
Zero Install tries to run a package using another python, rather than using the shebang. And if there is a mismatch, it just won't work. The installed module won't be compatible.

comment:6 Changed 13 years ago by afb@…

Resolution: fixed
Status: newclosed

Fixed, r92164.

comment:7 in reply to:  5 Changed 13 years ago by dave@…

Replying to afb@…:

Well, the default was changed from +python27 to +python26 as per your request in #33941.

I didn't ever claim that was the right long-term fix; it was just a patch that made everything work again for me.

And now you have changed your configuration to use the 2.7 version preferred instead ?

No, I hadn't made any such change.

We could change the default variant back to the highest version available: +python27...

But the answer to "Should it be possible to get in a situation like this?" is: Apparently, yes.

IMO there's a difference between "should it be?" and "is it?" Or at least, there should be :-)

Zero Install tries to run a package using another python, rather than using the shebang. And if there is a mismatch, it just won't work. The installed module won't be compatible.

Well, the question is why it doesn't use the python that zeroinstall is already running under?

Note: See TracTickets for help on using tickets.