Changeset 2425


Ignore:
Timestamp:
Sep 1, 2019, 2:51:25 AM (7 weeks ago)
Author:
bruno
Message:

Fix directory structure creation in VCS and name by default package as project name

File:
1 edited

Legend:

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

    r2404 r2425  
    396396        if (defined $pbinit) {
    397397            my @pkgs = @ARGV;
    398             @pkgs = ("pkg1") if (not @pkgs);
     398            @pkgs = ("$ENV{'PBPROJ'}") if (not @pkgs);
    399399   
     400            # Case where the parent dir of PBROOTDIR isn't managed yet in VCS
     401            pb_mkdir_p(dirname("$ENV{'PBROOTDIR'}"));
     402            pb_vcs_add_if_not_in($pbconf{$ENV{'PBPROJ'}},dirname("$ENV{'PBROOTDIR'}"));
     403            pb_mkdir_p("$ENV{'PBROOTDIR'}");
     404            pb_vcs_add_if_not_in($pbconf{$ENV{'PBPROJ'}},"$ENV{'PBROOTDIR'}");
     405            my $msg = "Project $ENV{'PBPROJ'} structure creation";
     406            pb_vcs_checkin($pbconf{$ENV{'PBPROJ'}},"$ENV{'PBROOTDIR'}",$msg);
    400407            open(CONF,"> $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml") || die "Unable to create $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml";
    401408            print CONF << "EOF";
     
    548555#
    549556# Additional repository to add at build time
    550 #  addrepo:
     557#  addbuildrepo:
    551558#    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
    552559#    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
     
    12951302            }
    12961303            pb_vcs_add($pbconf{$ENV{'PBPROJ'}},$ENV{'PBCONFDIR'});
    1297             my $msg = "Project $ENV{'PBPROJ'} creation";
     1304            $msg = "Project $ENV{'PBPROJ'} creation";
    12981305            pb_vcs_checkin($pbconf{$ENV{'PBPROJ'}},"$ENV{'PBCONFDIR'}",$msg);
    12991306        } else {
Note: See TracChangeset for help on using the changeset viewer.