Changeset 1181


Ignore:
Timestamp:
02/12/11 01:56:42 (2 years ago)
Author:
bruno
Message:
  • Fix rpmbootstrap and pb newve order, which wasn't working after the latest pbos introduction
  • rpmbootstrap wasn't using the right conf file when launched with sudo is fixed by using the SUDO_USER env. var.
  • pb.conf rbsmirrorsrv now uses pbos var, and is filtered correctly.
Location:
devel
Files:
4 edited

Legend:

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

    r1179 r1181  
    322322# URL of the directory containing the packages mentioned in rbsmindep.  
    323323# You can use some rpmbootstrap variables here: 
    324 # $ddir: name of the distribution 
    325 # $dver: version of the distribution 
    326 # $darch: architecture of the distribution 
     324# $pbos->{'name'}: name of the distribution 
     325# $pbos->{'version'}: version of the distribution 
     326# $pbos->{'arch'}: architecture of the distribution 
    327327# You need an http based mirror for the moment 
    328 #rbsmirrorsrv fedora = http://download.fedora.redhat.com/pub/fedora/linux/releases/$dver/Everything/$darch/os/Packages/ 
    329 rbsmirrorsrv fedora = http://mirrors.kernel.org/fedora/releases/$dver/Fedora/$darch/os/Packages 
    330 rbsmirrorsrv centos-4 = http://mirrors.kernel.org/centos/4.8/os/$darch/CentOS/RPMS 
    331 rbsmirrorsrv centos-5 = http://mirrors.kernel.org/centos/5.5/os/$darch/CentOS 
     328#rbsmirrorsrv fedora = http://download.fedora.redhat.com/pub/fedora/linux/releases/$pbos->{'version'}/Everything/$pbos->{'arch'}/os/Packages/ 
     329rbsmirrorsrv fedora = http://mirrors.kernel.org/fedora/releases/$pbos->{'version'}/Fedora/$pbos->{'arch'}/os/Packages 
     330rbsmirrorsrv centos-4 = http://mirrors.kernel.org/centos/4.8/os/$pbos->{'arch'}/CentOS/RPMS 
     331rbsmirrorsrv centos-5 = http://mirrors.kernel.org/centos/5.5/os/$pbos->{'arch'}/CentOS 
    332332rbsmirrorsrv centos-5-ia64 = http://dev.centos.org/~z00dax/ia64/c5-wip/ia64/RPMS/ 
    333333#rbsmirrorsrv rhel = 
    334 # darch == i586 for i386 repo 
    335 rbsmirrorsrv opensuse = http://mirrors.kernel.org/opensuse/distribution/$dver/repo/oss/suse/$darch/ 
    336 # darch == i586 for i386 repo 
    337 rbsmirrorsrv mandriva = http://mirrors.kernel.org/mandriva/Mandrakelinux/official/$dver/$darch/media/main/release/ 
     334# pbos->{'arch'} == i586 for i386 repo 
     335rbsmirrorsrv opensuse = http://mirrors.kernel.org/opensuse/distribution/$pbos->{'version'}/repo/oss/suse/$pbos->{'arch'}/ 
     336# pbos->{'arch'} == i586 for i386 repo 
     337rbsmirrorsrv mandriva = http://mirrors.kernel.org/mandriva/Mandrakelinux/official/$pbos->{'version'}/$pbos->{'arch'}/media/main/release/ 
    338338#rbsmirrorsrv debian = http://ftp.us.debian.org/debian/ 
    339339#rbsmirrorsrv ubuntu = http://us.releases.ubuntu.com/releases/ 
     
    470470ospkg default = project-builder 
    471471# Where is the associated repo 
    472 osrepo rpm = ftp://ftp.project-builder.org/$ddir/$dver/pb.repo 
     472osrepo rpm = ftp://ftp.project-builder.org/$pbos->{'name'}/$pbos->{'version'}/pb.repo 
    473473 
    474474# Number of process in // for pb 
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r1177 r1181  
    541541    if ($param =~ /[^\\]\$/) { 
    542542        pb_log(3,"Expanding variable on $param\n"); 
    543         eval { $param =~ s/(\$\w+)/$1/eeg }; 
     543        eval { $param =~ s/(\$\w+->{\'\w+\'})/$1/eeg }; 
    544544    } 
    545545    push @param,$param; 
  • devel/pb/lib/ProjectBuilder/Env.pm

    r1176 r1181  
    5959sub pb_env_init_pbrc { 
    6060 
    61 $ENV{'PBETC'} = "$ENV{'HOME'}/.pbrc"; 
     61# if sudo, then get the real id of the user laucnhing the context  
     62# to point to the right conf file 
     63# Mandatory for rpmbootstrap calls 
     64my $dir; 
     65 
     66if (defined $ENV{'SUDO_USER'}) { 
     67    # Home dir is the 8th field in list context 
     68    $dir = (getpwnam($ENV{'SUDO_USER'}))[7]; 
     69} else { 
     70    $dir = $ENV{'HOME'}; 
     71} 
     72 
     73$ENV{'PBETC'} = "$dir/.pbrc"; 
    6274 
    6375if (! -f $ENV{'PBETC'}) { 
  • devel/rpmbootstrap/bin/rpmbootstrap

    r1177 r1181  
    230230 
    231231if (not defined $vepath) { 
    232     my ($vestdpath) = pb_conf_get_if("vepath"); 
    233     $vepath = "$vestdpath->{'default'}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}"; 
     232    my ($vestdpath) = pb_conf_get("vepath"); 
     233    $vepath = "$vestdpath->{'default'}/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}" if (defined $vestdpath->{'default'}); 
    234234} 
    235235 
     
    242242# 
    243243my ($rbscachedir) = pb_conf_get_if("rbscachedir"); 
    244 my ($pkgs,$mirror) = pb_distro_get_param($pbos->{'name'},$pbos->{'version'},$pbos->{'arch'},pb_conf_get("rbsmindep","rbsmirrorsrv")); 
     244my ($pkgs,$mirror) = pb_distro_get_param($pbos,pb_conf_get("rbsmindep","rbsmirrorsrv")); 
    245245 
    246246my $cachedir = "/var/cache/rpmbootstrap"; 
Note: See TracChangeset for help on using the changeset viewer.