{
char *key = fields[0];
char *value = fields[1];
- char *modifier = strchr (key, '.');
- if (modifier)
- *modifier++ = 0;
#if 0
- if (modifier)
- fprintf (stderr, "key %s, mod %s, value %s\n", key, modifier, fields[1]);
- else
- fprintf (stderr, "key %s, value %s\n", key, fields[1]);
+ fprintf (stderr, "key %s, value %s\n", key, fields[1]);
#endif
#define istag(x) !strcmp (key, x)
else if (istag ("LABEL"))
repo_set_str(repo, s - pool->solvables, PRODUCT_LABEL, value);
else if (!strncmp (key, "LABEL.", 6))
- repo_set_str(repo, s - pool->solvables, str2id(pool, join(&pd, "product:label:", key + 6, 0), 1), value);
+ repo_set_str(repo, s - pool->solvables, pool_id2langid(pool, PRODUCT_LABEL, key + 6, 1), value);
else if (istag ("FLAGS"))
add_multiple_strings(data, handle, PRODUCT_FLAGS, value);
fprintf (stderr, "malformed line: %s\n", line);
}
+ if (!s->arch)
+ s->arch = ARCH_NOARCH;
if (s && s->arch != ARCH_SRC && s->arch != ARCH_NOSRC)
s->provides = repo_addid_dep(repo, s->provides, rel2id(pool, s->name, s->evr, REL_EQ, 1), 0);
if (s)
static Id
langtag(struct parsedata *pd, Id tag, const char *language)
{
- char *p;
- const char *tagname;
-
if (!language || tag >= ID_NUM_INTERNAL)
- return tag;
+ return pool_id2langid(pd->repo->pool, tag, language, 1);
if (!pd->langcache[tag])
- {
- tagname = id2str(pd->repo->pool, tag);
- p = sat_malloc(strlen(tagname) + strlen(language) + 2);
- sprintf(p, "%s:%s", tagname, language);
- pd->langcache[tag] = str2id(pd->repo->pool, p, 1);
- sat_free(p);
- }
+ pd->langcache[tag] = pool_id2langid(pd->repo->pool, tag, language, 1);
return pd->langcache[tag];
}