diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-07 20:36:02 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-07 20:36:02 +0000 |
commit | c54d9828bb2eb4a38197b8d656aefd52c9c9ea36 (patch) | |
tree | 8c32b0093874f3970bc84978aa94ab96cff65d20 | |
parent | e20472ada208c7cd6ca78af41f2bc5939350ef99 (diff) | |
download | urpmi-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-- | NEWS | 2 | ||||
-rw-r--r-- | urpm/media.pm | 5 |
2 files changed, 6 insertions, 1 deletions
@@ -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; |