From ea4b7921b7e3eadb42be1deab5f343dbba8f29df Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 16 Jan 2020 10:53:05 +0100 Subject: 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 --- apt-pkg/pkgcachegen.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/pkgcachegen.cc') 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 DynPackage(Package); Dynamic DynVersion(Version); - if (Grp.end() == true) + if (Grp.end() == true || Grp->FirstPackage == 0) return NewProvides(Ver, Package, Cache.NativeArch(), Version, Flags); else { -- cgit v1.2.3-70-g09d2