[Lunar-commits] CVS: moonbase/compilers/Python BUILD, 1.8,
1.9 POST_INSTALL, 1.3, 1.4
Moritz Heiber
moe at lunar-linux.org
Sun Mar 6 17:52:58 UTC 2005
Update of /var/cvs/lunar/moonbase/compilers/Python
In directory espresso.foo-projects.org:/tmp/cvs-serv19343
Modified Files:
BUILD POST_INSTALL
Log Message:
Be smarter about upgrades. Now all the compiled python
modules are preserved. They might fail of course. Still,
it's a lot less buggy.
Index: BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/compilers/Python/BUILD,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- BUILD 3 Dec 2004 08:21:28 -0000 1.8
+++ BUILD 6 Mar 2005 17:52:56 -0000 1.9
@@ -1,10 +1,14 @@
(
+ if module_is_expired $MODULE ; then
+ set_module_config OLD_VER "`installed_version $MODULE`"
+ fi &&
+
default_build &&
- install -d /usr/lib/python2.4 &&
+ install -d /usr/lib/python$VERSION &&
install -m755 $SOURCE_DIRECTORY/Tools/i18n/msgfmt.py \
$SOURCE_DIRECTORY/Tools/i18n/pygettext.py \
- /usr/lib/python2.4/ &&
+ /usr/lib/python$VERSION/ &&
gather_docs Misc/*
) > $C_FIFO 2>&1
Index: POST_INSTALL
===================================================================
RCS file: /var/cvs/lunar/moonbase/compilers/Python/POST_INSTALL,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- POST_INSTALL 3 Dec 2004 08:21:28 -0000 1.3
+++ POST_INSTALL 6 Mar 2005 17:52:56 -0000 1.4
@@ -1,17 +1,13 @@
-# Don't break any Python depended application.
-# Note: This is a workaround and needs some more attention ..
-# a working soluation might also help solving the same issue
-# with perl
-
-NEWPYTHONDIR=/usr/lib/python2.4
-OLDPYTHONDIR=/usr/lib/python2.3
+OLD_VER="`get_module_config OLD_VER`"
+NEWPYTHONDIR=/usr/lib/python$VERSION
+OLDPYTHONDIR=/usr/lib/python$OLD_VER
-if [ -d $OLDPYTHONDIR ]; then
- if [ -d $OLDPYTHONDIR/site-packages ]; then
- for ext in $OLDPYTHONDIR/site-packages; do
- cp -a $ext $NEWPYTHONDIR;
- done;
- fi
+if [ ! -z "$OLD_VER" ]; then
+ for ext in $OLDPYTHONDIR/site-packages/*; do
+ cp -a $ext $NEWPYTHONDIR/site-packages/;
+ done;
# Remove the old location
rm -rf $OLDPYTHONDIR
fi
+
+unset_module_config OLD_VER
More information about the Lunar-commits
mailing list