summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-07 20:36:02 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-07 20:36:02 +0000
commitc54d9828bb2eb4a38197b8d656aefd52c9c9ea36 (patch)
tree8c32b0093874f3970bc84978aa94ab96cff65d20
parente20472ada208c7cd6ca78af41f2bc5939350ef99 (diff)
downloadurpmi-c54d9828bb2eb4a38197b8d656aefd52c9c9ea36.tar
urpmi-c54d9828bb2eb4a38197b8d656aefd52c9c9ea36.tar.gz
urpmi-c54d9828bb2eb4a38197b8d656aefd52c9c9ea36.tar.bz2
urpmi-c54d9828bb2eb4a38197b8d656aefd52c9c9ea36.tar.xz
urpmi-c54d9828bb2eb4a38197b8d656aefd52c9c9ea36.zip
with --urpmi-root, we do not use statedir_media_info_file to allow compatibility with older urpmi
-rw-r--r--NEWS2
-rw-r--r--urpm/media.pm5
2 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 669be7fd..56fb1256 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@
for eg: /var/lib/urpmi/synthesis.hdlist.<medium-name> is now
/var/lib/urpmi/<medium-name>/synthesis.hdlist.cz
it allows easier medium update without using urpmi.update (#31893)
+ (but with --urpmi-root, old statedir files are used to allow compatibility
+ with older urpmi)
o fix handling --urpmi-root <relative dir>
- gurpmi:
o do cancel when pressing the 'No' button (#41648)
diff --git a/urpm/media.pm b/urpm/media.pm
index 943f528a..69883f6d 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -725,7 +725,10 @@ sub add_medium {
#- those files must not be there (cf mdvbz#36267)
_clean_statedir_medium_files($urpm, $medium);
- mkdir statedir_media_info_dir($urpm, $medium), 0755 if !$options{virtual} || !_local_file($medium);
+ if (!($options{virtual} && _local_file($medium))
+ && !$urpm->{urpmi_root}) { # with --urpmi-root, we do not use statedir_media_info_file to allow compatibility with older urpmi
+ mkdir statedir_media_info_dir($urpm, $medium), 0755;
+ }
if ($options{virtual}) {
$medium->{virtual} = 1;