]> err.no Git - dpkg/commitdiff
dpkg-source: Integrate readmd5sum from controllib
authorRaphael Hertzog <hertzog@debian.org>
Tue, 1 Jan 2008 15:13:26 +0000 (16:13 +0100)
committerRaphael Hertzog <hertzog@debian.org>
Tue, 1 Jan 2008 19:27:11 +0000 (20:27 +0100)
ChangeLog
scripts/dpkg-source.pl

index 2cd89bb311b3cf4cad3e75619ac70333fa9ba3ff..6359b943a8cbda359ce306de3f06740b2e1368f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -52,6 +52,9 @@
        anything useful anymore as it got dropped from several other
        scripts over the years without problems.
 
+       * scripts/dpkg-source.pl: Integrate readmd5sum from controllib here
+       as it's the only user of that function.
+
 2007-12-28  Raphael Hertzog  <hertzog@debian.org>
 
        * scripts/Dpkg/ErrorHandling.pm (syntaxerr): New function to
index 6fee10e1ba28c3f8994ed870e7be784eb0a86392..caf104dc5138bc1ec69f9a7943e9a8920e944570 100755 (executable)
@@ -1668,3 +1668,10 @@ sub deoctify {
     return join("", @_);
 } }
 
+sub readmd5sum {
+    (my $md5sum = shift) or return;
+    $md5sum =~ s/^([0-9a-f]{32})\s*\*?-?\s*\n?$/$1/o
+        || failure(_g("md5sum gave bogus output `%s'"), $md5sum);
+    return $md5sum;
+}
+