Changeset 982 in ProjectBuilder for devel/pb-modules


Ignore:
Timestamp:
Feb 19, 2010, 5:30:20 AM (14 years ago)
Author:
Bruno Cornec
Message:
  • Fix variable substitution which was too aggressive in pb_distro_get_param
Location:
devel/pb-modules/lib/ProjectBuilder
Files:
2 edited

Legend:

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

    r974 r982  
    400400
    401401my $cmds = shift || "";
    402 my $opts = shift || "";
     402my $options = shift || "";
    403403
    404404# cmds is a string of coma separated commands
    405 foreach my $file (split(/,/,$cmds) {
     405foreach my $file (split(/,/,$cmds)) {
    406406    pb_check_req($file,0);
    407407}
    408408
    409409# opts is a string of coma separated commands
    410 foreach my $file (split(/,/,$opts) {
     410foreach my $file (split(/,/,$options)) {
    411411    pb_check_req($file,1);
    412412}
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r974 r982  
    444444}
    445445
    446 # Allow replacement of variables inside the parameter such as ddir, dver, darch for rpmbootstrap
    447 eval { $param =~ s/(\$\w+)/$1/eeg };
    448 
    449 pb_log(2,"DEBUG: pb_distro_get_param on ",Dumper($opt)," returns $param\n");
     446# Allow replacement of variables inside the parameter such as ddir, dver, darch for rpmbootstrap
     447# but not shell variable which ae backslashed
     448if ($param =~ /[^\\]\$/) {
     449    pb_log(3,"Expanding variable on $param\n");
     450    eval { $param =~ s/(\$\w+)/$1/eeg };
     451}
     452
     453pb_log(2,"DEBUG: pb_distro_get_param on $ddir-$dver-$darch returns ==$param==\n");
    450454return($param);
    451455
Note: See TracChangeset for help on using the changeset viewer.