Package: dpkg
Version: 1.14.7

In processarc.c:

     if (!depisok(dsearch,&depprobwhy,0,1)) {
        varbufaddc(&depprobwhy,0);
        fprintf(stderr, _("dpkg: regarding %s containing %s, pre-dependency 
problem:\n%s"),
                pfilename, pkg->name, depprobwhy.buf);
        if (!force_depends(dsearch->list))
          ohshit(_("pre-dependency problem - not installing %.250s"),pkg->name);

dsearch->list should only be used in this way if the dependency is
only one-armed (eg, Provides, Conflicts, Breaks).  In this case the
result is that ignore_depends in force_depends will be called on the
wrong package.

This mistake was probably caused partly by the fact that force_depends
is misnamed.  It should probably be renamed force_deppossi.

Callers who have a dependency which is (or may be) of a multi-armed
type need to call force_deppossi (ie, force_depends) with the
appropriate deppossi, or do the logic from force_depends themselves.
The latter is a bit messy so I think we should create a new

  int force_dependency(int fc, struct pkginfo *up, struct pkginfo *ed) {
    return fc ||
           ignore_depends(ed) ||
           ignore_depends(up);
  }

and call it in appropriate places.  That will make the appropriate
calls clear for future programmers.

If this is to be done, it should be done in a git branch which is
based on my bug20471 branch, to avoid spurious conflicts.

Ian.




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to