The following commit has been merged in the master branch:
commit fee30cd37c83bd85465edba36546a3661d273d7d
Author: Raphael Hertzog <[email protected]>
Date: Fri Apr 17 22:08:24 2009 +0200
Dpkg::Deps::parse(): parse properly an empty dep with spaces only
Leading and trailing spaces were not stripped and when no further parsing
was done (because there's no valid dependency to parse) it was improperly
erroring out.
diff --git a/debian/changelog b/debian/changelog
index 72c9902..06e2030 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -53,6 +53,8 @@ dpkg (1.15.1) UNRELEASED; urgency=low
* Fix dpkg-source to not die when uncompressor processes are killed by
SIGPIPE due to tar closing the pipe without exhausting all the data
available. Closes: #523329
+ * dpkg-gencontrol now handles properly (empty) dependencies which contain
+ only spaces. Closes: #522787
[ Guillem Jover ]
* Fix typo in dpkg output (‘unexecpted’ → ‘unexpected’). Closes: #519082
diff --git a/scripts/Dpkg/Deps.pm b/scripts/Dpkg/Deps.pm
index 132e004..540ffca 100644
--- a/scripts/Dpkg/Deps.pm
+++ b/scripts/Dpkg/Deps.pm
@@ -304,6 +304,10 @@ sub parse {
$options{host_arch} = get_host_arch() if not exists $options{host_arch};
$options{union} = 0 if not exists $options{union};
+ # Strip trailing/leading spaces
+ $dep_line =~ s/^\s+//;
+ $dep_line =~ s/\s+$//;
+
my @dep_list;
foreach my $dep_and (split(/\s*,\s*/m, $dep_line)) {
my @or_list = ();
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]