From 5a5ebf4076ec3473e093cdcffb7c132a56d0a23f Mon Sep 17 00:00:00 2001 From: Eric Sandall Date: Fri, 11 Jan 2008 17:41:00 -0800 Subject: Revert "python: fix the huge bug in spell: when you have a lot of python modules installed (in /usr/lib/python2.5/site-packages dir), and want to recast python, it will recompile every module in that dir recursively, while adding every compiled (.pyc) and object (.pyo) files. So package of python becomes bigger with any new pythonic module/app. And if we want to recast python (remember -- every module in site-packages must be reinstalled after python), then we need to dispel all pythonic modules first, then cast python, then cast all those modules. We MUST do it not only after minor version upgrade -- but EVERYTIME we want to recast python, to keep it clear an proper." This reverts commit 0607ea32b92b47c7a22727ae06d7f91f5e2d6af9. Revert until further testing has been done Conflicts: devel/python/HISTORY devel/python/INSTALL --- devel/python/DEPENDS | 29 ++++++++++++++++++++++++----- devel/python/HISTORY | 4 ---- devel/python/INSTALL | 2 +- devel/python/PRE_SUB_DEPENDS | 3 +-- devel/python/SUB_DEPENDS | 4 ++-- devel/python/UP_TRIGGERS | 32 +++++++++++++++----------------- devel/python/volatiles | 0 7 files changed, 43 insertions(+), 31 deletions(-) mode change 100755 => 100644 devel/python/volatiles diff --git a/devel/python/DEPENDS b/devel/python/DEPENDS index d008b03222..4b5bcd9dc7 100755 --- a/devel/python/DEPENDS +++ b/devel/python/DEPENDS @@ -1,5 +1,24 @@ -optional_depends db "" "" "Sleepycat db support" && -optional_depends sqlite "" "" "SQLite db support" && -optional_depends tk "" "" "for Tk support" && -optional_depends expat "" "" "for XML parser module" && -optional_depends g++ "" "--with-cxx=no" "for c++ module support" +optional_depends db \ + "" \ + "" \ + "Sleepycat db support" && + +optional_depends sqlite \ + "" \ + "" \ + "sqlite db support"&& + +optional_depends tk \ + "" \ + "" \ + "for tk support" && + +optional_depends expat \ + "" \ + "" \ + "for an xml parser module" && + +optional_depends g++ \ + "" \ + "--with-cxx=no" \ + "for c++ module support" diff --git a/devel/python/HISTORY b/devel/python/HISTORY index ed828b5bc6..791e13b538 100644 --- a/devel/python/HISTORY +++ b/devel/python/HISTORY @@ -1,8 +1,4 @@ 2007-12-26 Vlad Glagolev - * DETAILS: fixed the huge bug in spell, now python's recasting won't - include all files from the pythonic modules/apps in site-packages: - we MUST dispell every python-based spell on recasting python, and - every python-based module/app MUST be recompiled -- only by its setup * INSTALL: added gettext tools 2007-06-03 Treeve Jelbert diff --git a/devel/python/INSTALL b/devel/python/INSTALL index 0ff45cf327..261f742452 100755 --- a/devel/python/INSTALL +++ b/devel/python/INSTALL @@ -1,4 +1,4 @@ -default_install && +default_install && if [ -f $SOURCE_DIRECTORY/spell-tmp/pydcop.py ]; then mv $SOURCE_DIRECTORY/spell-tmp/pydcop.py \ diff --git a/devel/python/PRE_SUB_DEPENDS b/devel/python/PRE_SUB_DEPENDS index 03059f4db8..47f7444a49 100755 --- a/devel/python/PRE_SUB_DEPENDS +++ b/devel/python/PRE_SUB_DEPENDS @@ -1,5 +1,4 @@ case $THIS_SUB_DEPENDS in - expat) if is_depends_enabled $SPELL expat; then return 0; fi;; +expat) if is_depends_enabled $SPELL expat; then return 0; fi;; esac - return 1 diff --git a/devel/python/SUB_DEPENDS b/devel/python/SUB_DEPENDS index c85dbd5afe..7c283e1abc 100755 --- a/devel/python/SUB_DEPENDS +++ b/devel/python/SUB_DEPENDS @@ -1,4 +1,4 @@ case $THIS_SUB_DEPENDS in - expat) echo "xml parser module requested, forcing them."; depends expat;; - *) echo "unknown sub-depends!"; return 1;; + expat) echo "xml parser module requested, forcing them."; depends expat;; + *) echo "unknown sub-depends!"; return 1;; esac diff --git a/devel/python/UP_TRIGGERS b/devel/python/UP_TRIGGERS index 90c2dfacff..0a6deb76ef 100755 --- a/devel/python/UP_TRIGGERS +++ b/devel/python/UP_TRIGGERS @@ -1,25 +1,23 @@ # up_trigger everything on minor version updates -# dispel every spell before casting python again local OLD_SPELL_VERSION -if spell_ok $SPELL; then +if spell_ok $SPELL; then OLD_SPELL_VERSION="$(installed_version $SPELL)" + # Test the second number of the version ie 4 in 2.4.3 if test "${VERSION:2:1}" != "${OLD_SPELL_VERSION:2:1}"; then message "This is a possibly incompatible update of python..." - fi - message "Figuring out what spells need to be recast, this may take a while." - for each in $(show_up_depends $SPELL); do - # Check in the install logs if python packages has been installed - if gaze install $each | grep -q "$TRACK_ROOT/usr/lib/python${OLD_SPELL_VERSION:0:3}/site-packages"; then - up_trigger $each cast_self - dispel --notriggers $each - else - # Check if the binaries link against libpython.so - if gaze install $each | xargs readelf -d 2> /dev/null | - grep -q "NEEDED.*libpython${OLD_SPELL_VERSION:0:3}"; then - up_trigger $each cast_self - dispel --notriggers $each + message "Figuring out what spells need to be recast, this may take a while." + for each in $(show_up_depends $SPELL); do + # Check in the install logs if python packages has been installed + if gaze install $each | grep -q "$TRACK_ROOT/usr/lib/python${OLD_SPELL_VERSION:0:3}/site-packages"; then + up_trigger $each cast_self + else + # Check if the binaries link against libpython.so + if gaze install $each | xargs readelf -d 2> /dev/null | + grep -q "NEEDED.*libpython${OLD_SPELL_VERSION:0:3}"; then + up_trigger $each cast_self + fi fi - fi - done + done + fi fi diff --git a/devel/python/volatiles b/devel/python/volatiles old mode 100755 new mode 100644 -- cgit v1.2.3