{ SOLVER_FLAG_YUM_OBSOLETES, "yumobsoletes", 0 },
{ SOLVER_FLAG_NEED_UPDATEPROVIDE, "needupdateprovide", 0 },
{ SOLVER_FLAG_URPM_REORDER, "urpmreorder", 0 },
+ { SOLVER_FLAG_FOCUS_BEST, "focusbest", 0 },
{ 0, 0, 0 }
};
evrid = pool_strn2id(pool, str + i + 1, repostart - (i + 1), 0);
if (!evrid)
continue;
+ /* first check whatprovides */
FOR_PROVIDES(p, pp, nid)
{
Solvable *s = pool->solvables + p;
continue;
return p;
}
+ /* maybe it's not installable and thus not in whatprovides. do a slow search */
+ if (repo)
+ {
+ Solvable *s;
+ FOR_REPO_SOLVABLES(repo, p, s)
+ {
+ if (s->name != nid || s->evr != evrid)
+ continue;
+ if (arch && s->arch != arch)
+ continue;
+ return p;
+ }
+ }
+ else
+ {
+ FOR_POOL_SOLVABLES(p)
+ {
+ Solvable *s = pool->solvables + p;
+ if (s->name != nid || s->evr != evrid)
+ continue;
+ if (arch && s->arch != arch)
+ continue;
+ return p;
+ }
+ }
}
}
return 0;
Repo *repo = pool_id2repo(pool, repoid);
char *buf = solv_malloc((repo->name ? strlen(repo->name) : 0) + 40);
char *mp;
- orignames[i] = repo->name;
+ orignames[repoid] = repo->name;
if (!repo->name || !repo->name[0])
sprintf(buf, "#%d", repoid);
else
{
Repo *repo = pool_id2repo(pool, repoid);
solv_free((void *)repo->name);
- repo->name = orignames[i];
+ repo->name = orignames[repoid];
}
solv_free(orignames);
return r;
int missing_features = 0;
Id *genid = 0;
int ngenid = 0;
+ Queue autoinstq;
if (!fp && !(fp = fopen(testcase, "r")))
{
buf = solv_malloc(bufl);
bufp = buf;
solv = 0;
+ queue_init(&autoinstq);
for (;;)
{
if (bufp - buf + 16 > bufl)
}
genid[ngenid++] = id;
}
+ else if (!strcmp(pieces[0], "autoinst") && npieces > 2)
+ {
+ if (strcmp(pieces[1], "name"))
+ {
+ pool_debug(pool, SOLV_ERROR, "testcase_read: autoinst: illegal mode\n");
+ break;
+ }
+ queue_push(&autoinstq, pool_str2id(pool, pieces[2], 1));
+ }
else
{
pool_debug(pool, SOLV_ERROR, "testcase_read: cannot parse command '%s'\n", pieces[0]);
}
while (job && ngenid > 0)
queue_push2(job, SOLVER_NOOP | SOLVER_SOLVABLE_PROVIDES, genid[--ngenid]);
+ if (autoinstq.count)
+ pool_add_userinstalled_jobs(pool, &autoinstq, job, GET_USERINSTALLED_NAMES | GET_USERINSTALLED_INVERTED);
+ queue_free(&autoinstq);
genid = solv_free(genid);
buf = solv_free(buf);
pieces = solv_free(pieces);