Ignore libs for cross-compilation when checking any packages for binaries
Not really generic yet (e.g. doesn't cover `aarch64-linux-gnu-glibc`) but good enough for now.
This commit is contained in:
parent
1f3abd5596
commit
4293eb92bf
|
@ -469,7 +469,20 @@ void CheckForProblems::run()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (package->packageInfo->arch == "any" && (!package->libdepends.empty() || !package->libprovides.empty())) {
|
if (package->packageInfo->arch == "any" && (!package->libdepends.empty() || !package->libprovides.empty())) {
|
||||||
problems.emplace_back(RepositoryProblem{ .desc = "\"any\"-arch package but binary present", .pkg = package->name });
|
auto crossOnly = true;
|
||||||
|
for (const auto &libnames : { package->libdepends, package->libprovides }) {
|
||||||
|
for (const auto &libname : libnames) {
|
||||||
|
// ignore Windows and Android libs
|
||||||
|
if (!libname.starts_with("pe-") && !libname.starts_with("android-")) {
|
||||||
|
crossOnly = false;
|
||||||
|
goto break2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break2:
|
||||||
|
if (!crossOnly) {
|
||||||
|
problems.emplace_back(RepositoryProblem{ .desc = "\"any\"-arch package but binary present", .pkg = package->name });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue