summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp
index ccb498a..c8d52a3 100644
--- a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp
@@ -177,10 +177,14 @@ namespace Gentoo {
// Dependencies
ebuildIds.insert(ebuildId);
depInsert->bindParamI(1, ebuildId);
- depInsert->bindParamB(5, false);
- insertDeps(Portage::Utils::Depend::parse(ecp.get("DEPEND").value_or("")));
- depInsert->bindParamB(5, true);
- insertDeps(Portage::Utils::Depend::parse(ecp.get("RDEPEND").value_or("")));
+ if (auto depend = ecp.getRange("DEPEND")) {
+ depInsert->bindParamB(5, false);
+ insertDeps(Portage::Utils::Depend::parse(depend->first, depend->second));
+ }
+ if (auto rdepend = ecp.getRange("RDEPEND")) {
+ depInsert->bindParamB(5, true);
+ insertDeps(Portage::Utils::Depend::parse(rdepend->first, rdepend->second));
+ }
if (newest) {
// HOMEPAGE
U::EntityWhereFilter pwf("packageId", packageId);