summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-09-19 13:14:59 +0000
committerOlivier Blin <oblin@mandriva.com>2007-09-19 13:14:59 +0000
commit09b99541de8bbacd9f06d759a2e3c384ef4cc100 (patch)
treeebb3d0fd9ec12aaf42a28752cce256cc752f451f
parentccab815627e5ad56367a204cc78a7e3ce0b26e37 (diff)
downloaddrakx-backup-do-not-use-09b99541de8bbacd9f06d759a2e3c384ef4cc100.tar
drakx-backup-do-not-use-09b99541de8bbacd9f06d759a2e3c384ef4cc100.tar.gz
drakx-backup-do-not-use-09b99541de8bbacd9f06d759a2e3c384ef4cc100.tar.bz2
drakx-backup-do-not-use-09b99541de8bbacd9f06d759a2e3c384ef4cc100.tar.xz
drakx-backup-do-not-use-09b99541de8bbacd9f06d759a2e3c384ef4cc100.zip
allow to specify keep_unrequested_dependencies in auto_inst
-rw-r--r--perl-install/install/any.pm2
-rw-r--r--perl-install/install/pkgs.pm6
2 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm
index 0d27d2e36..40e92ec99 100644
--- a/perl-install/install/any.pm
+++ b/perl-install/install/any.pm
@@ -358,7 +358,7 @@ sub setPackages {
require install::pkgs;
{
- $o->{packages} = install::pkgs::empty_packages();
+ $o->{packages} = install::pkgs::empty_packages($o->{keep_unrequested_dependencies});
my $media = $o->{media} || [ { type => 'media_cfg', url => 'drakx://media' } ];
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index c67843912..70769dfaa 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -316,7 +316,8 @@ sub unselectAllPackages {
resolve_requested_and_check($packages, $packages->{state}, \%keep_selected);
}
-sub empty_packages() {
+sub empty_packages {
+ my ($o_keep_unrequested_dependencies) = @_;
my $packages = new URPM;
#- add additional fields used by DrakX.
@@ -324,7 +325,8 @@ sub empty_packages() {
$packages->{log} = \&log::l;
$packages->{prefer_vendor_list} = '/etc/urpmi/prefer.vendor.list';
- $packages->{keep_unrequested_dependencies} = 1;
+ $packages->{keep_unrequested_dependencies} =
+ defined($o_keep_unrequested_dependencies) ? $o_keep_unrequested_dependencies : 1;
$packages;
}