Changeset 1177 in ProjectBuilder for devel/pb-modules/bin/pbdistrocheck


Ignore:
Timestamp:
Feb 7, 2011, 2:24:17 PM (13 years ago)
Author:
Bruno Cornec
Message:

r4161@eelzbach2: bruno | 2011-02-06 21:07:30 +0100

  • Introduction of a new hash $pbos to manage all os related info through a single data structure. All functions reviewed accordingly. Externally transparent, hopefully, but much cleaner code as a consequence. VM/VE/RM remains to be tested.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/bin/pbdistrocheck

    r1156 r1177  
    118118
    119119my $dist = shift @ARGV || undef ;
    120 my @param = undef;
    121 @param = split(/-/,$dist) if (defined $dist);
    122 
    123 my ($ddir, $dver, $dfam, $dtype, $dos, $pbsuf, $pbupd, $pbins, $arch) = pb_distro_init(@param);
     120my $pbos = pb_distro_get_context($dist);
    124121my $sep = "\n";
    125122if (defined $opts{'l'}) {
     
    137134    $sep = "," if (defined $opts{'s'});
    138135    if (not defined $opts{'s'}) {
    139         $dos = "OS:\t$dos";
    140         $ddir = "Name:\t$ddir";
    141         $dver = "Ver:\t$dver";
    142         $dfam = "Family:\t$dfam";
    143         $dtype = "Type:\t$dtype";
    144         $pbsuf = "Suffix:\t$pbsuf";
    145         $pbupd = "Update:\t$pbupd";
    146         $pbins = "Install:\t$pbins";
    147         $arch = "Arch:\t$arch";
     136        $pbos->{'os'} = "OS:\t$pbos->{'os'}";
     137        $pbos->{'name'} = "Name:\t$pbos->{'name'}";
     138        $pbos->{'version'} = "Ver:\t$pbos->{'version'}";
     139        $pbos->{'family'} = "Family:\t$pbos->{'family'}";
     140        $pbos->{'type'} = "Type:\t$pbos->{'type'}";
     141        $pbos->{'suffix'} = "Suffix:\t$pbos->{'suffix'}";
     142        $pbos->{'update'} = "Update:\t$pbos->{'update'}";
     143        $pbos->{'install'} = "Install:\t$pbos->{'install'}";
     144        $pbos->{'arch'} = "Arch:\t$pbos->{'arch'}";
    148145        print "Project-Builder tuple:\n";
    149146    }
    150     print join($sep,($dos, $ddir, $dver, $arch, $dtype, $dfam, $pbsuf, $pbupd, $pbins))."\n";
     147    print join($sep,($pbos->{'os'}, $pbos->{'name'}, $pbos->{'version'}, $pbos->{'arch'}, $pbos->{'type'}, $pbos->{'family'}, $pbos->{'suffix'}, $pbos->{'update'}, $pbos->{'install'}))."\n";
    151148}
Note: See TracChangeset for help on using the changeset viewer.