id = 0;
else if (!strcmp(pieces[1], "dep"))
id = testcase_str2dep(pool, pieces[2]);
+ else if (!strcmp(pieces[1], "susedep"))
+ {
+ if (ngenid < 1)
+ {
+ pool_error(pool, 0, "testcase_read: genid: out of stack");
+ break;
+ }
+ id = pool_rewrite_suse_dep(pool, pool_str2id(pool, pieces[2], -1), genid[--ngenid]);
+ }
else
{
pool_error(pool, 0, "testcase_read: genid: unknown command '%s'", pieces[1]);
pool_prepend_rootdir_tmp;
pool_queuetowhatprovides;
pool_rel2id;
+ pool_rewrite_suse_dep;
pool_satisfieddep_map;
pool_search;
pool_selection2str;
/* weird suse stuff */
void pool_trivial_installable_multiversionmap(Pool *pool, Map *installedmap, Queue *pkgs, Queue *res, Map *multiversionmap);
void pool_trivial_installable(Pool *pool, Map *installedmap, Queue *pkgs, Queue *res);
+Id pool_rewrite_suse_dep(Pool *pool, Id keyname, Id id);
#ifdef __cplusplus
}
s->conflicts = repo_fix_conflicts(s->repo, s->conflicts);
}
+Id
+pool_rewrite_suse_dep(Pool *pool, Id keyname, Id id)
+{
+ /* hack: use a synthetic repo. As this is only for testing it
+ * should not be a problem */
+ Repo repo;
+ Id idarraydata[5];
+ memset(&repo, 0, sizeof(repo));
+ idarraydata[0] = 0;
+ idarraydata[1] = id;
+ idarraydata[2] = 0;
+ idarraydata[3] = 0;
+ idarraydata[4] = 0;
+ repo.pool = pool;
+ repo.idarraydata = idarraydata;
+ repo.idarraysize = 4;
+ repo.lastoff = 3;
+ if (keyname == SOLVABLE_PROVIDES)
+ return idarraydata[repo_fix_supplements(&repo, 1, 3, 0)];
+ if (keyname == SOLVABLE_SUPPLEMENTS)
+ return idarraydata[repo_fix_supplements(&repo, 0, 1, 0)];
+ if (keyname == SOLVABLE_CONFLICTS)
+ return idarraydata[repo_fix_conflicts(&repo, 1)];
+ return 0;
+}
+
/**********************************************************************************/
static inline Id