Changeset 1530


Ignore:
Timestamp:
May 12, 2012, 3:36:08 AM (7 years ago)
Author:
bruno
Message:
  • ossueminorrel option now initialized first, and correectly. Removes warnings.
  • other smaller fixes for CMD usage
Location:
devel/pb-modules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/etc/pb.conf

    r1528 r1530  
    288288# Should be in sync wirh regular expressions from osrelexpr upper
    289289#osuseminorrel rhel = true
     290osuseminorrel default = false
    290291
    291292# These deps are needed before setupvm|ve can be run.
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r1529 r1530  
    134134# Dig into the tuple to find the best answer
    135135# Do NOT factorize here, as it won't work as of now for hash creation
     136# Do NOT change order without caution
     137$pbos->{'useminor'} = pb_distro_get_param($pbos,pb_conf_get("osuseminorrel"));
    136138$pbos->{'family'} = pb_distro_get_param($pbos,pb_conf_get("osfamily"));
    137139$pbos->{'type'} = pb_distro_get_param($pbos,pb_conf_get("ostype"));
    138 ($pbos->{'os'},$pbos->{'install'},$pbos->{'suffix'},$pbos->{'nover'},$pbos->{'rmdot'},$pbos->{'update'},$pbos->{'useminor'}) = pb_distro_get_param($pbos,pb_conf_get("os","osins","ossuffix","osnover","osremovedotinver","osupd","osuseminorrel"));
     140($pbos->{'os'},$pbos->{'install'},$pbos->{'suffix'},$pbos->{'nover'},$pbos->{'rmdot'},$pbos->{'update'}) = pb_distro_get_param($pbos,pb_conf_get("os","osins","ossuffix","osnover","osremovedotinver","osupd"));
    139141#($pbos->{'family'},$pbos->{'type'},$pbos->{'os'},$pbos->{'install'},$pbos->{'suffix'},$pbos->{'nover'},$pbos->{'rmdot'},$pbos->{'update'}) = pb_distro_get_param($pbos,pb_conf_get("osfamily","ostype","os","osins","ossuffix","osnover","osremovedotinver","osupd"));
    140142
     
    454456            $ok = 1 if /^ii\s+$p/;
    455457        }
     458        close(CMD);
    456459        next if $ok;
    457460        pb_log(1, "INFO: missing dependency $p\n");
     
    620623# Loop to include also previous minor versions
    621624# if configured so
    622 if (($pbos->{'useminor'} eq "true") && ($pbos->{version} =~ /^(\d+)\.(\d+)$/o)) {
     625if ((defined $pbos->{'useminor'}) && ($pbos->{'useminor'} eq "true") && ($pbos->{'version'} =~ /^(\d+)\.(\d+)$/o)) {
    623626        my ($major, $minor) = ($1, $2);
    624627        while ($minor > 0) {
    625628                $minor--;
    626                 push (@keylist, "$pbos->{name}-${major}.$minor");
     629                push (@keylist, "$pbos->{'name'}-${major}.$minor");
    627630        }
    628         push (@keylist, "$pbos->{name}-$major");
    629 }
    630 
    631 push (@keylist, $pbos->{name}, $pbos->{family}, $pbos->{type}, $pbos->{os}, $generic);
     631        push (@keylist, "$pbos->{'name'}-$major");
     632}
     633
     634push (@keylist, $pbos->{'name'}, $pbos->{'family'}, $pbos->{'type'}, $pbos->{'os'}, $generic);
    632635return @keylist;
    633636}
  • devel/pb-modules/lib/ProjectBuilder/VE.pm

    r1528 r1530  
    100100        foreach my $proxy (qw/http_proxy ftp_proxy/) {
    101101            if (defined $ENV{$proxy}) {
    102                 open(<CMD>,"sudo sh -c 'echo \$$proxy' |") or die "can't run sudo sh?: $!";
     102                open(CMD,"sudo sh -c 'echo \$$proxy' |") or die "can't run sudo sh?: $!";
    103103                $_ = <CMD>;
    104104                chomp();
    105105                die "sudo not passing through env var $proxy; '$ENV{$proxy}' != '$_'\nAdd line Defaults:`whoami` env_keep += \"$proxy\" to sudoers file?" unless $_ eq $ENV{$proxy};
     106                close(CMD);
    106107            }
    107108        }
     109    }
    108110    # Handle cross arch on Intel based platforms
    109111    $sudocmd = "setarch i386 $sudocmd" if (($pbos->{arch} =~ /i?86/) && ($arch eq 'x86_64'));
Note: See TracChangeset for help on using the changeset viewer.