From f4d652c97156ddefaeef06c9060632efa0f64706 Mon Sep 17 00:00:00 2001 From: Raphael Hertzog Date: Tue, 1 Jan 2008 16:13:26 +0100 Subject: [PATCH] dpkg-source: Integrate readmd5sum from controllib --- ChangeLog | 3 +++ scripts/dpkg-source.pl | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2cd89bb3..6359b943 100644 --- 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 * scripts/Dpkg/ErrorHandling.pm (syntaxerr): New function to diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index 6fee10e1..caf104dc 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -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; +} + -- 2.39.5