Changeset 1212 in ProjectBuilder


Ignore:
Timestamp:
Feb 21, 2011, 12:20:02 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • pb_mkdir_p doesn't return anything anymore. Test of return removed.
  • Packages installed are not using really the install command not the update one.
Location:
devel
Files:
4 edited

Legend:

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

    r1156 r1212  
    108108my @dir = @_;
    109109my $ret = mkpath(@dir, 0, 0755);
    110 return($ret);
     110return(0);
    111111}
    112112
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r1181 r1212  
    302302
    303303# Protection
    304 return if (not defined $pbos->{'update'});
     304return if (not defined $pbos->{'install'});
    305305
    306306# Get dependencies in the build file if not forced
     
    310310if ($deps !~ /^[    ]*$/) {
    311311    # This may not be // proof. We should test for availability of repo and sleep if not
    312     pb_system("$pbos->{'update'} $deps","Installing dependencies ($deps)");
     312    pb_system("$pbos->{'install'} $deps","Installing dependencies ($deps)");
    313313    }
    314314}
  • devel/pb/bin/pb

    r1208 r1212  
    11911191    $pkg = { } if (not defined $pkg);
    11921192
    1193     pb_mkdir_p("$ENV{'PBBUILDDIR'}") || die "Unable to create $ENV{'PBBUILDDIR'}";
     1193    pb_mkdir_p("$ENV{'PBBUILDDIR'}") if (! -d "$ENV{'PBBUILDDIR'}");
    11941194    chdir "$ENV{'PBBUILDDIR'}" || die "Unable to chdir to $ENV{'PBBUILDDIR'}";
    11951195    my $made = ""; # pkgs made during build
     
    12171217            foreach my $d ('RPMS','SRPMS','SPECS','SOURCES','BUILD') {
    12181218                if (! -d "$ENV{'PBBUILDDIR'}/$d") {
    1219                 pb_mkdir_p("$ENV{'PBBUILDDIR'}/$d") || die "Please ensure that you can write into $ENV{'PBBUILDDIR'} to create $d\nchown the $ENV{'PBBUILDDIR'} directory to your uid";
     1219                    pb_mkdir_p("$ENV{'PBBUILDDIR'}/$d");
    12201220                }
    12211221            }
     
    15581558        $pkg = { } if (not defined $pkg);
    15591559
    1560         pb_mkdir_p("$ENV{'PBBUILDDIR'}") || die "Unable to create $ENV{'PBBUILDDIR'}";
     1560        pb_mkdir_p("$ENV{'PBBUILDDIR'}") if (! -d "$ENV{'PBBUILDDIR'}");
    15611561        chdir "$ENV{'PBBUILDDIR'}" || die "Unable to chdir to $ENV{'PBBUILDDIR'}";
    15621562        foreach my $pbpkg (@pkgs) {
  • devel/pb/lib/ProjectBuilder/Env.pm

    r1181 r1212  
    255255        # svn import "$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}" svn://repo
    256256        # in case it doesn't exist there
    257         pb_mkdir_p("$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}") || die "Unable to recursively create $ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}";
     257        pb_mkdir_p("$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}");
    258258    }
    259259    pb_cms_add($pbconf{$ENV{'PBPROJ'}},"$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}");
     
    283283}
    284284if (! -d "$ENV{'PBDESTDIR'}") {
    285     pb_mkdir_p($ENV{'PBDESTDIR'}) || die "Unable to recursively create $ENV{'PBDESTDIR'}";
     285    pb_mkdir_p($ENV{'PBDESTDIR'});
    286286}
    287287
     
    291291$ENV{'PBBUILDDIR'}="$ENV{'PBDEFDIR'}/$ENV{'PBPROJ'}/build";
    292292if (! -d "$ENV{'PBBUILDDIR'}") {
    293     pb_mkdir_p($ENV{'PBBUILDDIR'}) || die "Unable to recursively create $ENV{'PBBUILDDIR'}";
     293    pb_mkdir_p($ENV{'PBBUILDDIR'});
    294294}
    295295
     
    549549            }
    550550            close(CONF);
    551             pb_mkdir_p("$ENV{'PBROOTDIR'}/pbfilter") || die "Unable to create $ENV{'PBROOTDIR'}/pbfilter";
     551            pb_mkdir_p("$ENV{'PBROOTDIR'}/pbfilter");
    552552            open(CONF,"> $ENV{'PBROOTDIR'}/pbfilter/all.pbf") || die "Unable to create $ENV{'PBROOTDIR'}/pbfilter/all.pbf";
    553553            print CONF << "EOF";
     
    761761            close(CONF);
    762762            foreach my $pp (@pkgs) {
    763                 pb_mkdir_p("$ENV{'PBROOTDIR'}/$pp/deb") || die "Unable to create $ENV{'PBROOTDIR'}/$pp/deb";
     763                pb_mkdir_p("$ENV{'PBROOTDIR'}/$pp/deb");
    764764                open(CONF,"> $ENV{'PBROOTDIR'}/$pp/deb/control") || die "Unable to create $ENV{'PBROOTDIR'}/$pp/deb/control";
    765765                print CONF << "EOF";
     
    979979EOF
    980980                close(CONF);
    981                 pb_mkdir_p("$ENV{'PBROOTDIR'}/$pp/rpm") || die "Unable to create $ENV{'PBROOTDIR'}/$pp/rpm";
     981                pb_mkdir_p("$ENV{'PBROOTDIR'}/$pp/rpm");
    982982                open(CONF,"> $ENV{'PBROOTDIR'}/$pp/rpm/$pp.spec") || die "Unable to create $ENV{'PBROOTDIR'}/$pp/rpm/$pp.spec";
    983983                print CONF << 'EOF';
     
    10471047EOF
    10481048                close(CONF);
    1049                 pb_mkdir_p("$ENV{'PBROOTDIR'}/$pp/pbfilter") || die "Unable to create $ENV{'PBROOTDIR'}/$pp/pbfilter";
    1050                 pb_mkdir_p("$ENV{'PBROOTDIR'}/$pp/pkg") || die "Unable to create $ENV{'PBROOTDIR'}/$pp/pkg";
     1049                pb_mkdir_p("$ENV{'PBROOTDIR'}/$pp/pbfilter");
     1050                pb_mkdir_p("$ENV{'PBROOTDIR'}/$pp/pkg");
    10511051                open(CONF,"> $ENV{'PBROOTDIR'}/$pp/pkg/pkginfo") || die "Unable to create $ENV{'PBROOTDIR'}/$pp/pkg/pkginfo";
    10521052                print CONF << 'EOF';
Note: See TracChangeset for help on using the changeset viewer.