diff --git a/ext/featurefmt/dpkg/dpkg.go b/ext/featurefmt/dpkg/dpkg.go index 4e72dfc7..e2ebc428 100644 --- a/ext/featurefmt/dpkg/dpkg.go +++ b/ext/featurefmt/dpkg/dpkg.go @@ -97,6 +97,9 @@ func (l lister) ListFeatures(files tarutil.FilesMap) ([]database.FeatureVersion, } else { pkg.Version = version } + } else if line == "" { + pkg.Feature.Name = "" + pkg.Version = "" } // Add the package to the result array if we have all the informations diff --git a/ext/featurefmt/dpkg/testdata/status b/ext/featurefmt/dpkg/testdata/status index d19e2500..153163b8 100644 --- a/ext/featurefmt/dpkg/testdata/status +++ b/ext/featurefmt/dpkg/testdata/status @@ -60,6 +60,8 @@ This package is not necessary for most modern Linux systems, where the udev subsystem provides a more dynamic mechanism for device file management. Original-Maintainer: Debian QA Group +Package: brokenPackageWithNoVersionThatShouldGetThrownOut + Package: libgcc1 Status: install ok installed Priority: required