Changeset 1595 in ProjectBuilder for devel/pb


Ignore:
Timestamp:
May 24, 2012, 10:54:48 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • pb_system is back to 3 params, as the previously undocumented "mayfail" 3rd parameter povides what the 4th was dded for. callers adapted in relationship
Location:
devel/pb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1594 r1595  
    17511751            $cmd .= " $chkopt" if (defined $chkopt);
    17521752            $cmd .= " $made";
    1753             my $ret = pb_system("$cmd","Checking validity of rpms with $chkcmd","verbose",1);
     1753            my $ret = pb_system("$cmd","Checking validity of rpms with $chkcmd","mayfail");
    17541754            pb_log(0,"ERROR: when checking packages validity\n") if ($ret ne 0);
    17551755        }
     
    17681768        }
    17691769        if (-x $chkcmd) {
    1770             my $ret = pb_system("$chkcmd $chkopt $made2","Checking validity of debs with $chkcmd","verbose",1);
     1770            my $ret = pb_system("$chkcmd $chkopt $made2","Checking validity of debs with $chkcmd","mayfail");
    17711771            pb_log(0,"ERROR: when checking packages validity\n") if ($ret ne 0);
    17721772        }
     
    22792279        my $ftpput = pb_check_req("ncftpput",1);
    22802280        my $ftpget = pb_check_req("wget",1);
    2281         my ($cpanuser,$cpanpasswd) = pb_conf_get("cpanuser","cpanpasswd");
     2281        my ($cpanuser,$cpanpasswd) = pb_conf_get_if("cpanuser","cpanpasswd");
     2282        return if ((not defined $cpanuser) || (not defined $cpanuser->{$ENV{'PBPROJ'}}));
     2283        return if ((not defined $cpanpasswd) || (not defined $cpanpasswd->{$ENV{'PBPROJ'}}));
    22822284        my ($cpansubdir) = pb_conf_get_if("cpansubdir");
    2283         $shcmd = "$ftpget --post-data \'HIDDENNAME=".$cpanuser;
    2284         $shcmd .= "&user=".$cpanuser;
    2285         $shcmd .= "&password=".$cpanpasswd;
     2285        $shcmd = "$ftpget --post-data \'HIDDENNAME=".$cpanuser->{$ENV{'PBPROJ'}};
     2286        $shcmd .= "&user=".$cpanuser->{$ENV{'PBPROJ'}};
     2287        $shcmd .= "&password=".$cpanpasswd->{$ENV{'PBPROJ'}};
    22862288        $shcmd .= "&SUBMIT_pause99_add_uri_upload=\"Upload the checked files\"";
    2287         $shcmd .= "&pause99_add_uri_subdirtext=".$cpansubdir if (defined $cpansubdir);
     2289        $shcmd .= "&pause99_add_uri_subdirtext=".$cpansubdir->{$ENV{'PBPROJ'}} if ((defined $cpansubdir) && (defined $cpansubdir->{$ENV{'PBPROJ'}}));
    22882290        foreach my $s (split(/ /,$src)) {
    22892291            $shcmd .= "&pause99_add_uri_upload=".basename($s);
     
    23162318    # For VE we need to change the owner manually
    23172319    if ($cmt =~ /^VE/) {
    2318         if (defined $shcmdroot) {
    2319             # This should help overcome a CentOS 5.8 bug as well as having a simper sequence
    2320             pb_system("$shcmdroot chown -R $mac $tdir","Adapt owner in $tdir to $mac");
    2321         } else {
    2322             pb_system("$shcmd \"sudo chown -R $mac $tdir\"","Adapt owner in $tdir to $mac");
    2323         }
     2320        pb_system("$shcmdroot sed -i '/requiretty/d' /etc/sudoers","Removing potential requiretty in sudoers");
     2321        pb_system("$shcmd \"sudo chown -R $mac $tdir\"","Adapt owner in $tdir to $mac");
    23242322    }
    23252323
     
    26312629                pb_system("$cmd &","Launching the VM $vmm");
    26322630                # Using system allows to kill it externaly if needed,sosupport that in the call
    2633                 pb_system("sleep $ENV{'PBVMTMOUT'}","Waiting $ENV{'PBVMTMOUT'} s for VM $v to come up",undef,1);
     2631                pb_system("sleep $ENV{'PBVMTMOUT'}","Waiting $ENV{'PBVMTMOUT'} s for VM $v to come up","mayfail");
    26342632                $vmpid = pb_check_ps($tmpcmd,$vmm);
    26352633                pb_log(0,"VM $vmm launched (pid $vmpid)\n");
     
    43314329    }
    43324330    my $debsigncmd = pb_check_req("debsign",1);
    4333     pb_system("$debsigncmd -m\'$ENV{'PBPACKAGER'}\' $changes","Signing DEB packages",undef,1) if (($changes ne "") && (defined $debsigncmd));
     4331    pb_system("$debsigncmd -m\'$ENV{'PBPACKAGER'}\' $changes","Signing DEB packages","mayfail") if (($changes ne "") && (defined $debsigncmd));
    43344332} else {
    43354333    pb_log(0,"I don't know yet how to sign packages for type $pbos->{'type'}.\nPlease give feedback to dev team\n");
  • devel/pb/t/pbtest

    r1594 r1595  
    5959sudocmd "killall -u pbtest"
    6060sudocmd "userdel pbtest"
    61 sudocmd "groupdel pbtest"
     61#sudocmd "groupdel pbtest" 1
    6262sudocmd "useradd pbtest"
    6363sudocmd "grep -q pbtest /etc/sudoers"
Note: See TracChangeset for help on using the changeset viewer.