Fix building packages using signed git repositories as source

This commit is contained in:
Martchus 2022-02-25 23:09:16 +01:00
parent 22cfb4bb29
commit 2071327a71
1 changed files with 13 additions and 1 deletions

View File

@ -827,9 +827,21 @@ InvocationResult ConductBuild::invokeMakepkgToMakeSourcePackage(const BatchProce
}
enqueueDownloads(downloadsSession, 1);
});
auto additionalFlags = std::vector<std::string>();
auto lock = lockToRead();
if (const auto &sourceInfo = m_buildPreparation.buildData[packageName].sourceInfo) {
for (const auto &source : sourceInfo->sources) {
if (source.path.find(".git?signed") != std::string::npos) {
// skip the GPG check at this point as makepkg won't actually clone the repository here
additionalFlags.emplace_back("--skippgpcheck");
break;
}
}
}
lock.unlock();
m_buildAction->log()(Phrases::InfoMessage, "Making source package for ", packageName, " via ", m_makePkgPath.string(), '\n',
ps(Phrases::SubMessage), "build dir: ", buildDirectory, '\n');
processSession->launch(boost::process::start_dir(buildDirectory), m_makePkgPath, "-f", "--nodeps", "--nobuild", "--source");
processSession->launch(boost::process::start_dir(buildDirectory), m_makePkgPath, "-f", "--nodeps", "--nobuild", "--source", additionalFlags);
return InvocationResult::Ok;
}