From 019aa970f0c1ee845b1ca507e10ea4d57f63df0a Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Tue, 16 Feb 2021 17:05:52 +0100 Subject: [PATCH] Almost final fixes for repodata support --- src/headerlist.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/headerlist.c b/src/headerlist.c index a450b4c..839e2bd 100644 --- a/src/headerlist.c +++ b/src/headerlist.c @@ -1048,11 +1048,13 @@ int addToSourceHeaderList(struct configTag *ct, int mode, int altrepository) { findXMLPropertyByName(package_node, "summary")->children->content); newheadersourcelist->arch = strdup((char*) findXMLPropertyByName(package_node, "arch")->children->content); - // hl->buildarchs = headerGetStringEntry(h, RPMTAG_BUILDARCHS); - // hl->excludearch = headerGetStringEntry(h, RPMTAG_EXCLUDEARCH); if (findXMLPropertyByName(package_node, "description")->children) { newheadersourcelist->description = strdup((char*) findXMLPropertyByName(package_node, "description")->children->content); + } else { + logmsg(LOG_WARNING, "%s(source, %s): description field is empty", + newheadersourcelist->name, ct->tag); + newheadersourcelist->description = strdup(""); } char* packager = strdup((char*) findXMLPropertyByName(package_node, "packager")->children->content); @@ -1083,7 +1085,10 @@ int addToSourceHeaderList(struct configTag *ct, int mode, int altrepository) { xmlNode *psize = findXMLPropertyByName(package_node, "size"); newheadersourcelist->size = atoi( (char*)findXMLAttributeByName(psize, "package")); - //hl->patch = headerGetStringArrayEntry(h, RPMTAG_PATCH, &count); + // FIXME: information missing from repodata + newheadersourcelist->buildarchs = NULL; + newheadersourcelist->excludearch = NULL; + newheadersourcelist->patch = NULL; // Requires getXMLPackageNFV(findXMLPropertyByName(format, "requires"), @@ -1515,6 +1520,10 @@ char* advanceXMLPackageNode(char* prevname, xmlNode **primary_node, if (findXMLPropertyByName(primary_node[altidx], "description")->children) { newheaderlist->description = strdup((char*) findXMLPropertyByName(primary_node[altidx], "description")->children->content); + } else { + logmsg(LOG_WARNING, "%s(%s, %s): description field is empty", + newheaderlist->name, newheaderlist->arch, ct->repository[altidx]->tag); + newheaderlist->description = strdup(""); } xmlNode *format = findXMLPropertyByName(primary_node[altidx], "format"); newheaderlist->group = strdup((char*)