]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
support keywords in susedata
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Thu, 25 Sep 2008 11:54:52 +0000 (11:54 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Thu, 25 Sep 2008 11:54:52 +0000 (11:54 +0000)
package/libsatsolver.changes
tools/repo_rpmmd.c

index 9c3490ea861a22532f2f373594a0610c75666f46..ff9214d7d8fb20d937227ff913a90a28a886e513 100644 (file)
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Thu Sep 25 13:53:54 CEST 2008 - dmacvicar@suse.de
+
+- add support for keywords in susedata 
+
 -------------------------------------------------------------------
 Wed Sep 24 10:55:01 CEST 2008 - kkaempf@suse.de
 
index d3fe112ff71777f1724dd36248b4e0d770487505..cbec2d2fcdb40a98c049d9d907cbe196b5662a84 100644 (file)
@@ -52,6 +52,8 @@ enum state {
   
   /* Novell/SUSE extended attributes */
   STATE_EULA,
+  STATE_KEYWORDS,
+  STATE_KEYWORD,
   STATE_DISKUSAGE,
   STATE_DIRS,
   STATE_DIR,
@@ -161,6 +163,7 @@ static struct stateswitch stateswitches[] = {
 
   /* extended Novell/SUSE attributes (susedata.xml) */
   { STATE_SOLVABLE,    "eula",            STATE_EULA,         1 },
+  { STATE_SOLVABLE,    "keywords",        STATE_KEYWORDS,     0 },
   { STATE_SOLVABLE,    "diskusage",       STATE_DISKUSAGE,    0 },
 
   // pattern attribute
@@ -199,6 +202,7 @@ static struct stateswitch stateswitches[] = {
   { STATE_SOLVABLE,      "file",            STATE_FILE, 1 },
   
    /* extended Novell/SUSE dskusage attributes (suseinfo.xml) */
+  { STATE_KEYWORDS,    "k",               STATE_KEYWORD,      1 },
   { STATE_DISKUSAGE,   "dirs",            STATE_DIRS,         0 },
   { STATE_DIRS,        "dir",             STATE_DIR,          0 },
 
@@ -1049,6 +1053,10 @@ endElement(void *userData, const char *name)
       if (pd->content[0])
         repodata_set_str(pd->data, handle, langtag(pd, SOLVABLE_EULA, pd->language), pd->content);
       break;
+    case STATE_KEYWORD:
+      if (pd->content[0])
+        repodata_add_poolstr_array(pd->data, pd->handle, SOLVABLE_KEYWORDS, pd->content);
+      break;
     case STATE_DISKUSAGE:
       if (pd->ndirs)
         commit_diskusage (pd, pd->handle);