]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
repodata_unset_uninternalized: allow to delete all attributes
authorMichael Schroeder <mls@suse.de>
Wed, 27 Mar 2019 10:55:10 +0000 (11:55 +0100)
committerMichael Schroeder <mls@suse.de>
Wed, 27 Mar 2019 10:55:10 +0000 (11:55 +0100)
This is done when the keyname is zero.

src/conda.c
src/repodata.c

index dd53754e9467145cb1cd0b7442d8822935a6e792..fb9533ced67aebe8abc9661274cabf9d6141b67c 100644 (file)
@@ -204,3 +204,11 @@ pool_evrcmp_conda(const Pool *pool, const char *evr1, const char *evr2, int mode
   return solv_vercmp_conda(r1 + 1, s1, r2 + 1, s2);
 }
 
+#if 0
+/* return true if solvable s matches the spec */
+/* see conda/models/match_spec.py */
+int
+solvable_conda_matchspec(Solvable *s, const char *spec)
+{
+}
+#endif
index 71e817577c764b08536c8f95c8af7c68cb7072c6..ad5aaea31e13bbc4d9cc13462c19caf844cb13f0 100644 (file)
@@ -2959,6 +2959,11 @@ repodata_unset_uninternalized(Repodata *data, Id solvid, Id keyname)
   ap = *app;
   if (!ap)
     return;
+  if (!keyname)
+    {
+      *app = 0;                /* delete all attributes */
+      return;
+    }
   for (; *ap; ap += 2)
     if (data->keys[*ap].name == keyname)
       break;