Changeset 2177


Ignore:
Timestamp:
Feb 15, 2017, 9:25:39 PM (3 years ago)
Author:
Bruno Cornec
Message:

Improved build procedure

build is now calling back prep first in order to speed up the debug of
packages dependencies, so with docker you don't have to prep before (which can
takes a lot of time) before using that result

Location:
devel
Files:
2 edited

Legend:

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

    r2176 r2177  
    596596            $pn =~ s/\.rpm//;
    597597            if (pb_system("rpm -q --quiet $pn","","mayfail") != 0) {
    598                 pb_system("sudo rpm -Uvh $ENV{'PBTMP'}/$bn","Adding package to setup repository");
     598                pb_system("sudo rpm -Uvh $ENV{'PBTMP'}/$bn","Adding package $bn to setup repository");
    599599            }
    600600        } elsif ($bn =~ /\.repo$/) {
  • devel/pb/bin/pb

    r2175 r2177  
    16691669    my $do_install = shift;
    16701670
     1671        # Call build2prep in case we have new deps we want to take in account
     1672        # without redoing the prep phase (can be long and that helps debugging
     1673        # build dependencies issues
     1674    pb_build2prep();
    16711675    pb_log(0,"INFO: ------ Starting to build package ------\n");
    16721676    # Get the running distro to build on
     
    17261730            symlink "$src","$ENV{'PBBUILDDIR'}/SOURCES/".basename($src) || die "Unable to symlink $src in $ENV{'PBBUILDDIR'}/SOURCES";
    17271731            # We need to first extract the spec file
    1728             my @specfile = pb_extract_build_files($src2,"$pbpkg-$pbver$pbextdir/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/","$ENV{'PBBUILDDIR'}/SPECS","spec");
     1732            my @buildfile = pb_extract_build_files($src2,"$pbpkg-$pbver$pbextdir/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/","$ENV{'PBBUILDDIR'}/SPECS","spec");
    17291733
    17301734            # We need to handle potential patches to upstream sources
     
    17341738            pb_extract_build_files($src2,"$pbpkg-$pbver$pbextdir/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/pbsrc/","$ENV{'PBBUILDDIR'}/SOURCES","src");
    17351739
    1736             pb_log(2,"specfile: ".Dumper(\@specfile)."\n");
     1740            pb_log(2,"buildfile: ".Dumper(\@buildfile)."\n");
    17371741            # set LANGUAGE to check for correct log messages
    17381742            $ENV{'LANGUAGE'}="C";
     
    17471751            }
    17481752
    1749             foreach my $f (@specfile) {
     1753            foreach my $f (@buildfile) {
    17501754                if ($f =~ /\.spec$/) {
    17511755                    pb_system("$buildcmd $specialdef --define \"packager $ENV{'PBPACKAGER'}\" --define \"_topdir $ENV{'PBBUILDDIR'}\" -ba $f","Building package with $f under $ENV{'PBBUILDDIR'}","verbose");
Note: See TracChangeset for help on using the changeset viewer.