From: Michael Schroeder Date: Fri, 11 Jul 2008 20:34:23 +0000 (+0000) Subject: - set packager/distribution X-Git-Tag: BASE-SuSE-Code-12_1-Branch~308^2~298 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=5f6964091829228c132e5d9c22147aaf4de45989;p=thirdparty%2Flibsolv.git - set packager/distribution --- diff --git a/tools/repo_rpmdb.c b/tools/repo_rpmdb.c index 00e9f8a2..acff75e9 100644 --- a/tools/repo_rpmdb.c +++ b/tools/repo_rpmdb.c @@ -39,10 +39,13 @@ #define TAG_SUMMARY 1004 #define TAG_DESCRIPTION 1005 #define TAG_BUILDTIME 1006 +#define TAG_BUILDHOST 1007 #define TAG_INSTALLTIME 1008 #define TAG_SIZE 1009 +#define TAG_DISTRIBUTION 1010 #define TAG_VENDOR 1011 #define TAG_LICENSE 1014 +#define TAG_PACKAGER 1015 #define TAG_GROUP 1016 #define TAG_URL 1020 #define TAG_ARCH 1022 @@ -900,6 +903,12 @@ rpm2solv(Pool *pool, Repo *repo, Repodata *repodata, Solvable *s, RpmHead *rpmhe str = headstring(rpmhead, TAG_URL); if (str) repodata_set_str(repodata, handle, SOLVABLE_URL, str); + str = headstring(rpmhead, TAG_DISTRIBUTION); + if (str) + repodata_set_poolstr(repodata, handle, SOLVABLE_DISTRIBUTION, str); + str = headstring(rpmhead, TAG_PACKAGER); + if (str) + repodata_set_poolstr(repodata, handle, SOLVABLE_PACKAGER, str); u32 = headint32(rpmhead, TAG_BUILDTIME); if (u32) repodata_set_num(repodata, handle, SOLVABLE_BUILDTIME, u32); diff --git a/tools/repo_rpmmd.c b/tools/repo_rpmmd.c index 9ca3ac9a..522db9c5 100644 --- a/tools/repo_rpmmd.c +++ b/tools/repo_rpmmd.c @@ -39,6 +39,7 @@ enum state { /* resobject attributes */ STATE_SUMMARY, STATE_DESCRIPTION, + STATE_PACKAGER, STATE_URL, STATE_INSNOTIFY, STATE_DELNOTIFY, @@ -149,6 +150,7 @@ static struct stateswitch stateswitches[] = { { STATE_SOLVABLE, "summary", STATE_SUMMARY, 1 }, { STATE_SOLVABLE, "description", STATE_DESCRIPTION, 1 }, { STATE_SOLVABLE, "url", STATE_URL, 1 }, + { STATE_SOLVABLE, "packager", STATE_PACKAGER, 1 }, //{ STATE_SOLVABLE, "???", STATE_INSNOTIFY, 1 }, //{ STATE_SOLVABLE, "??", STATE_DELNOTIFY, 1 }, { STATE_SOLVABLE, "vendor", STATE_VENDOR, 1 }, @@ -839,6 +841,10 @@ endElement(void *userData, const char *name) if (pd->content[0]) repodata_set_str(pd->data, handle, SOLVABLE_URL, pd->content); break; + case STATE_PACKAGER: + if (pd->content[0]) + repodata_set_poolstr(pd->data, handle, SOLVABLE_PACKAGER, pd->content); + break; case STATE_SOURCERPM: set_sourcerpm(pd->data, s, handle, pd->content); break;