Changeset 415 for devel/pb/bin/pb


Ignore:
Timestamp:
Apr 26, 2008, 2:45:36 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • Adds support for a build system conf file under $vmpath/.pbrc or $vepath/.pbrc
  • Fix .pm modes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r409 r415  
    768768    my $dir = "sshdir";
    769769    my $port = "sshport";
    770     my $tmout = "sshtmout";
    771     my $path = "sshpath";
    772770    my $conf = "sshconf";
    773771    my $rebuild = "sshrebuild";
     772    my $tmout = "vmtmout";
     773    my $path = "vmpath";
    774774    if (($cmt eq "vm") || ($cmt eq "Script")) {
    775775        $login = "vmlogin";
     
    825825    if (($cmt eq "vm") || ($cmt eq "ve")) {
    826826        $src="$src $ENV{'PBDESTDIR'}/pbscript $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb $ENV{'PBETC'} $ENV{'PBDESTDIR'}/pbrc";
     827        # Adds conf file used for final delivery
     828        pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb");
    827829    } elsif ($cmt eq "Script") {
    828830        $src="$src $ENV{'PBDESTDIR'}/pbscript";
     
    850852    pb_log(0,"Sources handled ($cmt): $src\n");
    851853    pb_log(2,"values: ".Dumper(($host,$login,$dir,$port,$tmout,$rebuild,$path,$conf))."\n");
    852     my ($sshhost,$sshlogin,$sshdir,$sshport,$vtmout,$vrebuild,$vepath,$veconf) = pb_conf_get($host,$login,$dir,$port,$tmout,$rebuild,$path,$conf);
     854    my ($sshhost,$sshlogin,$sshdir,$sshport,$vtmout,$vepath) = pb_conf_get($host,$login,$dir,$port,$tmout,$path);
     855    my ($vrebuild,$veconf) = pb_conf_get_if($rebuild,$conf);
    853856    pb_log(2,"ssh: ".Dumper(($sshhost,$sshlogin,$sshdir,$sshport,$vtmout,$vrebuild,$vepath,$veconf))."\n");
    854857    # Not mandatory
     
    10011004        die "-i iso parameter needed" if (((not defined $iso) || ($iso eq "")) && ($create != 0));
    10021005
    1003         my ($ptr,$vmopt,$vmport,$vmpath,$vmtmout,$vmsize) = pb_conf_get("vmtype","vmopt","vmport","vmpath","vmtmout","vmsize");
     1006        my ($ptr,$vmopt,$vmpath,$vmport,$vmtmout,$vmsize) = pb_conf_get("vmtype","vmopt","vmpath","vmport","vmtmout","vmsize");
    10041007
    10051008        my $vmtype = $ptr->{$ENV{'PBPROJ'}};
     
    10671070    } else {
    10681071        # Get VE context
    1069         my ($ptr,$vepath,$vetmout,$verebuild,$veconf) = pb_conf_get("vetype","vepath","vetmout","verebuild","veconf");
     1072        my ($ptr,$vetmout,$vepath,$verebuild,$veconf) = pb_conf_get("vetype","vetmout","vepath","verebuild","veconf");
    10701073        my $vetype = $ptr->{$ENV{'PBPROJ'}};
    10711074
     
    11711174    my ($scheme2,$uri) = pb_cms_init($pbinit);
    11721175
    1173     my ($pbconf) = pb_conf_read("$ENV{'PBETC'}","pbconfurl");
     1176    my ($pbconf) = pb_conf_get("pbconfurl");
    11741177    $uri = $pbconf->{$ENV{'PBPROJ'}};
    11751178    my ($scheme, $account, $host, $port, $path) = pb_get_uri($uri);
     
    16681671# and use its content
    16691672#
    1670 my ($pbconf) = pb_conf_read("$ENV{'PBETC'}","pbconfurl");
     1673my ($pbconf) = pb_conf_get("pbconfurl");
    16711674pb_log(2,"DEBUG pbconfurl: ".Dumper($pbconf)."\n");
    16721675
     
    16911694    die "Please create a pbconfurl reference for project $ENV{'PBPROJ'} in $ENV{'PBETC'}\n";
    16921695}
     1696
     1697# Adds a potential conf file now as it's more
     1698# important than the project conf file
     1699my ($vmpath,$vepath) = pb_conf_get("vmpath","vepath");
     1700pb_conf_add("$vmpath->{$ENV{'PBPROJ'}}/.pbrc") if (-f "$vmpath->{$ENV{'PBPROJ'}}/.pbrc");
     1701pb_conf_add("$vepath->{$ENV{'PBPROJ'}}/.pbrc") if (-f "$vepath->{$ENV{'PBPROJ'}}/.pbrc");
    16931702
    16941703#
Note: See TracChangeset for help on using the changeset viewer.