diff options
Diffstat (limited to 'urpm/md5sum.pm')
-rw-r--r-- | urpm/md5sum.pm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/urpm/md5sum.pm b/urpm/md5sum.pm index 8c1b7389..62a21512 100644 --- a/urpm/md5sum.pm +++ b/urpm/md5sum.pm @@ -17,6 +17,14 @@ urpm::md5sum - Meta-data checking routines for urpmi =cut + +=item parse($md5sum_file) + +Parse a MD5SUM file. +Returns a hash of file => md5sum + +=cut + sub parse { my ($md5sum_file) = @_; @@ -28,6 +36,14 @@ sub parse { \%h; } + +=item parse($md5sum_file) + +Check size and parse a MD5SUM file. +Returns a hash of file => md5sum + +=cut + sub check_file { my ($md5sum_file) = @_; @@ -40,6 +56,13 @@ sub from_MD5SUM__or_warn { $md5sums->{$basename}; } + +=item versioned_media_info_file($urpm, $medium, $basename) + +Returns the latest versionated file name for $basename + +=cut + sub versioned_media_info_file { my ($urpm, $medium, $basename) = @_; my $md5sums = $medium->{parsed_md5sum} or $urpm->{log}("$medium->{name} has no md5sum"), return; @@ -54,6 +77,12 @@ sub versioned_media_info_file { $l[0]; } +=item compute($file) + +Return the MD5SUM control sum of $file + +=cut + sub compute { my ($file) = @_; eval { require Digest::MD5 }; |