diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2020-01-16 10:53:05 +0100 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2020-01-16 11:10:47 +0100 |
commit | ea4b7921b7e3eadb42be1deab5f343dbba8f29df (patch) | |
tree | 16970ac330e2e61eed0fe170f3fd83499501cd79 /apt-pkg/pkgcachegen.cc | |
parent | cd8a51c7d4dd81830356b13ede50e2e5836de5be (diff) |
NewProvidesAllArch: Check if group is empty before using it
APT 1.9.6 introduced empty groups by making use of groups to
deduplicate package names. This is not normally a problem, but
here we assumed that every group has at least one package.
This caused a problem because automake was providing automake-1.16
while having the source package automake-1.16. So we found the
automake-1.16 group, iterated over its empty package list, trying
to store the provides (which hence never happened).
LP: #1859952
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r-- | apt-pkg/pkgcachegen.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 75bd4c853..8e0301151 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -1203,7 +1203,7 @@ bool pkgCacheListParser::NewProvidesAllArch(pkgCache::VerIterator &Ver, StringVi Dynamic<StringView> DynPackage(Package); Dynamic<StringView> DynVersion(Version); - if (Grp.end() == true) + if (Grp.end() == true || Grp->FirstPackage == 0) return NewProvides(Ver, Package, Cache.NativeArch(), Version, Flags); else { |