ext/featurefmt/dpkg: handle malformed packages
This commit is contained in:
parent
8227165a78
commit
590e7e2602
@ -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
|
||||
|
2
ext/featurefmt/dpkg/testdata/status
vendored
2
ext/featurefmt/dpkg/testdata/status
vendored
@ -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 <packages@qa.debian.org>
|
||||
|
||||
Package: brokenPackageWithNoVersionThatShouldGetThrownOut
|
||||
|
||||
Package: libgcc1
|
||||
Status: install ok installed
|
||||
Priority: required
|
||||
|
Loading…
Reference in New Issue
Block a user