Author: matz Date: Sun Apr 27 20:32:40 2008 New Revision: 9847 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9847&view=rev Log: I promised this to Jano; skipping kinds in matcher when a flag is specified. Modified: trunk/sat-solver/src/repo.h trunk/sat-solver/src/repodata.c Modified: trunk/sat-solver/src/repo.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/repo.h?rev=9847&r1=9846&r2=9847&view=diff ============================================================================== --- trunk/sat-solver/src/repo.h (original) +++ trunk/sat-solver/src/repo.h Sun Apr 27 20:32:40 2008 @@ -157,6 +157,7 @@ #define SEARCH_NO_STORAGE_SOLVABLE (1<<9) #define SEARCH_EXTRA (1<<10) #define SEARCH_ALL_REPOS (1<<11) +#define SEARCH_SKIP_KIND (1<<12) /* Internal */ #define __SEARCH_ONESOLVABLE (1 << 31) Modified: trunk/sat-solver/src/repodata.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/repodata.c?rev=9847&r1=9846&r2=9847&view=diff ============================================================================== --- trunk/sat-solver/src/repodata.c (original) +++ trunk/sat-solver/src/repodata.c Sun Apr 27 20:32:40 2008 @@ -770,6 +770,15 @@ default: return 0; } + /* Maybe skip the kind specifier. Do this only for SOLVABLE attributes, + for the others we can't know if a colon separates a kind or not. */ + if ((flags & SEARCH_SKIP_KIND) + && di->key->storage == KEY_STORAGE_SOLVABLE) + { + const char *s = strchr(kv->str, ':'); + if (s) + kv->str = s + 1; + } switch ((flags & SEARCH_STRINGMASK)) { case SEARCH_SUBSTRING: -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org