From 503de52c45c61de5705e3d9001f3862806aaeef5 Mon Sep 17 00:00:00 2001 From: joey Date: Thu, 23 Sep 1999 18:44:53 +0000 Subject: [PATCH] * Patch from Benjamin Cant to make it work even if there is no space after control file lines in a debian package. --- debian/changelog | 7 +++++++ lib/Fromdeb.pm | 16 ++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index c7aa6bb..541118a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +alien (6.48) unstable; urgency=low + + * Patch from Benjamin Cant to make it work even if + there is no space after control file lines in a debian package. + + -- Joey Hess Thu, 23 Sep 1999 11:41:59 -0700 + alien (6.47) unstable; urgency=low * Now FHS compliant. But the packages it builds will probably not be.. diff --git a/lib/Fromdeb.pm b/lib/Fromdeb.pm index d80dd05..fa49902 100644 --- a/lib/Fromdeb.pm +++ b/lib/Fromdeb.pm @@ -37,14 +37,14 @@ sub GetFields { my ($self,$file)=@_; while ($i<=$#control) { $_ = $control[$i]; chomp; - $fields{NAME} = $1 if (/^Package: (.+)/i); - $fields{VERSION} = $1 if (/^Version: (.+)/i); - $fields{ARCH} = $1 if (/^Architecture: (.+)/i); - $fields{MAINTAINER} = $1 if (/^Maintainer: (.+)/i); - $fields{DEPENDS} = $1 if (/^Depends: (.+)/i); - $fields{REQUIRES} = $1 if (/^Requires: (.+)/i); - $fields{GROUP} = $1 if (/^Section: (.+)/i); - if (/^Description: (.+)/i) { + $fields{NAME} = $1 if (/^Package:\s*(.+)/i); + $fields{VERSION} = $1 if (/^Version:\s*(.+)/i); + $fields{ARCH} = $1 if (/^Architecture:\s*(.+)/i); + $fields{MAINTAINER} = $1 if (/^Maintainer:\s*(.+)/i); + $fields{DEPENDS} = $1 if (/^Depends:\s*(.+)/i); + $fields{REQUIRES} = $1 if (/^Requires:\s*(.+)/i); + $fields{GROUP} = $1 if (/^Section:\s*(.+)/i); + if (/^Description:\s*(.+)/i) { $fields{SUMMARY} = "$1"; $i++; while (($i<=$#control) && ($control[$i])) {