Changeset 159


Ignore:
Timestamp:
Sep 28, 2007, 2:35:11 AM (13 years ago)
Author:
Bruno Cornec
Message:

That script has worked for fedora_6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/contrib/pbsetupqemu

    r158 r159  
    3434if [ -x /usr/bin/yum ]; then
    3535    yum clean all
    36     yum install neon newt-devel slang-devel autoconf automake libtool gcc rpm-build wget vim gcc-c++ docbook-utils-pdf ImageMagick man patch cdrecord mkisofs perl-AppConfig
    37 elif [-x /usr/sbin/urpmi ]; then
    38     urpmi neon newt-devel slang-devel glibc-static-devel autoconf automake libtool gcc rpm-build wget gcc-c++ docbook-utils-pdf ImageMagick man patch mindi mondo mkisofs cdrecord perl-AppConfig
    39 elif [-x /usr/bin/apt-get ]; then
     36    #yum -y install neon newt-devel slang-devel autoconf automake libtool gcc rpm-build wget vim gcc-c++ docbook-utils-pdf ImageMagick man patch cdrecord mkisofs perl-AppConfig perl-DateManip
     37elif [ -x /usr/sbin/urpmi ]; then
     38    urpmi --auto-select neon newt-devel slang-devel glibc-static-devel autoconf automake libtool gcc rpm-build wget gcc-c++ docbook-utils-pdf ImageMagick man patch mindi mondo mkisofs cdrecord perl-AppConfig perl-DateManip
     39elif [ -x /usr/bin/apt-get ]; then
    4040    apt-get install autoconf automake libtool g++ wget patch mondo groff imagemagick docbook-utils docbook2x docbook-to-man openssh-server dpkg-dev debian-builder dh-make fakeroot libnewt-dev libncurses5-dev
    4141elif [ -x /usr/sbin/emerge ]; then
    4242    emerge neon newt slang autoconf automake subversion libtool gcc wget vim man groff lynx grub afio buffer mindi mondo-rescue cdrecord mkisofs   
     43else
     44    echo "No pkg to install"
    4345fi
    4446
    4547cat > /tmp/pbpatch << EOF
    46 --- /usr/lib/perl5/vendor_perl/5.8.8/AppConfig/File.pm.orig     2007-08-09 17:44:26.000000000 +0200
    47 +++ /usr/lib/perl5/vendor_perl/5.8.8/AppConfig/File.pm  2007-08-09 18:04:46.000000000 +0200
     48
     49--- /usr/lib/perl5/vendor_perl/5.8.8/AppConfig/File.pm.orig 2007-08-09 17:44:26.000000000 +0200
     50+++ /usr/lib/perl5/vendor_perl/5.8.8/AppConfig/File.pm  2007-08-09 18:04:46.000000000 +0200
    4851@@ -20,7 +20,7 @@
    49 
     52 
    5053 require 5.005;
    51 
     54 
    5255-use AppConfig;
    5356+use AppConfig qw(:argcount);
    5457 use AppConfig::State;
    5558 use File::HomeDir;
    56 
     59 
    5760@@ -227,6 +227,11 @@
    58 
    59                 my $nargs = $state->_argcount($variable);
    60 
    61 +               # Fix a bug if the variable is a hash - 1 has been created as a key
    62 +               if ($nargs eq AppConfig::ARGCOUNT_HASH) {
    63 +                       delete $state->{ VARIABLE }->{ $variable }{1};
    64 +               }
     61 
     62        my $nargs = $state->_argcount($variable);
     63 
     64+       # Fix a bug if the variable is a hash - 1 has been created as a key
     65+       if (\$nargs eq AppConfig::ARGCOUNT_HASH) {
     66+           delete \$state->{ VARIABLE }->{ \$variable }{1};
     67+       }
    6568+
    66                 # variables prefixed '-' are reset to their default values
    67                 if ($flag eq '-') {
    68                     $state->_default($variable);
     69        # variables prefixed '-' are reset to their default values
     70        if ($flag eq '-') {
     71            $state->_default($variable);
    6972EOF
    7073
     
    7275grep -q 'Fix a bug if the variable is a hash' /usr/lib/perl5/vendor_perl/*/AppConfig/File.pm
    7376if [ $? -ne 0 ]; then
    74     cd /usr/lib/perl5/vendor_perl/*/AppConfig
    75     patch -s -p1 < /tmp/pbpatch
     77    (cd /usr/lib/perl5/vendor_perl/*/AppConfig ; patch -s -p0 < /tmp/pbpatch)
    7678    if [ $? -eq 0 ]; then
    7779        rm -f /tmp/pbpatch
Note: See TracChangeset for help on using the changeset viewer.