diff options
-rw-r--r-- | perl-install/crypto.pm | 9 | ||||
-rw-r--r-- | perl-install/pkgs.pm | 32 |
2 files changed, 29 insertions, 12 deletions
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm index 8fa979678..30cc02c5a 100644 --- a/perl-install/crypto.pm +++ b/perl-install/crypto.pm @@ -126,6 +126,13 @@ sub getPackages { $crypto::host = $mirror; + #- get pubkey file first as we cannot handle 2 files opened simultaneously. + my $pubkey; + eval { + my $fpubkey = getFile("base/pubkey", $mirror); + $pubkey = [ $packages->parse_armored_file($fpubkey) ]; + }; + #- check first if there is something to get... my $fhdlist = getFile("base/hdlist.cz", $mirror); unless ($fhdlist) { @@ -136,7 +143,7 @@ sub getPackages { #- extract hdlist of crypto, then depslist. require pkgs; my $update_medium = pkgs::psUsingHdlist($prefix, 'ftp', $packages, "hdlist-updates.cz", "1u", "RPMS", - "Updates for Mandrake Linux " . version(), 1, $fhdlist); + "Updates for Mandrake Linux " . version(), 1, $fhdlist, $pubkey); if ($update_medium) { log::l("read updates hdlist"); #- keep in mind where is the URL prefix used according to mirror (for install_any::install_urpmi). diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 8037c9fa2..2f7f62ce9 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -225,7 +225,10 @@ sub packageCallbackChoices { } else { my @l = grep { #- or if a kernel has to be chosen, chose the basic one. - $_->arch ne 'src' && $_->name =~ /kernel-\d/ and return $_; + if ($_->arch ne 'src') { + $_->name =~ /kernel-\d/ and return $_; + $_->name =~ /kernel-i686/ and return $_; + } #- or even if a package requires a specific locales which #- is already selected. @@ -290,10 +293,6 @@ sub unselectPackage($$;$) { } 1; } -sub togglePackageSelection($$;$) { - my ($packages, $pkg, $o_otherOnly) = @_; - $pkg->flag_selected ? unselectPackage($packages, $pkg, $o_otherOnly) : selectPackage($packages, $pkg, 0, $o_otherOnly); -} sub setPackageSelection($$$) { my ($packages, $pkg, $value) = @_; $value ? selectPackage($packages, $pkg) : unselectPackage($packages, $pkg); @@ -362,7 +361,7 @@ sub psUsingHdlists { chomp; s/\s*#.*$//; /^\s*$/ and next; - m/^\s*(noauto:)?(hdlist\S*\.cz2?)\s+(\S+)\s*(.*)$/ or die "invalid hdlist description \"$_\" in hdlists file"; + m/^\s*(noauto:)?(hdlist\S*\.cz2?)\s+(\S+)\s*(.*)$/ or die qq(invalid hdlist description "$_" in hdlists file); #- make sure the first medium is always selected! #- by default select all image. @@ -378,7 +377,7 @@ sub psUsingHdlists { } sub psUsingHdlist { - my ($prefix, $method, $packages, $hdlist, $medium, $rpmsdir, $descr, $selected, $o_fhdlist) = @_; + my ($prefix, $method, $packages, $hdlist, $medium, $rpmsdir, $descr, $selected, $o_fhdlist, $o_pubkey) = @_; my $fakemedium = "$descr ($method$medium)"; my $urpmidir = -w "$prefix/var/lib/urpmi" ? "$prefix/var/lib/urpmi" : "/tmp"; log::l("trying to read $hdlist for medium $medium"); @@ -416,8 +415,13 @@ sub psUsingHdlist { #- get all keys corresponding in the right pubkey file, #- they will be added in rpmdb later if not found. - my $pubkey = install_any::getFile("Mandrake/base/pubkey" . ($hdlist =~ /hdlist(\S*)\.cz2?/ && $1)); - $m->{pubkey} = [ $packages->parse_armored_file($pubkey) ]; + if (!$o_fhdlist || $o_pubkey) { + $m->{pubkey} = $o_pubkey; + unless ($m->{pubkey}) { + my $pubkey = install_any::getFile("Mandrake/base/pubkey" . ($hdlist =~ /hdlist(\S*)\.cz2?/ && $1)); + $m->{pubkey} = [ $packages->parse_armored_file($pubkey) ]; + } + } #- integrate medium in media list, only here to avoid download error (update) to be propagated. $packages->{mediums}{$medium} = $m; @@ -530,10 +534,16 @@ sub read_rpmsrate { sub readCompssUsers { my ($meta_class) = @_; - my (%compssUsers, @sorted, $l); my $file = 'Mandrake/base/compssUsers'; my $f = $meta_class && install_any::getFile("$file.$meta_class") || install_any::getFile($file) or die "can't find $file"; + readCompssUsers_raw($f); +} + +sub readCompssUsers_raw { + my ($f) = @_; + my (%compssUsers, @sorted, $l); + local $_; while (<$f>) { /^\s*$/ || /^#/ and next; @@ -1077,7 +1087,7 @@ sub install($$$;$$) { difference2([ $$, hashtree2list(getppid(), \%ppids) ], [ hashtree2list($$, \%ppids) ]) ]); - if (@killpid) { + if (@killpid && $::isInstall) { foreach (@killpid) { my ($prog, @para) = split("\0", cat_("/proc/$_/cmdline")); log::l("ERROR: DrakX should not have to clean the packages shit. Killing $_: " . join(' ', $prog, @para) . ".") if $prog ne '/usr/lib/gconfd-2'; |