summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-28 17:30:27 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-28 17:30:27 +0000
commitd4e05ef6ea05525bf3b14ff1990e8864763ccb0f (patch)
tree80aebafc46e648795fa96c59af42dcd18591f3a2 /urpm.pm
parentc8d5d629efb6f2a6f24e14c1e77404f30b4792a9 (diff)
downloadurpmi-d4e05ef6ea05525bf3b14ff1990e8864763ccb0f.tar
urpmi-d4e05ef6ea05525bf3b14ff1990e8864763ccb0f.tar.gz
urpmi-d4e05ef6ea05525bf3b14ff1990e8864763ccb0f.tar.bz2
urpmi-d4e05ef6ea05525bf3b14ff1990e8864763ccb0f.tar.xz
urpmi-d4e05ef6ea05525bf3b14ff1990e8864763ccb0f.zip
factorize default options, and have them by default in $urpm->{options}
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 979370d8..2309bd58 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -24,6 +24,15 @@ sub shunt_ignorearch {
eval q( sub URPM::Package::is_arch_compat { 1 } );
}
+sub default_options {
+ {
+ 'split-level' => 1,
+ 'split-length' => 8,
+ 'verify-rpm' => 1,
+ 'post-clean' => 1,
+ };
+}
+
#- create a new urpm object.
sub new {
my ($class) = @_;
@@ -35,7 +44,7 @@ sub new {
obsoletes => {},
media => undef,
- options => {},
+ options => default_options(),
fatal => sub { printf STDERR "%s\n", $_[1]; exit($_[0]) },
error => sub { printf STDERR "%s\n", $_[0] },