}
#endif
+/*
+ * create evr (as Id) from 'epoch', 'ver' and 'rel' attributes
+ */
+
static Id
makeevr_atts(Pool *pool, struct parsedata *pd, const char **atts)
{
return str2id(pool, pd->content, 1);
}
+
+/*
+ * find attribute
+ */
+
static const char *
find_attr(const char *txt, const char **atts)
{
return 0;
}
+
+/*
+ * relation comparision operators
+ */
+
static char *flagtab[] = {
"GT",
"EQ",
"LE"
};
+
+/*
+ * add dependency
+ */
+
static unsigned int
adddep(Pool *pool, struct parsedata *pd, unsigned int olddeps, const char **atts, int isreq)
{
}
if (!n)
return olddeps;
- if (k && !strcmp(k, "package"))
+ if (k && !strcmp(k, "package")) /* kind 'package' -> ignore */
k = 0;
if (k)
{
pd->content = realloc(pd->content, l + 256);
pd->acontent = l + 256;
}
- sprintf(pd->content, "%s:%s", k, n);
+ sprintf(pd->content, "%s:%s", k, n); /* prepend kind to name */
name = str2id(pool, pd->content, 1);
}
else
name = str2id(pool, (char *)n, 1);
- if (f)
+ if (f) /* flags means name,operator,relation */
{
Id evr = makeevr_atts(pool, pd, atts);
int flags;
return;
pd->depth++;
- for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++)
+ for (sw = pd->swtab[pd->state]; sw->from == pd->state; sw++) /* find name in statetable */
if (!strcmp(sw->ename, name))
break;
+
if (sw->from != pd->state)
{
#if 0