Replacing a variant with many dependencies
Freek Dijkstra
software at macfreek.nl
Sat Feb 25 05:11:40 PST 2012
This questions must have been asked a 1000 times, but I can't seem to
find the answer with Google.
I like to change a variant of a port with many dependencies.
In my case, change "python27" to "python27 +ucs4"
Unfortunately, a simple `port install python27 +ucs4` fails.
(The destroot step fails while building Python.app while importing
pyexpat with "Symbol not found: _PyUnicodeUCS2_Decode", see below)
I'm not sure if this a regular bug, or caused by the fact that I still
have another Python variant installed.
To test, I wanted to first uninstall the current python27, but that
fails because it has some dependencies. "Some" turned out 117
dependencies as reported by `port rdependents python27`.
Is there a simple way to deactivate them and activate later? Or if that
is not good enough, uninstall and install them later, without
maintaining a list by hand?
While I'm at it: has anyone successfully installed python +ucs4? (I'm
trying to determine if I can avoid this bug by doing a clean install or
not).
Regards,
Freek
> ln -sf python2.7 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python"
> ln -sf pythonw2.7 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw"
> DYLD_FRAMEWORK_PATH=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.2: ../python.exe ./scripts/BuildApplet.py \
> --destroot "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/destroot" \
> --python=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python \
> --output "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/destroot/Applications/MacPorts/Python 2.7/Build Applet.app" \
> ./scripts/BuildApplet.py
> Traceback (most recent call last):
> File "./scripts/BuildApplet.py", line 156, in <module>
> main()
> File "./scripts/BuildApplet.py", line 36, in main
> buildapplet()
> File "./scripts/BuildApplet.py", line 123, in buildapplet
> progress=verbose, destroot=destroot)
> File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.2/Lib/plat-mac/buildtools.py", line 122, in process
> copy_codefragment, raw, others, filename, destroot)
> File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.2/Lib/plat-mac/buildtools.py", line 151, in process_common
> is_update, raw, others, filename, destroot)
> File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.2/Lib/plat-mac/buildtools.py", line 332, in process_common_macho
> builder.plist = plistlib.Plist.fromFile(plistname)
> File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.2/Lib/plistlib.py", line 345, in fromFile
> rootObject = readPlist(pathOrFile)
> File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.2/Lib/plistlib.py", line 78, in readPlist
> rootObject = p.parse(pathOrFile)
> File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.2/Lib/plistlib.py", line 401, in parse
> from xml.parsers.expat import ParserCreate
> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_xmlplus/parsers/expat.py", line 4, in <module>
> from pyexpat import *
> ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_xmlplus/parsers/pyexpat.so, 2): Symbol not found: _PyUnicodeUCS2_Decode
> Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_xmlplus/parsers/pyexpat.so
> Expected in: flat namespace
> in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_xmlplus/parsers/pyexpat.so
> make[1]: *** [install_BuildApplet] Error 1
> make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.2/Mac'
> make: *** [frameworkinstallapps] Error 2
> make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.2'
More information about the macports-users
mailing list