aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-02 14:08:46 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-02 14:08:46 +0000
commitb836671002d06a12958ff968893ac35f0e04143f (patch)
treeb2a8f705495d062cb634c2d0cd08c691ab13d1ab
parent1760cfe15b2b778eb9d2adeae2df3c3336c728fa (diff)
downloadrpmdrake-b836671002d06a12958ff968893ac35f0e04143f.tar
rpmdrake-b836671002d06a12958ff968893ac35f0e04143f.tar.gz
rpmdrake-b836671002d06a12958ff968893ac35f0e04143f.tar.bz2
rpmdrake-b836671002d06a12958ff968893ac35f0e04143f.tar.xz
rpmdrake-b836671002d06a12958ff968893ac35f0e04143f.zip
automatically select kernels if /root/.rpmdrake contains "automatically_update_kernels 1"
-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() {