[Lunar-commits] r15606 - moonbase/trunk/perl/perl

Auke Kok sofar at lunar-linux.org
Wed Jul 6 09:58:57 UTC 2005


Author: sofar
Date: 2005-07-06 09:58:56 +0000 (Wed, 06 Jul 2005)
New Revision: 15606

Modified:
   moonbase/trunk/perl/perl/POST_INSTALL
   moonbase/trunk/perl/perl/PRE_BUILD
Log:
Adding my method to recompile some of the perl CPAN modules that are in moonbase, as well as irssi, ImageMagick et al. that need to be recompiled on a major perl upgrade. This code is tested and works. Only thing it doesn't help with is manually installed CPAN modules. This may not be perfect but it will really help a lot more than anything else for now.


Modified: moonbase/trunk/perl/perl/POST_INSTALL
===================================================================
--- moonbase/trunk/perl/perl/POST_INSTALL	2005-07-06 09:51:49 UTC (rev 15605)
+++ moonbase/trunk/perl/perl/POST_INSTALL	2005-07-06 09:58:56 UTC (rev 15606)
@@ -1,10 +1,13 @@
 #  Reinstall packages that add their own perl modules
+if [ -n "$OLD_PERL_VERSION" ] ; then
+	PERLMODS="$( (lvu from /usr/lib/perl?/$OLD_PERL_VERSION/; lvu from /usr/lib/perl?/site_perl/$OLD_PERL_VERSION/) | cut -d: -f1 | uniq | grep -v perl)"
+	for PERLMOD in $(sort_by_dependency $PERLMODS); do
+		lin -c $PERLMOD || true
+	done
+	unset_module_config OLD_PERL_VERSION
+fi
 
-if  module_installed  irssi;          then  lin  irssi;          fi
-if  module_installed  ImageMagick;    then  lin  ImageMagick;    fi
-if  module_installed  SDL_perl;       then  lin  SDL_perl;       fi
-if  module_installed  SGMLSpm;        then  lin  SGMLSpm;        fi
-if  module_installed  XML-Parser;     then  lin  XML-Parser;	 fi
 message ""
 message "${MESSAGE_COLOR}Remember to re-install ANY CPAN modules by hand!${DEFAULT_COLOR}"
 message "${MESSAGE_COLOR}You will also need to re-lin lunar installed perl modules too!${DEFAULT_COLOR}"
+message ""

Modified: moonbase/trunk/perl/perl/PRE_BUILD
===================================================================
--- moonbase/trunk/perl/perl/PRE_BUILD	2005-07-06 09:51:49 UTC (rev 15605)
+++ moonbase/trunk/perl/perl/PRE_BUILD	2005-07-06 09:58:56 UTC (rev 15606)
@@ -1,3 +1,7 @@
+unset_module_config OLD_PERL_VERSION
+if [ "$(installed_version perl)" != "$VERSION" ]; then
+  set_module_config OLD_PERL_VERSION $(installed_version perl)
+fi &&
 if module_installed perl ; then
   lrm --upgrade perl
 fi &&



More information about the Lunar-commits mailing list