[omd-commits] OMD Git: omd: perl-modules: XML::LibXML must be force installed on sles 11

git version control git at mathias-kettner.de
Mon May 9 16:31:35 CEST 2011


Module:   omd
Branch:   master
Commit:   2d439591f34f8906e4ebf469686e8792b031edf5
URL:      http://omdistro.org/projects/omd/repository/revisions/2d439591f34f8906e4ebf469686e8792b031edf5

Author:   Sven Nierlein <sven at nierlein.de>
Date:     Mon May  9 16:30:17 2011 +0200
Commiter: Sven Nierlein <sven at nierlein.de>
Date:     Mon May  9 16:30:17 2011 +0200

perl-modules: XML::LibXML must be force installed on sles 11

---

 packages/perl-modules/Makefile            |    2 +-
 packages/perl-modules/src/build_module.pl |   17 ++++++++++++-----
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/packages/perl-modules/Makefile b/packages/perl-modules/Makefile
index efdb23c..041c3a2 100644
--- a/packages/perl-modules/Makefile
+++ b/packages/perl-modules/Makefile
@@ -210,7 +210,7 @@ MODULES = ExtUtils-MakeMaker-6.56.tar.gz \
 build:
 	mkdir -p $(TMPDIST)
 	echo "install --install_base $(TMPDIST)" > $(TMPDIST)/.modulebuildrc
-	cd src && PERL_MM_OPT=INSTALL_BASE=$(TMPDIST) MODULEBUILDRC=$(TMPDIST)/.modulebuildrc PERL5LIB=$(TMPDIST)/lib/perl5:$(TMPDIST)/lib/perl5/$(PERLARCH) ./build_module.pl $(PERL) $(MODULES)
+	cd src && PERL_MM_OPT=INSTALL_BASE=$(TMPDIST) MODULEBUILDRC=$(TMPDIST)/.modulebuildrc PERL5LIB=$(TMPDIST)/lib/perl5:$(TMPDIST)/lib/perl5/$(PERLARCH) DISTRO_INFO="$(DISTRO_INFO)" ./build_module.pl $(PERL) $(MODULES)
 	rm -rf src/inc
 	cd $(TMPDIST)/lib/perl5/ && rm -f utils.pm && ln -s ../../../nagios/plugins/utils.pm .
 	mkdir -p $(TMPDIST)/lib/perl5/CPAN
diff --git a/packages/perl-modules/src/build_module.pl b/packages/perl-modules/src/build_module.pl
index 4d21557..aa0b438 100755
--- a/packages/perl-modules/src/build_module.pl
+++ b/packages/perl-modules/src/build_module.pl
@@ -23,6 +23,9 @@ if(!defined $ENV{'PERL5LIB'} or $ENV{'PERL5LIB'} eq "") {
     exit 1;
 }
 
+# catalyst needs this on old perl versions
+$ENV{'CATALYST_DEVEL_NO_510_CHECK'} = 1;
+
 my $x = 1;
 my $max = scalar @ARGV;
 for my $mod (@ARGV) {
@@ -143,18 +146,22 @@ sub install_module {
     chdir($dir);
     print "installing... ";
 
+    my $makefile_opts = '';
+    if($ENV{DISTRO_INFO} eq 'SLES 11' and $modname eq 'XML::LibXML') {
+        $makefile_opts = 'FORCE=1';
+    }
+
     eval {
         local $SIG{ALRM} = sub { die "timeout on: $module\n" };
         alarm(300); # single module should not take longer than 5minutes
         if( -f "Build.PL" ) {
             `$PERL Build.PL >> $LOG 2>&1 && ./Build >> $LOG 2>&1 && ./Build install >> $LOG 2>&1`;
-            if($? != 0 ) { print "error: rc $?\n"; print `cat $LOG`, "\n"; return(0); }
+            if($? != 0 ) { die("error: rc $?\n".`cat $LOG`."\n"); }
         } elsif( -f "Makefile.PL" ) {
-            `echo "\n\n\n" | $PERL Makefile.PL >> $LOG 2>&1 && make -j 5 >> $LOG 2>&1 && make install >> $LOG 2>&1`;
-            if($? != 0 ) { print "error: rc $?\n"; print `cat $LOG`, "\n"; return(0); }
+            `echo "\n\n\n" | $PERL Makefile.PL $makefile_opts >> $LOG 2>&1 && make -j 5 >> $LOG 2>&1 && make install >> $LOG 2>&1`;
+            if($? != 0 ) { die("error: rc $?\n".`cat $LOG`."\n"); }
         } else {
-            print "error: no Build.PL or Makefile.PL found in $module!\n";
-            return(0);
+            die("error: no Build.PL or Makefile.PL found in $module!\n");
         }
         alarm(0);
     };



More information about the omd-commits mailing list