Changeset 452 in ProjectBuilder for devel/pb/lib/ProjectBuilder/Env.pm


Ignore:
Timestamp:
May 27, 2008, 1:46:52 AM (16 years ago)
Author:
Bruno Cornec
Message:
  • Make newproj action work again
  • Add pb_cms_add function
  • Change interface of pb_cms_checkin (third param)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/lib/ProjectBuilder/Env.pm

    r430 r452  
    168168
    169169pb_log(2,"PBDEFDIR: $ENV{'PBDEFDIR'}\n");
     170
     171# Put under CMS the PBPROJ dir
     172if (defined $pbinit) {
     173    if (! -d "$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}") {
     174        pb_mkdir_p("$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}") || die "Unable to recursively create $ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}";
     175    }
     176    pb_cms_add($pbconf{$ENV{'PBPROJ'}},"$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}");
     177}
     178
    170179#
    171180# Set delivery directory
     
    212221# return values in that case are useless
    213222#
    214 if (($action =~ /^cms2/) || ($action =~ /^newver$/) || ($action =~ /^pbinit$/)) {
     223if (($action =~ /^cms2/) || ($action =~ /^newver$/) || ($action =~ /pbinit/) || ($action =~ /^newproj$/)) {
    215224
    216225    #
     
    240249            }
    241250            closedir(DIR);
    242             die "No directory found under $ENV{'PBCONFDIR'}" if (not defined $ENV{'PBROOTDIR'});
    243251            pb_log(1,"WARNING: no pbroot defined, using $ENV{'PBROOTDIR'}\n");
    244252            pb_log(1,"         Please use -r release if you want to use another release\n");
     253            die "No directory found under $ENV{'PBCONFDIR'}" if (not defined $ENV{'PBROOTDIR'});
    245254        } else {
    246255            my ($pbroot) = pb_conf_read_if("$ENV{'PBDESTDIR'}/pbrc","pbroot");
     
    318327    } else {
    319328        if (defined $pbinit) {
    320             my $ptr = pb_get_pkg();
    321             my @pkgs = @$ptr;
     329            my @pkgs = @ARGV;
    322330            @pkgs = ("pkg1") if (not @pkgs);
    323331   
     
    837845                pb_mkdir_p("$ENV{'PBROOTDIR'}/$pp/pbfilter") || die "Unable to create $ENV{'PBROOTDIR'}/$pp/pbfilter";
    838846   
    839                 pb_log(0,"\nDo not to forget to commit the pbconf directory in your CMS if needed\n");
    840847            }
     848            pb_cms_add($pbconf{$ENV{'PBPROJ'}},$ENV{'PBCONFDIR'});
     849            pb_cms_checkin($pbconf{$ENV{'PBPROJ'}},"$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}",$pbinit);
    841850        } else {
    842851            die "Unable to open $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb";
Note: See TracChangeset for help on using the changeset viewer.