Changeset 2219 in ProjectBuilder


Ignore:
Timestamp:
Mar 23, 2017, 10:58:19 AM (7 years ago)
Author:
Bruno Cornec
Message:

Fix prev*pre/post scripts

  • Use scripts located under the package name to have per package possibility
  • Fix locations to be uniquely identified now under PBTMP
  • Checked locally
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r2203 r2219  
    13261326                my $pbrealpkg = pb_cms_get_real_pkg($pbpkg,$pbos->{'type'});
    13271327                $pb->{'realpkg'} = $pbrealpkg;
    1328                 pb_log(1,"Virtual package $pbpkg has a real package name of $pbrealpkg on $pbos->{'name'}-$pbos->{'version'}\n") if ($pbrealpkg ne $pbpkg);
     1328                pb_log(2,"Virtual package $pbpkg has a real package name of $pbrealpkg on $pbos->{'name'}-$pbos->{'version'}\n") if ($pbrealpkg ne $pbpkg);
    13291329   
    13301330                # Filter build files from the less precise up to the most with overloading
     
    15411541        # Do we have additional script to run to prepare the environement for the project ?
    15421542        # Then include it in the pbconf delivery
    1543         foreach my $pbvf (<$ENV{'PBROOTDIR'}/pbv*.pre>,<$ENV{'PBROOTDIR'}/pbv*.post>, <$ENV{'PBROOTDIR'}/pbtest*>) {
     1543        foreach my $pbvf (<$ENV{'PBROOTDIR'}/$pbpkg/pbv*.pre>,<$ENV{'PBROOTDIR'}/$pbpkg/pbv*.post>, <$ENV{'PBROOTDIR'}/$pbpkg/pbtest*>) {
     1544            pb_log(1,"Handling file $pbvf\n");
    15441545            if (-x "$pbvf") {
    1545                 my $target = "$ENV{'PBDESTDIR'}/".basename($pbvf);
     1546                my $target = "$ENV{'PBTMP'}/".basename($pbvf);
    15461547                pb_filter_file("$pbvf",$ptr,$target,$pb);
    15471548                chmod 0755,"$target";
     1549                pb_log(1,"Capturing file $pbvf in $target\n");
    15481550            }
    15491551        }
     
    34013403
    34023404    # We may need to do some other tasks before building. Read a script here to finish setup
    3403     if (-x "$ENV{'PBDESTDIR'}/pb$vtype".".pre") {
     3405    if (-x "$ENV{'PBTMP'}/pb$vtype".".pre") {
    34043406        print SCRIPT "# Special pre-instructions to be launched\n";
    3405         print SCRIPT pb_get_content("$ENV{'PBDESTDIR'}/pb$vtype".".pre");
    3406     }
    3407 
    3408     if (-x "$ENV{'PBDESTDIR'}/pb$vtype"."$action.pre") {
     3407        print SCRIPT pb_get_content("$ENV{'PBTMP'}/pb$vtype".".pre");
     3408    }
     3409
     3410    if (-x "$ENV{'PBTMP'}/pb$vtype"."$action.pre") {
    34093411        print SCRIPT "# Special pre-$action instructions to be launched\n";
    3410         print SCRIPT pb_get_content("$ENV{'PBDESTDIR'}/pb$vtype"."$action.pre");
     3412        print SCRIPT pb_get_content("$ENV{'PBTMP'}/pb$vtype"."$action.pre");
    34113413    }
    34123414
     
    34273429
    34283430    # We may need to do some other tasks after building. Read a script here to exit properly
    3429     if (-x "$ENV{'PBDESTDIR'}/pb$vtype"."$action.post") {
     3431    if (-x "$ENV{'PBTMP'}/pb$vtype"."$action.post") {
    34303432        print SCRIPT "# Special post-$action instructions to be launched\n";
    3431         print SCRIPT pb_get_content("$ENV{'PBDESTDIR'}/pb$vtype"."$action.post");
    3432     }
    3433 
    3434     if (-x "$ENV{'PBDESTDIR'}/pb$vtype".".post") {
     3433        print SCRIPT pb_get_content("$ENV{'PBTMP'}/pb$vtype"."$action.post");
     3434    }
     3435
     3436    if (-x "$ENV{'PBTMP'}/pb$vtype".".post") {
    34353437        print SCRIPT "# Special post-instructions to be launched\n";
    3436         print SCRIPT pb_get_content("$ENV{'PBDESTDIR'}/pb$vtype".".post");
     3438        print SCRIPT pb_get_content("$ENV{'PBTMP'}/pb$vtype".".post");
    34373439    }
    34383440
Note: See TracChangeset for help on using the changeset viewer.