Changeset 2012 in ProjectBuilder for devel/rpmbootstrap/bin/rpmbootstrap
- Timestamp:
- Oct 12, 2015, 12:17:48 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/rpmbootstrap/bin/rpmbootstrap
r1982 r2012 354 354 if (($pbos->{'name'} eq "fedora") && ($pbos->{'version'} > 8)) { 355 355 $oscachedir = "$vepath/var/cache/yum/$pbos->{'arch'}/$pbos->{'version'}/fedora/packages"; 356 $osupdcachedir = "$vepath/var/cache/yum/$pbos->{'arch'}/$pbos->{'version'}/updates/packages";356 #$osupdcachedir = "$vepath/var/cache/yum/$pbos->{'arch'}/$pbos->{'version'}/updates/packages"; 357 357 $osupdcachedir = "$vepath/var/cache/yum/updates-released/packages/"; 358 358 } 359 } elsif ($pbos->{'install'} =~ /dnf/) { 360 $osupdname = "DNF"; 361 $oscachedir = "$vepath/var/cache/dnf/$pbos->{'arch'}/$pbos->{'version'}/fedora/packages"; 362 $osupdcachedir = "$vepath/var/cache/dnf/updates-released/packages/"; 359 363 } elsif ($pbos->{'install'} =~ /zypper/) { 360 364 $oscachedir = "$vepath/var/cache/zypp/packages/opensuse/suse/$pbos->{'arch'}"; … … 442 446 443 447 # yum needs that distro-release package be installed, so force it 444 if ( $pbos->{'install'} =~ /yum/) {448 if (($pbos->{'install'} =~ /yum/) || ($pbos->{'install'} =~ /dnf/)) { 445 449 my $ddir = $pbos->{'name'}; 446 450 foreach my $p1 (<$cachedir/($ddir|redhat)-release-*.rpm>) { … … 504 508 505 509 pb_log(1,"Adapting $osupdname repository entries\n"); 506 if ( $pbos->{'install'} =~ /yum/) {510 if (($pbos->{'install'} =~ /yum/) || ($pbos->{'install'} =~ /dnf/)) { 507 511 # 508 # Force the architecture for yum 512 # Force the architecture for yum/dnf 509 513 # The goal is to allow i386 chroot on x86_64 510 514 # 511 # FIX: Not sufficient to have yum working515 # FIX: Not sufficient to have yum/dnf working 512 516 # mirrorlist is not usable 513 517 # $releasever also needs to be filtered 514 518 # yum.conf as well 515 foreach my $i (<$vepath/etc/yum.repos.d/*.repo>,"$vepath/etc/yum.conf" ) {519 foreach my $i (<$vepath/etc/yum.repos.d/*.repo>,"$vepath/etc/yum.conf","$vepath/etc/dnf/dnf.conf") { 516 520 pb_system("sed -i -e 's/\$basearch/$pbos->{'arch'}/g' $i","","quiet"); 517 521 pb_system("sed -i -e 's/\$releasever/$pbos->{'version'}/g' $i","","quiet"); … … 521 525 pb_system("sed -i -e 's|^#baseurl.*\$|baseurl=$repo|' $i","","quiet"); 522 526 } 523 $minipkglist = "ldconfig yum passwd vim-minimal dhclient authconfig"; 527 my $pkgmgr = ""; 528 if ($pbos->{'install'} =~ /yum/) { 529 $pkgmgr = "yum"; 530 } 531 if ($pbos->{'install'} =~ /dnf/) { 532 $pkgmgr = "dnf"; 533 } 534 $minipkglist = "ldconfig $pkgmgr passwd vim-minimal dhclient authconfig"; 524 535 } elsif ($pbos->{'install'} =~ /zypper/) { 525 536 pb_mkdir_p("$vepath/etc/zypp/repos.d"); … … 626 637 pb_system("chroot $vepath /usr/bin/yum clean all","Cleaning yum"); 627 638 } 639 if ($pbos->{'install'} =~ /dnf/) { 640 pb_system("chroot $vepath /usr/bin/dnf clean all","Cleaning dnf"); 641 } 628 642 pb_system("umount $vepath/proc","Unmounting /proc"); 629 643 find(\&unlink_old_conf, $vepath); … … 704 718 my $repo = $mirror; 705 719 my $found = 0; 706 if ( $pbos->{'install'} =~ /yum/) {720 if (($pbos->{'install'} =~ /yum/) || ($pbos->{'install'} =~ /dnf/)) { 707 721 my $response1; 708 722 while ($found == 0) {
Note:
See TracChangeset
for help on using the changeset viewer.