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


Ignore:
Timestamp:
Nov 10, 2009, 3:31:28 AM (14 years ago)
Author:
Bruno Cornec
Message:
  • Do not add conf files if already present in the list (changing pbconffiles into a hash for that to still keep order as this is mandatory)
  • Small optimisations for pb_conf function usage in pb
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r897 r898  
    528528    my ($scheme, $uri) = pb_cms_init($pbinit);
    529529
    530     my ($pkgv, $pkgt) = pb_conf_get_if("pkgver","pkgtag");
     530    # We need 2 lines here
     531    my ($pkgv, $pkgt, $testver) = pb_conf_get_if("pkgver","pkgtag","testver");
     532    my @pt = pb_conf_get_if("vmlist","velist");
    531533
    532534    # declare packager and repo for filtering
     
    536538
    537539    foreach my $pbpkg (@pkgs) {
    538         my ($testver) = pb_conf_get_if("testver");
    539540        $ENV{'PBPKG'} = $pbpkg;
    540541
     
    596597
    597598        my %build;
    598         my @pt;
    599599        # We want to at least build for the underlying distro
    600600        my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch) = pb_distro_init();
     
    603603
    604604        # Get list of distributions for which I need to generate build files
    605         @pt = pb_conf_get_if("vmlist","velist");
    606605        if (defined $pt[0]->{$ENV{'PBPROJ'}}) {
    607606            $tmpl .= $pt[0]->{$ENV{'PBPROJ'}};
     
    632631        # Do not do that for website
    633632        if ((not defined $param) || ($param ne "Web")) {
     633            pb_log(0,"Build files are being generated for ...\n");
    634634            my %virt;
    635635            # De-duplicate similar VM and VE
     
    731731                push @notfound,$b if ($build{$b} =~ /no/);
    732732            }
    733             pb_log(0,"Build files generated for ".join(',',sort(@found))."\n");
     733            pb_log(0," ... ".join(',',sort(@found))."\n");
    734734            pb_log(0,"No Build files found for ".join(',',sort(@notfound))."\n") if (@notfound);
    735735            pb_log(2,"DEBUG: patches: ".Dumper(%patches)."\n");
     
    876876
    877877    # Get list of packages to build
    878     # Get content saved in cms2build
    879878    my $ptr = pb_get_pkg();
    880879    @pkgs = @$ptr;
    881880
     881    # Get content saved in cms2build
    882882    my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb","pbpkg");
    883883    $pkg = { } if (not defined $pkg);
     
    11741174
    11751175    if ($cmt ne "Announce") {
     1176        # Get list of packages to build
    11761177        my $ptr = pb_get_pkg();
    11771178        @pkgs = @$ptr;
     
    19791980    my ($scheme2,$uri) = pb_cms_init($pbinit);
    19801981
    1981     my ($pbconf) = pb_conf_get("pbconfurl");
     1982    my ($pbconf,$pburl) = pb_conf_get("pbconfurl","pburl");
    19821983    $uri = $pbconf->{$ENV{'PBPROJ'}};
    19831984    my ($scheme, $account, $host, $port, $path) = pb_get_uri($uri);
    19841985
    19851986    # Checking CMS repositories status
    1986     my ($pburl) = pb_conf_get("pburl");
    19871987    ($scheme2, $account, $host, $port, $path) = pb_get_uri($pburl->{$ENV{'PBPROJ'}});
    19881988
     
    24602460my $pbscript = "$ENV{'PBDESTDIR'}/snapv";
    24612461
     2462my ($pbac) = pb_conf_get($vtype."login");
     2463
    24622464foreach my $v (@$vm) {
    24632465    # Name of the account to deal with for VM/VE
    24642466    # Do not use the one passed potentially with -a
    2465     my ($pbac) = pb_conf_get($vtype."login");
    24662467    my ($vmexist,$vmpid);
    24672468
Note: See TracChangeset for help on using the changeset viewer.