diff options
-rw-r--r-- | urpm.pm | 7 | ||||
-rw-r--r-- | urpm/util.pm | 1 |
2 files changed, 5 insertions, 3 deletions
@@ -231,7 +231,8 @@ sub read_config { while (<MD5SUM>) { my ($md5sum, $file) = /(\S*)\s+(.*)/; foreach (@{$urpm->{media}}) { - ($_->{synthesis} && "synthesis.").$_->{hdlist} eq $file and $_->{md5sum} = $md5sum, last; + ($_->{synthesis} ? "synthesis." : "").$_->{hdlist} eq $file + and $_->{md5sum} = $md5sum, last; } } close MD5SUM; @@ -1575,8 +1576,8 @@ this could happen if you mounted manually the directory when creating the medium } } else { #- the flag is no more necessary. - delete $medium->{list}; - unlink "$urpm->{statedir}/$medium->{list}"; + delete $medium->{list} + and unlink "$urpm->{statedir}/$medium->{list}"; } } } diff --git a/urpm/util.pm b/urpm/util.pm index cbfcb06b..01121284 100644 --- a/urpm/util.pm +++ b/urpm/util.pm @@ -19,6 +19,7 @@ sub reduce_pathname { #- clean url to remove any macro (which cannot be solved now). #- take care if this is a true url and not a simple pathname. my ($host, $dir) = $url =~ m|([^:/]*://[^/]*/)?(.*)|; + $host = '' if !defined $host; #- remove any multiple /s or trailing /. #- then split all components of pathname. |