diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-01-30 16:34:54 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-01-30 16:34:54 +0000 |
commit | 1a37761af1afca35e066f985d65335acfd14d61f (patch) | |
tree | 7bcd7a910358ae69a333f17937bc8e69518e68cc /urpm | |
parent | 973767032f41458c0a0467d9b31852b8d108fb14 (diff) | |
download | urpmi-1a37761af1afca35e066f985d65335acfd14d61f.tar urpmi-1a37761af1afca35e066f985d65335acfd14d61f.tar.gz urpmi-1a37761af1afca35e066f985d65335acfd14d61f.tar.bz2 urpmi-1a37761af1afca35e066f985d65335acfd14d61f.tar.xz urpmi-1a37761af1afca35e066f985d65335acfd14d61f.zip |
changing the way --synthesis is done in urpm::media::configure.
This is used by urpmi/urpmq/urpmf.
--synthesis will now be more similar to using a virtual medium (a la
--use-distrib), compared to really only using the given synthesis.
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/media.pm | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/urpm/media.pm b/urpm/media.pm index ad66b9ed..6c8c9f9e 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -452,12 +452,19 @@ sub configure { #- synthesis take precedence over media, update options. $options{media} || $options{excludemedia} || $options{sortmedia} || $options{update} || $options{usedistrib} || $options{parallel} and $urpm->{fatal}(1, N("--synthesis cannot be used with --media, --excludemedia, --sortmedia, --update, --use-distrib or --parallel")); - $urpm->parse_synthesis($options{synthesis}); - #- synthesis disables the split of transaction (too risky and not useful). - $urpm->{options}{'split-length'} = 0; + + my $synthesis = $options{synthesis}; + if ($synthesis !~ m!^/!) { + require Cwd; + $synthesis = Cwd::getcwd() . '/' . $synthesis; + } + my ($url, $with) = $synthesis =~ m!(.*)/+(media_info/+synthesis\.hdlist\.cz)$! ? ($1, $2) : + (dirname($synthesis), basename($synthesis)); + + $urpm->{media} = []; + add_medium($urpm, 'Virtual', $url, $with, %options, virtual => 1); } - } else { - if ($options{usedistrib}) { + } elsif ($options{usedistrib}) { $urpm->{media} = []; add_distrib_media($urpm, "Virtual", $options{usedistrib}, %options, 'virtual' => 1); } else { @@ -495,7 +502,7 @@ sub configure { $urpm->{media} = [ @sorted_media, @remaining ]; } _parse_media($urpm, \%options) if !$options{nodepslist}; - } + #- determine package to withdraw (from skip.list file) only if something should be withdrawn. if (!$options{nodepslist}) { _compute_flags_for_skiplist($urpm, $options{cmdline_skiplist}) if !$options{no_skiplist}; |