Changeset 1815 in ProjectBuilder


Ignore:
Timestamp:
Jan 4, 2014, 10:11:54 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • rbs_mirror_response now also returns the repo found which could be different from the initial mirror in case of metadata dir for yum (Fedora 18 and upper)
  • filesystem is now extracted first for systemd symlinks crazyness support
  • vepath is now purged before being recreated to avoid badly created previous chroot to survive operations (like with symlinks issues !)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/rpmbootstrap/bin/rpmbootstrap

    r1812 r1815  
    259259die pb_log(0,"No target-dir specified and no default vepath found in $ENV{'PBETC'}\n") if (not defined $vepath);
    260260
    261 pb_mkdir_p($vepath) if (! -d $vepath);
     261# Cleanup first
     262if ( -d $vepath) {
     263    pb_rm_rf($vepath);
     264}
     265pb_mkdir_p($vepath);
    262266
    263267#
     
    285289die "No mirror defined for $pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}" if ((not defined $mirror) || ($mirror =~ /^\t*$/));
    286290my $resp;
     291my $repo;
    287292my @list_pkg;
    288293
    289 $resp = rbs_mirror_response($mirror);
     294($repo,$resp) = rbs_mirror_response($mirror);
    290295@list_pkg = split(/\n/,$resp->as_string());
    291296
    292297# If an update source is availble add it after so that these pkgs update the main ones
    293298if (defined $updater) {
    294     $resp = rbs_mirror_response($mirror.$updater);
     299    my $void;
     300    ($void,$resp) = rbs_mirror_response($mirror.$updater);
    295301    push(@list_pkg,split(/\n/,$resp->as_string()));
    296302}
     
    299305my $parch = $pbos->{'arch'};
    300306$parch = "i[3456]86" if ($pbos->{'arch'} eq "i386");
    301 my $repowithletter = 0;
    302307
    303308# Get the list of packages and their URL in this hash
     
    366371my $lwpkg ="";
    367372my @installed_packages;
     373
     374# On systemd systems, the pkg needs to be first
     375# to have the correct links made first
     376if ($pkgs =~ /,filesystem,/) {
     377    $pkgs =~ s/,filesystem,/,/;
     378    $pkgs = "filesystem,".$pkgs;
     379}
    368380
    369381foreach my $p (split(/,/,$pkgs)) {
     
    502514        pb_system("sed -i -e 's/^mirrorlist/#mirrorlist/' $i","","quiet");
    503515        # rather use neutral separators here
    504         pb_system("sed -i -e 's|^#baseurl.*\$|baseurl=$mirror|' $i","","quiet");
     516        pb_system("sed -i -e 's|^#baseurl.*\$|baseurl=$repo|' $i","","quiet");
    505517    }
    506518    $minipkglist = "ldconfig yum passwd vim-minimal dhclient authconfig";
     
    709721    }
    710722}
    711 return($response);
    712 }
    713 
     723return($repo,$response);
     724}
     725
Note: See TracChangeset for help on using the changeset viewer.