diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-11-14 12:06:12 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-11-14 12:06:12 +0000 |
commit | f796f81358d135a578dbb0bb3c431a6989b67570 (patch) | |
tree | 839da06fe4a89a1a4ad9a4e6bc2bce90038c469e | |
parent | 429c79a35ce4ee08558a5b3eba79ecfd943da5ac (diff) | |
download | urpmi-f796f81358d135a578dbb0bb3c431a6989b67570.tar urpmi-f796f81358d135a578dbb0bb3c431a6989b67570.tar.gz urpmi-f796f81358d135a578dbb0bb3c431a6989b67570.tar.bz2 urpmi-f796f81358d135a578dbb0bb3c431a6989b67570.tar.xz urpmi-f796f81358d135a578dbb0bb3c431a6989b67570.zip |
factorize code
-rw-r--r-- | urpm.pm | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -3386,12 +3386,9 @@ sub compute_local_md5sum { my ($urpm, $medium) = @_; $urpm->{log}(N("computing md5sum of existing source hdlist (or synthesis)")); - if ($medium->{synthesis}) { - -e statedir_synthesis($urpm, $medium) and - $medium->{md5sum} = md5sum(statedir_synthesis($urpm, $medium)); - } else { - -e statedir_hdlist($urpm, $medium) and - $medium->{md5sum} = md5sum(statedir_hdlist($urpm, $medium)); + my $f = $medium->{synthesis} ? statedir_synthesis($urpm, $medium) : statedir_hdlist($urpm, $medium); + if (-e $f) { + $medium->{md5sum} = md5sum($f); } } |