summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-09-26 19:45:12 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2017-09-26 19:45:12 +0200
commit7ea3c67f96e3bc82f86afe72d6c61308c92de515 (patch)
tree3bb184bf196f1ed48cd464ac62568d8ce485ea38
parentf3e34838d95132e5f318e85525326decbfb19e36 (diff)
allow empty build-dependency fields in the parser
APT used to parse only wellformed files produced by repository creation tools which removed empty files as pointless before apt would see them. Now that apt can be told to parse e.g. debian/control files directly, it needs to be a little more accepting through: We had this with comments already, now let it deal with the far more trivial empty fields. Closes: #875363
-rw-r--r--apt-pkg/deb/debsrcrecords.cc5
-rwxr-xr-xtest/integration/test-apt-get-build-dep-file1
2 files changed, 5 insertions, 1 deletions
diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
index 0368817c2..cd8840af2 100644
--- a/apt-pkg/deb/debsrcrecords.cc
+++ b/apt-pkg/deb/debsrcrecords.cc
@@ -119,7 +119,10 @@ bool debSrcRecordParser::BuildDepends(std::vector<pkgSrcRecords::Parser::BuildDe
if (Sect.Find(fields[I], Start, Stop) == false)
continue;
-
+
+ if (Start == Stop)
+ continue;
+
while (1)
{
Start = debListParser::ParseDepends(Start, Stop,
diff --git a/test/integration/test-apt-get-build-dep-file b/test/integration/test-apt-get-build-dep-file
index 07de8bb30..dc405da90 100755
--- a/test/integration/test-apt-get-build-dep-file
+++ b/test/integration/test-apt-get-build-dep-file
@@ -109,6 +109,7 @@ Section: admin
Priority: optional
Maintainer: Michael Vogt <mvo@ubuntu.com>
Build-Depends: debhelper (>= 7)
+Build-Depends-Indep:
X-Python3-Version: >= 3.2
Standards-Version: 3.9.3