Fix build preparation when an empty dependency is present

This commit is contained in:
Martchus 2023-12-02 20:35:44 +01:00
parent edd78667c5
commit 0d4b6c1ad0
1 changed files with 5 additions and 1 deletions

View File

@ -509,9 +509,13 @@ bool PrepareBuild::pullFurtherDependencies(const std::vector<LibPkg::Dependency>
auto dependencyAdded = false;
const auto *const destinationDb = *m_destinationDbs.begin();
for (const auto &dependency : dependencies) {
auto dependencyExists = false;
// skip empty dependencies which might be present if split package contains `depends=()`
if (dependency.name.empty()) {
continue;
}
// skip if the dependency is already in the list of packages to be built (check for cycles is done later when computing batches)
auto dependencyExists = false;
if (m_buildDataByPackage.find(dependency.name) != m_buildDataByPackage.end()) {
continue;
}