Changeset 415


Ignore:
Timestamp:
Apr 26, 2008, 2:45:36 AM (11 years ago)
Author:
bruno
Message:
  • Adds support for a build system conf file under $vmpath/.pbrc or $vepath/.pbrc
  • Fix .pm modes
Location:
devel
Files:
5 edited

Legend:

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

    r409 r415  
    6060sub pb_conf_init {
    6161
     62pb_log(2,"DEBUG: pb_conf_init with ".Dumper(@_)."\n");
    6263@pbconffiles = @_;
    6364}
     
    7172sub pb_conf_add {
    7273
    73 my $f = shift;
    74 
    75 push(@pbconffiles,"$f");
     74pb_log(2,"DEBUG: pb_conf_add with ".Dumper(@_)."\n");
     75push(@pbconffiles,@_);
    7676}
    7777
     
    220220my $p2;
    221221
    222 pb_log(2,"DEBUG: pb_conf_get param1: ".Dumper(@ptr1)."\n");
    223 pb_log(2,"DEBUG: pb_conf_get param2: ".Dumper(@ptr2)."\n");
     222pb_log(2,"DEBUG: pb_conf_get $conffile: ".Dumper(@ptr1)."\n");
     223pb_log(2,"DEBUG: pb_conf_get input: ".Dumper(@ptr2)."\n");
    224224
    225225foreach my $i (0..$#param) {
     
    229229    # in order to mask what could be defined already in ptr2
    230230    if (not defined $p2) {
     231        # exit if no p1 either
     232        last if ((not defined $p1) || (not defined $ENV{'PBPROJ'}));
    231233        # No ref in p2 so use p1
    232234        $p1->{$ENV{'PBPROJ'}} = $p1->{'default'} if ((not defined $p1->{$ENV{'PBPROJ'}}) && (defined $p1->{'default'}));
     
    261263    $ptr1[$i] = $p1;
    262264}
    263 pb_log(2,"DEBUG: pb_conf_get param ptr1: ".Dumper(@ptr1)."\n");
     265pb_log(2,"DEBUG: pb_conf_get output: ".Dumper(@ptr1)."\n");
    264266return(\@ptr1);
    265267}
  • 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#
  • devel/pb/lib/ProjectBuilder/CMS.pm

    • Property svn:executable deleted
  • devel/pb/lib/ProjectBuilder/Changelog.pm

    • Property svn:executable deleted
  • devel/pb/lib/ProjectBuilder/Filter.pm

    • Property svn:executable deleted
Note: See TracChangeset for help on using the changeset viewer.