Changeset 963 in ProjectBuilder


Ignore:
Timestamp:
Feb 8, 2010, 3:47:36 AM (14 years ago)
Author:
Bruno Cornec
Message:

r3658@localhost: bruno | 2010-02-07 00:15:25 +0100

  • Fix a bug in newve, by calling pb_distrib_init earlier to have the loading of the pb.conf main conf file, used to install default packages.
Location:
devel
Files:
4 edited

Legend:

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

    r962 r963  
    224224osremovedotinver redhat = true
    225225
    226 # These deps are needed before setupvm can be run.
     226# These deps are needed before setupvm|ve can be run.
    227227# Install them with your distribution in VM or automatically in VE
    228228osmindep default = perl,sudo,wget,tar,make,gzip
  • devel/pb-modules/lib/ProjectBuilder/Conf.pm

    r932 r963  
    9393    # Add the new one at the end
    9494    my $num = keys %pbconffiles;
     95    pb_log(2,"DEBUG: pb_conf_add $cf at position $num\n");
    9596    $pbconffiles{$cf} = $num;
    9697}
     
    169170=item B<pb_conf_get_if>
    170171
    171 This function returns a table, corresponding to a set of values querried in the conf files or undef if it doen't exist. It takes a table of keys as an input parameter.
     172This function returns a table, corresponding to a set of values queried in the conf files or undef if it doen't exist. It takes a table of keys as an input parameter.
    172173
    173174The format of the configurations file is as follows:
     
    206207# the most important conf file is first, so read them in reverse order
    207208foreach my $f (reverse sort { $pbconffiles{$a} <=> $pbconffiles{$b} } keys %pbconffiles) {
     209    pb_log(2,"DEBUG: pb_conf_get_if in file $f\n");
    208210    $ptr = pb_conf_get_fromfile_if("$f",$ptr,@param);
    209211}
     
    241243my $p2;
    242244
    243 pb_log(2,"DEBUG: pb_conf_get $conffile: ".Dumper(@ptr1)."\n");
    244 pb_log(2,"DEBUG: pb_conf_get input: ".Dumper(@ptr2)."\n");
    245 pb_log(2,"DEBUG: pb_conf_get param: ".Dumper(@param)."\n");
     245pb_log(2,"DEBUG: pb_conf_get_from_file $conffile: ".Dumper(@ptr1)."\n");
     246pb_log(2,"DEBUG: pb_conf_get_from_file input: ".Dumper(@ptr2)."\n");
     247pb_log(2,"DEBUG: pb_conf_get_from_file param: ".Dumper(@param)."\n");
    246248
    247249foreach my $i (0..$#param) {
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r962 r963  
    439439    $param = $opt->{"default"};
    440440} else {
    441     $param = "unknown";
     441    $param = "";
    442442}
    443443return($param);
  • devel/pb/bin/pb

    r940 r963  
    17211721    # VE here
    17221722    } else {
    1723         # Get VE context
    1724         my ($ptr,$vetmout,$vepath,$verebuild,$veconf,$vepostinstall) = pb_conf_get("vetype","vetmout","vepath","verebuild","veconf");
    1725         my ($veb4pi,$vepi,$vesnap,$oscodename,$vepkglist,$osmindep) = pb_conf_get_if("veb4pi","vepi","vesnap","oscodename","vepkglist","osmindep");
    1726         my $vetype = $ptr->{$ENV{'PBPROJ'}};
    1727 
    17281723        # Get distro context
    17291724        my ($name,$ver,$darch) = split(/-/,$v);
    17301725        chomp($darch);
    17311726        my ($ddir, $dver, $dfam, $dtype, $pbsuf) = pb_distro_init($name,$ver,$darch);
     1727
     1728        # Get VE context
     1729        my ($ptr,$vetmout,$vepath,$verebuild,$veconf) = pb_conf_get("vetype","vetmout","vepath","verebuild","veconf");
     1730        my $vetype = $ptr->{$ENV{'PBPROJ'}};
     1731
     1732        # We can probably only get those params now we have the distro context
     1733        my ($veb4pi,$vepi,$vesnap,$oscodename,$vepkglist,$osmindep) = pb_conf_get_if("veb4pi","vepi","vesnap","oscodename","vepkglist","osmindep");
    17321734
    17331735        if (($vetype eq "chroot") || ($vetype eq "schroot")) {
     
    17671769                        $postparam .= ",";
    17681770                        $postparam .= pb_distro_get_param($ddir,$dver,$darch,$vepkglist);
    1769                         if ($postparam eq "") {
     1771                        if ($postparam eq ",") {
    17701772                            $addpkgs = "";
    17711773                        } else {
     
    17961798                    $postparam .= ",";
    17971799                    $postparam .= pb_distro_get_param($ddir,$dver,$darch,$vepkglist);
    1798                     if ($postparam eq "") {
     1800                    if ($postparam eq ",") {
    17991801                        $addpkgs = "";
    18001802                    } else {
Note: See TracChangeset for help on using the changeset viewer.