Browse Source

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
tags/debian/1.6_alpha1
David Kalnischkies 3 years ago
parent
commit
7ea3c67f96
2 changed files with 5 additions and 1 deletions
  1. +4
    -1
      apt-pkg/deb/debsrcrecords.cc
  2. +1
    -0
      test/integration/test-apt-get-build-dep-file

+ 4
- 1
apt-pkg/deb/debsrcrecords.cc View File

@@ -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,


+ 1
- 0
test/integration/test-apt-get-build-dep-file View 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



Loading…
Cancel
Save