Changeset 483 for devel/pb/bin/pb


Ignore:
Timestamp:
Jun 6, 2008, 12:24:17 AM (12 years ago)
Author:
Bruno Cornec
Message:

Fix #27

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r480 r483  
    685685            foreach my $f (@specfile) {
    686686                if ($f =~ /\.spec$/) {
    687                     pb_system("rpmbuild $specialdef --define \'packager $ENV{'PBPACKAGER'}\' --define \"_topdir $ENV{'PBBUILDDIR'}\" -ba $f","Building package with $f under $ENV{'PBBUILDDIR'}");
     687                    pb_system("rpmbuild $specialdef --define \'packager $ENV{'PBPACKAGER'}\' --define \"_topdir $ENV{'PBBUILDDIR'}\" -ba $f","Building package with $f under $ENV{'PBBUILDDIR'}","verbose");
    688688                    last;
    689689                }
     
    11451145            $ENV{'PBVMOPT'} = "";
    11461146        }
    1147         if (defined $vmopt->{$ENV{'PBPROJ'}}) {
     1147        # Set a default timeout of 2 minutes
     1148        if (not defined $ENV{'PBVMTMOUT'}) {
     1149            $ENV{'PBVMTMOUT'} = "120";
     1150        }
     1151        if (defined $vmopt->{$v}) {
     1152            $ENV{'PBVMOPT'} .= " $vmopt->{$v}" if ($ENV{'PBVMOPT'} !~ / $vmopt->{$v}/);
     1153        } elsif (defined $vmopt->{$ENV{'PBPROJ'}}) {
    11481154            $ENV{'PBVMOPT'} .= " $vmopt->{$ENV{'PBPROJ'}}" if ($ENV{'PBVMOPT'} !~ / $vmopt->{$ENV{'PBPROJ'}}/);
     1155        }
     1156        if (defined $vmtmout->{$v}) {
     1157            $ENV{'PBVMTMOUT'} = $vmtmout->{$v};
     1158        } elsif (defined $vmtmout->{$ENV{'PBPROJ'}}) {
     1159            $ENV{'PBVMTMOUT'} = $vmtmout->{$ENV{'PBPROJ'}};
    11491160        }
    11501161        my $nport = $vmport->{$ENV{'PBPROJ'}};
     
    11941205            } else {
    11951206                pb_system("$cmd &","Launching the VM $vmm");
    1196                 pb_system("sleep $vmtmout->{$ENV{'PBPROJ'}}","Waiting for VM $v to come up");
     1207                pb_system("sleep $ENV{'PBVMTMOUT'}","Waiting $ENV{'PBVMTMOUT'} s for VM $v to come up");
    11971208                $vmpid = pb_check_ps($tmpcmd,$vmm);
    11981209                pb_log(0,"VM $vmm launched (pid $vmpid)\n");
     
    13211332        die "Only SVN is supported at the moment";
    13221333    }
     1334
    13231335    my $res = pb_cms_isdiff($scheme,$ENV{'PBROOTDIR'});
    13241336    die "ERROR: No differences accepted in CMS for $ENV{'PBROOTDIR'} before creating a new version" if ($res != 0);
Note: See TracChangeset for help on using the changeset viewer.