aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMandrivaUpdate5
-rw-r--r--rpmdrake.pm5
2 files changed, 7 insertions, 3 deletions
diff --git a/MandrivaUpdate b/MandrivaUpdate
index e2c527ea..904d791c 100755
--- a/MandrivaUpdate
+++ b/MandrivaUpdate
@@ -58,8 +58,9 @@ sub refresh_packages_list {
# don't select kernel*-latest by default and the kernels they require:
foreach my $name (@requested) {
- $pkgs->{$name}{selected} = to_bool($name !~ /^kernel/);
- $pkgs->{$name}{pkg}->set_flag_required($name !~ /^kernel/);
+ my $selected = $automatically_update_kernels->[0] ? 1 : $name !~ /^kernel/;
+ $pkgs->{$name}{selected} = to_bool($selected);
+ $pkgs->{$name}{pkg}->set_flag_required($selected);
}
@{$list->{data}} = map {
diff --git a/rpmdrake.pm b/rpmdrake.pm
index 0c8864e4..5f906c58 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -46,6 +46,7 @@ use curl_download;
our @ISA = qw(Exporter);
our $VERSION = '2.27';
our @EXPORT = qw(
+ $automatically_update_kernels
$changelog_first_config
$mandrakeupdate_wanted_categories
$already_splashed
@@ -148,7 +149,8 @@ sub myexit { ugtk2::exit(undef, @_) }
$ENV{HOME} ||= '/root';
our $configfile = "$ENV{HOME}/.rpmdrake";
-our ($changelog_first_config, $tree_flat, $tree_mode, $max_info_in_descr, $already_splashed, $mandrakeupdate_wanted_categories);
+our ($already_splashed, $changelog_first_config, $max_info_in_descr, $tree_flat, $tree_mode);
+our ($automatically_update_kernels, $mandrakeupdate_wanted_categories);
our %config = (
mandrakeupdate_wanted_categories => { var => \$mandrakeupdate_wanted_categories, default => [ qw(security) ] },
already_splashed => { var => \$already_splashed, default => [] },
@@ -156,6 +158,7 @@ our %config = (
tree_mode => { var => \$tree_mode, default => [ qw(mandrake_choices) ] },
tree_flat => { var => \$tree_flat, default => [ 0 ] },
changelog_first_config => { var => \$changelog_first_config, default => [ 0 ] },
+ automatically_update_kernels => { var => \$automatically_update_kernels, default => [ 0 ]},
);
sub readconf() {