aboutsummaryrefslogtreecommitdiffstats
path: root/rpmdrake.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-05 13:42:48 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-05 13:42:48 +0000
commit74f50445dcc90bca88bd6e403fe1cc0395863833 (patch)
tree84b742bc2b292c9ed49160e483e174c046cd4197 /rpmdrake.pm
parentf91f32f83d5defda2fb1daa134394ae54b1e1ff7 (diff)
downloadrpmdrake-74f50445dcc90bca88bd6e403fe1cc0395863833.tar
rpmdrake-74f50445dcc90bca88bd6e403fe1cc0395863833.tar.gz
rpmdrake-74f50445dcc90bca88bd6e403fe1cc0395863833.tar.bz2
rpmdrake-74f50445dcc90bca88bd6e403fe1cc0395863833.tar.xz
rpmdrake-74f50445dcc90bca88bd6e403fe1cc0395863833.zip
Make the changelog-first option configurable in ~/.rpmdrake (cf bug 11888)
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r--rpmdrake.pm28
1 files changed, 14 insertions, 14 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm
index 23905c92..d8b70ebc 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -31,16 +31,14 @@ use URPM;
use URPM::Resolve;
use packdrake;
use strict;
-use vars qw(@ISA @EXPORT $configfile %config $mandrakeupdate_wanted_categories $already_splashed $max_info_in_descr $tree_mode $tree_flat $typical_width);
use log;
use c;
use curl_download;
-@ISA = qw(Exporter);
-@EXPORT = qw(
- $configfile
- %config
+our @ISA = qw(Exporter);
+our @EXPORT = qw(
+ $changelog_first_config
$mandrakeupdate_wanted_categories
$already_splashed
$max_info_in_descr
@@ -72,7 +70,7 @@ use curl_download;
add_medium_and_check
check_update_media_version
);
-
+our $typical_width;
eval { require ugtk2; ugtk2->import(qw(:all)) };
if ($@) {
@@ -124,16 +122,18 @@ sub myexit { ugtk2::exit(undef, @_) }
$ENV{HOME} ||= '/root';
+our $configfile = "$ENV{HOME}/.rpmdrake";
+our %config = (
+ mandrakeupdate_wanted_categories => { var => \our $mandrakeupdate_wanted_categories, default => [ qw(security) ] },
+ already_splashed => { var => \our $already_splashed, default => [] },
+ max_info_in_descr => { var => \our $max_info_in_descr, default => [] },
+ tree_mode => { var => \our $tree_mode, default => [ qw(mandrake_choices) ] },
+ tree_flat => { var => \our $tree_flat, default => [ 0 ] },
+ changelog_first_config => { var => \our $changelog_first_config, default => [ 0 ] },
+);
+
sub readconf {
- $configfile = "$ENV{HOME}/.rpmdrake";
- %config = (mandrakeupdate_wanted_categories => { var => \$mandrakeupdate_wanted_categories, default => [ qw(security) ] },
- already_splashed => { var => \$already_splashed, default => [] },
- max_info_in_descr => { var => \$max_info_in_descr, default => [] },
- tree_mode => { var => \$tree_mode, default => [ qw(mandrake_choices) ] },
- tree_flat => { var => \$tree_flat, default => [ 0 ] },
- );
${$config{$_}{var}} = $config{$_}{default} foreach keys %config;
-
foreach my $l (cat_($configfile)) {
$l =~ /^\Q$_\E (.*)/ and ${$config{$_}{var}} = [ split ' ', $1 ] foreach keys %config;
}