Changeset 2214


Ignore:
Timestamp:
Mar 14, 2017, 2:54:00 AM (9 months ago)
Author:
bruno
Message:

Revert most of rev [2204]

There was an error on the directory considered for PBPRJDIR and PBDEFDIR/PBPROJ.
Back to normal now, as well as the case of pbinit files which was also broken

Location:
devel
Files:
2 edited

Legend:

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

    r2208 r2214  
    171171# That's always the environment variable that will be used
    172172$ENV{'PBPROJ'} = $proj;
    173 pb_log(2,"PBPROJ: $ENV{'PBPROJ'}\n");
     173pb_log(1,"PBPROJ: $ENV{'PBPROJ'}\n");
    174174
    175175if (not defined ($pbconf{$ENV{'PBPROJ'}})) {
     
    203203  ---------------------------------------------                ----------
    204204  *      *        *       |        |          |                *        *
    205  tag    dev    pbconf    ...    bpbuild  pbdelivery PBCONFDIR dev      tag                 
     205 tag    dev    pbconf    ...    pbbuild  pbdelivery PBCONFDIR dev      tag                 
    206206  |               |                           |     PBDESTDIR           |
    207207  ---          ------                        pbrc   PBBUILDDIR       -------
     
    244244# Expand potential env variable in it
    245245$ENV{PBDEFDIR} = pb_path_expand($ENV{PBDEFDIR});
    246 pb_log(2,"PBDEFDIR: $ENV{'PBDEFDIR'}\n");
     246pb_log(1,"PBDEFDIR: $ENV{'PBDEFDIR'}\n");
    247247
    248248# Need to do that earlier as it's used potentialy in pb_vcs_add
     
    264264$ENV{PBPROJDIR} = pb_path_expand($ENV{PBPROJDIR});
    265265
     266my $pbconfpath = "$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}";
     267
    266268# Put under CMS the PBPROJ dir
    267269if ($action =~ /^newproj$/) {
    268     if (! -d "$ENV{'PBPROJDIR'}") {
     270    if (! -d "$pbconfpath") {
    269271        # TODO: There is also the need to do
    270         # svn import svn://repo "$ENV{'PBPROJDIR'}
     272        # svn import svn://repo "$pbconfpath
    271273        # in case it doesn't exist there
    272         pb_mkdir_p("$ENV{'PBPROJDIR'}");
     274        pb_mkdir_p("$pbconfpath");
    273275    }
    274     pb_vcs_add($pbconf{$ENV{'PBPROJ'}},"$ENV{'PBPROJDIR'}");
     276    pb_vcs_add($pbconf{$ENV{'PBPROJ'}},"$pbconfpath");
    275277}
    276278
     
    278280# Set delivery directory
    279281#
    280 $ENV{'PBDESTDIR'}="$ENV{'PBPROJDIR'}/pbdelivery";
    281 
    282 pb_log(2,"PBDESTDIR: $ENV{'PBDESTDIR'}\n");
     282$ENV{'PBDESTDIR'}="$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}/pbdelivery";
     283
     284pb_log(1,"PBDESTDIR: $ENV{'PBDESTDIR'}\n");
    283285#
    284286# Removes all directory existing below the delivery dir
    285 # as they are temp dir only except when called from newproj
     287# as they are temp dir only except when called from a pbinit script
    286288# Files stay and have to be cleaned up manually if needed
    287289# those files serves as communication channels between pb phases
    288290# Removing them prevents a following phase to detect what has been done before
    289291#
    290 if ((-d $ENV{'PBDESTDIR'}) && (not defined $pbinit)) {
     292if ((-d $ENV{'PBDESTDIR'}) && ($action !~ /pbinit/)) {
    291293    opendir(DIR,$ENV{'PBDESTDIR'}) || die "Unable to open directory $ENV{'PBDESTDIR'}: $!";
    292294    foreach my $d (readdir(DIR)) {
     
    304306# Set build directory
    305307#
    306 $ENV{'PBBUILDDIR'}="$ENV{'PBPROJDIR'}/pbbuild";
     308$ENV{'PBBUILDDIR'}="$pbconfpath/pbbuild";
    307309if (! -d "$ENV{'PBBUILDDIR'}") {
    308310    pb_mkdir_p($ENV{'PBBUILDDIR'});
    309311}
    310312
    311 pb_log(2,"PBBUILDDIR: $ENV{'PBBUILDDIR'}\n");
     313pb_log(1,"PBBUILDDIR: $ENV{'PBBUILDDIR'}\n");
    312314
    313315return if ($action =~ /^clean$/);
     
    318320#
    319321
    320 if ($action =~ /^(cms2|sbx2|newver|newproj|announce|checkssh|cleanssh|getconf|setupve)/) {
     322if ($action =~ /^(cms2|sbx2|newver|newproj|pbinit|announce|checkssh|cleanssh|getconf|setupve)/) {
    321323
    322324    #
    323325    # Check pbconf cms compliance
    324326    #
    325     pb_vcs_compliant("pbconfdir",'PBCONFDIR',"$ENV{'PBPROJDIR'}/pbconf",$pbconf{$ENV{'PBPROJ'}},$pbinit);
     327    pb_vcs_compliant("pbconfdir",'PBCONFDIR',"$pbconfpath/pbconf",$pbconf{$ENV{'PBPROJ'}},$pbinit);
    326328    my ($scheme, $account, $host, $port, $path) = pb_get_uri($pbconf{$ENV{'PBPROJ'}});
    327329
     
    12461248            }
    12471249            pb_vcs_add($pbconf{$ENV{'PBPROJ'}},$ENV{'PBCONFDIR'});
    1248             my $msg = "updated to ".basename("$ENV{'PBPROJDIR'}");
     1250            my $msg = "updated to ".basename("$pbconfpath");
    12491251            $msg = "Project $ENV{'PBPROJ'} creation" if (defined $pbinit);
    1250             pb_vcs_checkin($pbconf{$ENV{'PBPROJ'}},"$ENV{'PBPROJDIR'}",$msg);
     1252            pb_vcs_checkin($pbconf{$ENV{'PBPROJ'}},"$pbconfpath",$msg);
    12511253        } else {
    12521254            pb_log(0,"ERROR: no pbroot defined, used $ENV{'PBROOTDIR'}, without finding $ENV{'PBPROJ'}.pb in it\n");
  • devel/pbtest/bin/pbtest

    r2204 r2214  
    377377
    378378# test also with MondoRescue
    379 #sudopbtest b -p mondorescue -r branches/3.3 cms2pkg
     379sudopbtest "pb -p mondorescue -r branches/3.3 cms2pkg"
     380# and python-redfish
     381sudopbtest "pb -p python-redfish sbx2pkg"
    380382
    381383# cleanup
Note: See TracChangeset for help on using the changeset viewer.