{ POOL_FLAG_OBSOLETEUSESPROVIDES, "obsoleteusesprovides", 0 },
{ POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES, "implicitobsoleteusesprovides", 0 },
{ POOL_FLAG_OBSOLETEUSESCOLORS, "obsoleteusescolors", 0 },
+ { POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS, "implicitobsoleteusescolors", 0 },
{ POOL_FLAG_NOINSTALLEDOBSOLETES, "noinstalledobsoletes", 0 },
{ POOL_FLAG_HAVEDISTEPOCH, "havedistepoch", 0 },
{ POOL_FLAG_NOOBSOLETESMULTIVERSION, "noobsoletesmultiversion", 0 },
testcase_str2dep(Pool *pool, char *s)
{
char *n, *a;
- Id id;
+ Id id, evr;
int flags;
if ((n = strchr(s, '|')) != 0)
- {
+ {
id = testcase_str2dep(pool, n + 1);
- *n = 0;
+ *n = 0;
id = pool_rel2id(pool, testcase_str2dep(pool, s), id, REL_OR, 1);
- *n = '|';
+ *n = '|';
return id;
}
while (*s == ' ' || *s == '\t')
else
id = pool_strn2id(pool, n, s - n, 1);
}
+ else if (s - n > 4 && s[-4] == ':' && !strncmp(s - 4, ":any", 4))
+ {
+ id = pool_strn2id(pool, n, s - n - 4, 1);
+ id = pool_rel2id(pool, id, ARCH_ANY, REL_MULTIARCH, 1);
+ }
else
id = pool_strn2id(pool, n, s - n, 1);
if (!*s)
while (*s == ' ' || *s == '\t')
s++;
flags = 0;
+ if (*s == '!' && s[1] == '=') /* support != as synonym for <> */
+ {
+ flags = REL_LT | REL_GT;
+ s += 2;
+ }
for (;;s++)
- {
+ {
if (*s == '<')
- flags |= REL_LT;
+ flags |= REL_LT;
else if (*s == '=')
- flags |= REL_EQ;
+ flags |= REL_EQ;
else if (*s == '>')
- flags |= REL_GT;
+ flags |= REL_GT;
else
- break;
+ break;
}
if (!flags)
return id;
n = s;
while (*s && *s != ' ' && *s != '\t')
s++;
- return pool_rel2id(pool, id, pool_strn2id(pool, n, s - n, 1), flags, 1);
+ evr = pool_strn2id(pool, n, s - n, 1);
+ if (*s == ' ' && !strcmp(s, " compat >= "))
+ {
+ s += 11;
+ while (*s == ' ' || *s == '\t')
+ s++;
+ n = s;
+ while (*s && *s != ' ' && *s != '\t')
+ s++;
+ evr = pool_rel2id(pool, evr, pool_strn2id(pool, n, s - n, 1), REL_COMPAT, 1);
+ }
+ return pool_rel2id(pool, id, evr, flags, 1);
}
const char *
n = pool_id2str(pool, s->name);
e = pool_id2str(pool, s->evr);
a = pool_id2str(pool, s->arch);
- str = pool_alloctmpspace(pool, strlen(n) + strlen(e) + strlen(a) + 3);
- sprintf(str, "%s-%s.%s", n, e, a);
+ str = pool_alloctmpspace(pool, strlen(n) + strlen(e) + strlen(a) + 3);
+ sprintf(str, "%s-%s.%s", n, e, a);
if (!s->repo)
return pool_tmpappend(pool, str, "@", 0);
if (s->repo->name)
if (nfilelist)
{
int l;
- Id did;
- for (l = 0; l < nfilelist; l += strlen(filelist + l) + 1)
+ Id did;
+ for (l = 0; l < nfilelist; l += strlen(filelist + l) + 1)
{
char *p = strrchr(filelist + l, '/');
- if (!p)
+ if (!p)
continue;
- *p++ = 0;
+ *p++ = 0;
did = repodata_str2dir(data, filelist + l, 1);
- p[-1] = '/';
+ p[-1] = '/';
if (!did)
did = repodata_str2dir(data, "/", 1);
repodata_add_dirstr(data, s - pool->solvables, SOLVABLE_FILELIST, did, p);
char *result = solv_malloc(1024);
char *rp = result;
int resultl = 1024;
-
+
for (;;)
{
size_t rl;
char *result = solv_malloc(1024);
char *rp = result;
int resultl = 1024;
-
+
for (;;)
{
size_t rl;
#if 0
else if (!strcmp(repotype, "helix"))
{
+ extern int repo_add_helix(Repo *repo, FILE *fp, int flags);
repo_add_helix(repo, rfp, 0);
fclose(rfp);
}
pool_debug(pool, SOLV_ERROR, "testcase_read: system: cannot change disttype to '%s'\n", pieces[2]);
#endif
}
- if (strcmp(pieces[1], "unset") != 0)
- pool_setarch(pool, pieces[1]);
- else
+ if (strcmp(pieces[1], "unset") == 0)
pool_setarch(pool, 0);
+ else if (pieces[1][0] == ':')
+ pool_setarchpolicy(pool, pieces[1] + 1);
+ else
+ pool_setarch(pool, pieces[1]);
if (npieces > 3)
{
Repo *repo = testcase_str2repo(pool, pieces[3]);