/* put new element in hash */
if (!hid)
repo->lastidhash[h] = id;
+ else if (marker == SOLVABLE_FILEMARKER)
+ return olddeps;
if (marker && !before && !repo->lastmarkerpos)
{
/* we have to add the marker first */
}
if (!hid)
{
+ /* new entry, insert in correct position */
if (marker && before && repo->lastmarkerpos)
{
/* need to add it before the marker */
return olddeps;
}
/* we already have it in the hash */
- if (!marker || before || marker == SOLVABLE_FILEMARKER)
+ if (!marker || before)
return olddeps;
/* check if it is in the correct half */
for (oidp = repo->idarraydata + repo->lastmarkerpos + 1; (oid = *oidp) != 0; oidp++)
return olddeps; /* should not happen */
memmove(oidp, oidp + 1, (repo->idarraydata + repo->idarraysize - oidp - 2) * sizeof(Id));
repo->idarraydata[repo->idarraysize - 2] = id;
+ repo->lastmarkerpos--; /* marker has been moved */
return olddeps;
}