Changeset 1128


Ignore:
Timestamp:
12/21/10 03:01:44 (2 years ago)
Author:
bruno
Message:
  • pb_check_requirements now takes direct result from pb_conf_get_if and does more internal work, which ease caller.
Location:
devel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/Base.pm

    r1127 r1128  
    409409sub pb_check_requirements { 
    410410 
    411 my $cmds = shift || ""; 
    412 my $options = shift || ""; 
     411my $req = shift || undef; 
     412my $opt = shift || undef; 
     413my $appname = shift || undef; 
     414 
     415my ($req2,$opt2) = (undef,undef); 
     416$req2 = $req->{$appname} if (defined $req and defined $appname); 
     417$opt2 = $opt->{$appname} if (defined $opt and defined $appname); 
    413418 
    414419# cmds is a string of coma separated commands 
    415 foreach my $file (split(/,/,$cmds)) { 
    416     pb_check_req($file,0); 
     420if (defined $req2) { 
     421    foreach my $file (split(/,/,$req2)) { 
     422        pb_check_req($file,0); 
     423    } 
    417424} 
    418425 
    419426# opts is a string of coma separated commands 
    420 foreach my $file (split(/,/,$options)) { 
    421     pb_check_req($file,1); 
     427if (defined $opt2) { 
     428    foreach my $file (split(/,/,$opt2)) { 
     429        pb_check_req($file,1); 
     430    } 
    422431} 
    423432} 
     
    455464} else { 
    456465    pb_log(2,"OK\n"); 
    457     return($found"); 
     466    return($found); 
    458467} 
    459468} 
  • devel/pb/bin/pb

    r1127 r1128  
    499499# 
    500500my ($req,$opt,$pbpara) = pb_conf_get_if("oscmd","oscmdopt","pbparallel"); 
    501 my ($req2,$opt2) = (undef,undef); 
    502 $req2 = $req->{$appname} if (defined $req); 
    503 $opt2 = $opt->{$appname} if (defined $opt); 
    504 pb_check_requirements($req2,$opt2); 
     501pb_check_requirements($req,$opt,$appname); 
    505502 
    506503# 
  • devel/rpmbootstrap/bin/rpmbootstrap

    r1127 r1128  
    229229# 
    230230my ($req,$opt) = pb_conf_get_if("oscmd","oscmdopt"); 
    231 my ($req2,$opt2) = (undef,undef); 
    232 $req2 = $req->{$appname} if (defined $req); 
    233 $opt2 = $opt->{$appname} if (defined $opt); 
    234 pb_check_requirements($req2,$opt2); 
     231pb_check_requirements($req,$opt,$appname); 
    235232 
    236233if (not defined $vepath) { 
Note: See TracChangeset for help on using the changeset viewer.