- refactor the repository matching with products, not yet complete
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Mon, 22 Sep 2008 16:57:39 +0000 (16:57 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Mon, 22 Sep 2008 16:57:39 +0000 (16:57 +0000)
- move the cpename up to resobject as it is a generic attribute
  (and can be useful to match vulnerabilities in the future)

src/knownid.h
tools/repo_products.c

index ae49987..6fb3fb0 100644 (file)
@@ -95,6 +95,7 @@ KNOWNID(SOLVABLE_LICENSE,             "solvable:license"),
 KNOWNID(SOLVABLE_BUILDTIME,            "solvable:buildtime"),
 KNOWNID(SOLVABLE_BUILDHOST,            "solvable:buildhost"),
 KNOWNID(SOLVABLE_EULA,                 "solvable:eula"),
+KNOWNID(SOLVABLE_CPE_NAME,             "solvable:cpename"),
 KNOWNID(SOLVABLE_MESSAGEINS,           "solvable:messageins"),
 KNOWNID(SOLVABLE_MESSAGEDEL,           "solvable:messagedel"),
 KNOWNID(SOLVABLE_INSTALLSIZE,          "solvable:installsize"),
@@ -158,7 +159,6 @@ KNOWNID(PRODUCT_REFERENCES,         "product:references"),
 KNOWNID(PRODUCT_UPDATEREPOKEY,         "product:updaterepokey"),
 KNOWNID(PRODUCT_REGISTER_TARGET,       "product:regtarget"),
 KNOWNID(PRODUCT_REGISTER_RELEASE,      "product:regrelease"),
-KNOWNID(PRODUCT_CPE_NAME,              "product:cpename"),
 
 /* argh */
 KNOWNID(SUSETAGS_DATADIR,              "susetags:datadir"),
index b42d6da..022b400 100644 (file)
@@ -355,7 +355,7 @@ endElement(void *userData, const char *name)
     break;
     case STATE_CPENAME:
       if (pd->content)
-        repodata_set_str(pd->data, pd->handle, PRODUCT_CPE_NAME, pd->content);
+        repodata_set_str(pd->data, pd->handle, SOLVABLE_CPE_NAME, pd->content);
     default:
       break;
     }