summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-01-30 16:34:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-01-30 16:34:54 +0000
commit1a37761af1afca35e066f985d65335acfd14d61f (patch)
tree7bcd7a910358ae69a333f17937bc8e69518e68cc
parent973767032f41458c0a0467d9b31852b8d108fb14 (diff)
downloadurpmi-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.
-rw-r--r--NEWS2
-rw-r--r--urpm/media.pm19
2 files changed, 14 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index 25afada1..fed99edb 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,7 @@
o enhance pkg list formatting for "The following packages contain %s: %s"
error message (#29178)
- urpmf:
- o fix --synthesis
+ o fix --synthesis (it may break urpmq/urpmi --synthesis)
- urpmq:
o add --no-suggests
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};