summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;