From: Michael Schroeder Date: Wed, 27 Mar 2019 10:55:10 +0000 (+0100) Subject: repodata_unset_uninternalized: allow to delete all attributes X-Git-Tag: 0.7.4~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d9f8ca09021b7b7e77b7b55b2604d0be294c6e4;p=thirdparty%2Flibsolv.git repodata_unset_uninternalized: allow to delete all attributes This is done when the keyname is zero. --- diff --git a/src/conda.c b/src/conda.c index dd53754e..fb9533ce 100644 --- a/src/conda.c +++ b/src/conda.c @@ -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 diff --git a/src/repodata.c b/src/repodata.c index 71e81757..ad5aaea3 100644 --- a/src/repodata.c +++ b/src/repodata.c @@ -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;