start to parse missing urls (blocker :-( )
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Fri, 12 Sep 2008 13:12:33 +0000 (13:12 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Fri, 12 Sep 2008 13:12:33 +0000 (13:12 +0000)
src/knownid.h
tools/repo_products.c

index afe912563cba462a69f832577fe55d9ae8e4100f..b8c6902b5f9a5226e6c3b2c40312d10db3f35533 100644 (file)
@@ -150,10 +150,12 @@ KNOWNID(PRODUCT_SHORTLABEL,               "product:shortlabel"),
 KNOWNID(PRODUCT_DISTPRODUCT,           "product:distproduct"),
 KNOWNID(PRODUCT_DISTVERSION,           "product:distversion"),
 KNOWNID(PRODUCT_TYPE,                  "product:type"),
-KNOWNID(PRODUCT_RELNOTESURL,           "product:relnotesurl"),
-KNOWNID(PRODUCT_UPDATEURLS,            "product:updateurls"),
-KNOWNID(PRODUCT_EXTRAURLS,             "product:extraurls"),
-KNOWNID(PRODUCT_OPTIONALURLS,          "product:optionalurls"),
+KNOWNID(PRODUCT_URL,                   "product:url"),
+KNOWNID(PRODUCT_URL_TYPE,              "product:url:type"),
+KNOWNID(PRODUCT_URL_TYPE_SMOLT,                "product:url:type:smolt"),
+KNOWNID(PRODUCT_URL_TYPE_RELNOTES,     "product:url:type:relnotes"),
+KNOWNID(PRODUCT_URL_TYPE_EXTRA,                "product:url:type:extra"),
+KNOWNID(PRODUCT_URL_TYPE_OPTIONAL,     "product:url:type:optional"),
 KNOWNID(PRODUCT_FLAGS,                 "product:flags"),
 KNOWNID(PRODUCT_FLAVOR,                        "product:flavor"),
 KNOWNID(PRODUCT_REFERENCES,            "product:references"),
index a781caacf1de0c01844ff4a593bb567929007f0c..6b588263a3fcd4c3f6156726145dc35eddaaf149 100644 (file)
@@ -115,12 +115,12 @@ struct parsedata {
 
   struct stateswitch *swtab[NUMSTATES];
   enum state sbtab[NUMSTATES];
-
   const char *attribute; /* only print this attribute, if currentproduct == baseproduct */
 
   const char *tmplang;
   const char *tmpvers;
   const char *tmprel;
+  const char *tmpurltype;
 
   Solvable *s;
   Id handle;
@@ -237,6 +237,9 @@ startElement(void *userData, const char *name, const char **atts)
     case STATE_DESCRIPTION:
       pd->tmplang = find_attr("lang", atts, 1);
       break;
+    case STATE_URL:
+      pd->tmpurltype = find_attr("name", atts, 1);
+      break;
     default:
       break;
     }
@@ -300,6 +303,13 @@ endElement(void *userData, const char *name)
        pd->tmplang = 0;
       }
       break;
+    case STATE_URL:
+      if (pd->tmpurltype)
+        {
+          repodata_add_poolstr_array(pd->data, pd->handle, PRODUCT_URL, pd->content);
+          repodata_add_poolstr_array(pd->data, pd->handle, PRODUCT_URL_TYPE, pd->content);
+        }
+      break;
     case STATE_TARGET:
       if (currentproduct == baseproduct
          && pd->attribute