diff options
author | Francois Pons <fpons@mandriva.com> | 2000-09-27 09:47:51 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-09-27 09:47:51 +0000 |
commit | 6525a25e03c46dee839a826a205254f535fb41a1 (patch) | |
tree | 0c88453f99fc4ca632c9fbfe2ffe16ec80134120 /perl-install/pkgs.pm | |
parent | c64c1b315a80af149538a7a0e07f06fc4c3af9cb (diff) | |
download | drakx-6525a25e03c46dee839a826a205254f535fb41a1.tar drakx-6525a25e03c46dee839a826a205254f535fb41a1.tar.gz drakx-6525a25e03c46dee839a826a205254f535fb41a1.tar.bz2 drakx-6525a25e03c46dee839a826a205254f535fb41a1.tar.xz drakx-6525a25e03c46dee839a826a205254f535fb41a1.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r-- | perl-install/pkgs.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index a5b063dfd..f489db953 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -1001,6 +1001,8 @@ sub selectPackagesToUpgrade($$$;$$) { @{$toRemove || []} = keys %toRemove; } +sub allowedToUpgrade { $_[0] !~ /^(kernel|kernel-secure|kernel-smp|kernel-linus|hackkernel)$/ } + sub installCallback { my $msg = shift; log::l($msg .": ". join(',', @_)); @@ -1136,7 +1138,7 @@ sub install($$$;$$) { my $trans = c::rpmtransCreateSet($db, $prefix); log::l("opened rpm database for transaction of ". scalar @transToInstall ." new packages, still $nb after that to do"); - c::rpmtransAddPackage($trans, $_->{header}, packageName($_), $isUpgrade && packageName($_) !~ /kernel/) #- TODO: replace `named kernel' by `provides kernel' + c::rpmtransAddPackage($trans, $_->{header}, packageName($_), $isUpgrade && allowedToUpgrade(packageName($_))) foreach @transToInstall; c::rpmdepOrder($trans) or @@ -1205,7 +1207,7 @@ sub remove($$) { foreach my $p (@$toRemove) { #- stuff remove all packages that matches $p, not a problem since $p has name-version-release format. - c::rpmtransRemovePackages($db, $trans, $p) if $p !~ /kernel/; + c::rpmtransRemovePackages($db, $trans, $p) if allowedToUpgrade($p); } eval { fs::mount("/proc", "$prefix/proc", "proc", 0) } unless -e "$prefix/proc/cpuinfo"; |