]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Add support for default and langonly in comps xml
authorPavla Kratochvilova <pkratoch@redhat.com>
Thu, 12 Nov 2020 07:46:18 +0000 (08:46 +0100)
committerPavla Kratochvilova <pkratoch@redhat.com>
Thu, 12 Nov 2020 07:47:43 +0000 (08:47 +0100)
ext/repo_comps.c
src/knownid.h

index 69916567f3c475a169c51a675ddbbb30351c4f60..5943fd676542f0f20c1c070ffaf08de07828f4da 100644 (file)
@@ -29,7 +29,6 @@
  * TODO:
  *
  * what's the difference between group/category?
- * handle "default" and "langonly".
  *
  * maybe handle REL_COND in solver recommends handling?
  */
@@ -197,6 +196,18 @@ endElement(struct solv_xmlparser *xmlp, int state, char *content)
       repodata_set_void(pd->data, pd->handle, SOLVABLE_ISVISIBLE);
       break;
 
+    case STATE_DEFAULT:
+      repodata_set_void(pd->data, pd->handle, SOLVABLE_ISDEFAULT);
+      break;
+
+    case STATE_LANG_ONLY:
+      repodata_set_str(pd->data, pd->handle, SOLVABLE_LANGONLY, content);
+      break;
+
+    case STATE_LANGONLY:
+      repodata_set_str(pd->data, pd->handle, SOLVABLE_LANGONLY, content);
+      break;
+
     case STATE_DISPLAY_ORDER:
       repodata_set_str(pd->data, pd->handle, SOLVABLE_ORDER, content);
       break;
index b013d6564165a39d03670e370d3dc98ff1a85f25..d131e7843b8f2adb37913ef7c457abb6e0df39fc 100644 (file)
@@ -267,6 +267,8 @@ KNOWNID(LIBSOLV_SELF_DESTRUCT_PKG,      "libsolv-self-destruct-pkg()"),     /* this
 
 KNOWNID(SOLVABLE_CONSTRAINS,           "solvable:constrains"),         /* conda */
 KNOWNID(SOLVABLE_TRACK_FEATURES,       "solvable:track_features"),     /* conda */
+KNOWNID(SOLVABLE_ISDEFAULT,            "solvable:isdefault"),
+KNOWNID(SOLVABLE_LANGONLY,             "solvable:langonly"),
 
 KNOWNID(UPDATE_COLLECTIONLIST,      "update:collectionlist"),  /* list of UPDATE_COLLECTION (actually packages) and UPDATE_MODULE */