summaryrefslogtreecommitdiffstats
path: root/urpm/md5sum.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-08-31 16:45:13 +0000
committerThierry Vignaud <tv@mageia.org>2012-08-31 16:45:13 +0000
commit3cd85172bf689b679e8c1fc626690ba87b136d74 (patch)
treed73d48ff546eb7f1667b7f179ad031c326354753 /urpm/md5sum.pm
parent9dadc64a5547524da5fcbe188b2d443709f627f0 (diff)
downloadurpmi-3cd85172bf689b679e8c1fc626690ba87b136d74.tar
urpmi-3cd85172bf689b679e8c1fc626690ba87b136d74.tar.gz
urpmi-3cd85172bf689b679e8c1fc626690ba87b136d74.tar.bz2
urpmi-3cd85172bf689b679e8c1fc626690ba87b136d74.tar.xz
urpmi-3cd85172bf689b679e8c1fc626690ba87b136d74.zip
document some functions
Diffstat (limited to 'urpm/md5sum.pm')
-rw-r--r--urpm/md5sum.pm29
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 };