Changeset 766 in ProjectBuilder for devel/pb/bin/pb


Ignore:
Timestamp:
Apr 27, 2009, 9:32:10 PM (15 years ago)
Author:
Bruno Cornec
Message:

Avoid to handle ill-formatted VM/VE names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r763 r766  
    586586        }
    587587        if (defined $pt[1]->{$ENV{'PBPROJ'}}) {
    588             # the 2 lists need to be grouped with a ',' separated them
     588            # the 2 lists needs to be grouped with a ',' separating them
    589589            if ($tmpl ne "") {
    590590                $tmpl .= ",";
     
    613613            # De-duplicate similar VM and VE
    614614            foreach my $d (split(/,/,$tmpl)) {
     615                # skip ill-formatted vms (name-ver-arch)
     616                next if ($d !~ /-/);
    615617                $virt{$d} = $d;
    616618            }
     
    618620            foreach my $d (keys %virt) {
    619621                my ($name,$ver,$arch) = split(/-/,$d);
     622                pb_log(0,"Bad format for $d") if ((not defined $name) || (not defined $ver) || (not defined $arch)) ;
    620623                chomp($arch);
    621624                my ($ddir, $dver, $dfam);
Note: See TracChangeset for help on using the changeset viewer.