Changeset 1066


Ignore:
Timestamp:
Jun 27, 2010, 3:27:20 PM (9 years ago)
Author:
bruno
Message:

r3935@dhcp184-49-175-19: bruno | 2010-06-26 08:40:49 +0200

  • Adds new "Walt Disney" feature: possibility to deliver in multiple variable dirs, and not just / and test
Location:
devel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/etc/pb.conf.pod

    r1029 r1066  
    3030 Conffile: project
    3131 Example: defpkgdir mondorescue = mondo,mindi NB: a default value is not really meaningful.
     32
     33=item B<delivery>
     34
     35 Nature: Optional
     36 Key: project (as defined in the -p option or PBPROJ environment variable)
     37 Value: directory where to deliver packages once built for ftp/web access.
     38 Conffile: project
     39 Example: delivery mondorescue = prod
    3240
    3341=item B<extpkgdir>
  • devel/pb/bin/pb

    r1065 r1066  
    12501250    my ($sshhost,$sshlogin,$sshdir,$sshport) = pb_conf_get($host,$login,$dir,$port);
    12511251    # Not mandatory...
    1252     my ($rbsconf,$testver) = pb_conf_get_if($conf,"testver");
     1252    my ($rbsconf,$testver,$delivery) = pb_conf_get_if($conf,"testver","delivery");
    12531253    my ($vtmout,$vepath);
    12541254    # ...Except those in virtual context
     
    12771277    my $bdir;
    12781278    if (($cmt eq "Sources") || ($cmt =~ /V[EM]Script/)) {
    1279         $tdir = $sshdir->{$ENV{'PBPROJ'}}."/src";
    1280         if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)) {
    1281             # This is a test pkg => target dir is under test
    1282             $tdir = $sshdir->{$ENV{'PBPROJ'}}."/test/src";
    1283         }
     1279        $tdir = "$sshdir->{$ENV{'PBPROJ'}}/$delivery/src";
    12841280    } elsif (($cmt =~ /V[EM]build/)  || ($cmt =~ /V[EM]test/)) {
    12851281        $tdir = $sshdir->{$ENV{'PBPROJ'}}."/$ENV{'PBPROJ'}/delivery";
     
    12881284        $bdir =~ s|\$ENV.+\}/||;
    12891285    } elsif ($cmt eq "Announce") {
    1290         $tdir = "$sshdir->{$ENV{'PBPROJ'}}";
    1291         if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)) {
    1292             # This is a test pkg => target dir is under test
    1293             $tdir = $sshdir->{$ENV{'PBPROJ'}}."/test";
    1294         }
     1286        $tdir = "$sshdir->{$ENV{'PBPROJ'}}/$delivery";
    12951287    } elsif ($cmt eq "Web") {
    1296         $tdir = "$sshdir->{$ENV{'PBPROJ'}}";
    1297         if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)) {
    1298             # This is a test website => target dir is under test
    1299             $tdir = $sshdir->{$ENV{'PBPROJ'}}."/../test";
    1300         }
     1288        $tdir = "$sshdir->{$ENV{'PBPROJ'}}/$delivery";
    13011289    } elsif ($cmt eq "Packages") {
    1302         $tdir = $sshdir->{$ENV{'PBPROJ'}}."/$ddir/$dver";
    1303 
    1304         if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)) {
    1305             # This is a test pkg => target dir is under test
    1306             $tdir = $sshdir->{$ENV{'PBPROJ'}}."/test/$ddir/$dver";
    1307         }
     1290        $tdir = "$sshdir->{$ENV{'PBPROJ'}}/$delivery/$ddir/$dver";
    13081291
    13091292        my $repodir = $tdir;
     
    21342117        s/^testver/#testver/;
    21352118        print OUT $_;
     2119        pb_log(0,"Please check delivery ($_) in $ENV{'PBROOTDIR'}/../$newver/$ENV{'PBPROJ'}.pb\n") if (/^delivery/);
    21362120    }
    21372121    close(FILE);
     
    26512635    }
    26522636    $findstr .= " | grep -Ev \'src.rpm\'";
    2653     if ((not defined $testver) || (not defined $testver->{$ENV{'PBPROJ'}}) || ($testver->{$ENV{'PBPROJ'}} !~ /true/i)) {
    2654         $findstr .= " | grep -v ./test/";
    2655     }
    26562637
    26572638    # Prepare the command to run and execute it
  • devel/pb/lib/ProjectBuilder/Env.pm

    r986 r1066  
    478478
    479479# Additional repository to add at build time
    480 # addrepo centos-5-x86_64 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm,ftp://ftp.project-builder.org/test/centos/5/pb.repo
    481 # addrepo centos-5-x86_64 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm,ftp://ftp.project-builder.org/test/centos/5/pb.repo
     480# addrepo centos-5-x86_64 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm,ftp://ftp.project-builder.org/centos/5/pb.repo
     481# addrepo centos-5-x86_64 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm,ftp://ftp.project-builder.org/centos/5/pb.repo
    482482#version $ENV{'PBPROJ'} = devel,stable
    483483
    484484# Is it a test version or a production version
    485485testver $ENV{'PBPROJ'} = true
     486# Which upper target dir for delivery
     487delivery $ENV{'PBPROJ'} = test
    486488
    487489# Additional repository to add at build time
    488 # addrepo centos-5-x86_64 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm,ftp://ftp.project-builder.org/test/centos/5/pb.repo
    489 # addrepo centos-4-x86_64 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.x86_64.rpm,ftp://ftp.project-builder.org/test/centos/4/pb.repo
     490# addrepo centos-5-x86_64 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm,ftp://ftp.project-builder.org/centos/5/pb.repo
     491# addrepo centos-4-x86_64 = http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.x86_64.rpm,ftp://ftp.project-builder.org/centos/4/pb.repo
    490492
    491493# Adapt to your needs:
Note: See TracChangeset for help on using the changeset viewer.