Subject: [PATCH] Make the code compatible with etch; Dpkg::Version didn't exist by then.

From: Raphael Geissert <[email-masked]>
Date: Sat, 7 Feb 2009 19:20:30 -0600

---
 unpack/unpack-srcpkg-l1 |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/unpack/unpack-srcpkg-l1 b/unpack/unpack-srcpkg-l1
index 854cfe7..898e583 100755
--- a/unpack/unpack-srcpkg-l1
+++ b/unpack/unpack-srcpkg-l1
@@ -36,7 +36,6 @@ use Util;
 
 use File::Basename;
 use Lintian::Command qw(spawn);
-use Dpkg::Version qw(parseversion);
 
 # stat $file
 (my @stat = stat $file) or fail("$file: cannot stat: $!");
@@ -61,7 +60,17 @@ for my $field (keys %$data) {
 my $dir = dirname($file);
 my $name = basename($file);
 my $tarball;
-my %version = parseversion($data->{'version'});
+my %version;
+
+# Based on Dpkg::Versionn::parseversion:
+if ($data->{'version'} =~ /(.+)-(.*)$/) {
+    $version{'version'} = $1;
+    $version{'revision'} = $2;
+} else {
+    $version{'version'} = $data->{'version'};
+    $version{'revision'} = 0;
+}
+
 my $basename = $data->{'source'} . '_' . $version{'version'};
 my $basenamerev = $data->{'source'} . '_' . $data->{'version'};