Hi, attached is a patch to fix bug 9395, against the current git tree for pacman, as described in an earlier email to this list. You may find a description of the changes I made in the Arch bug database for bug 9395. Please let me know if there are any questions.
Thank you, and best wishes, Bryan
Basically this is a neat (and readable) job imho. Some comments: 1. There is a typo in the description of unresolvable field. 2. A new list for pkginfos looks ugly imho. 3. I like the concept of pulled, maybe (pmpkg_t *) pulledby would be even better, then we could print more informative (error) messages (see FS#12536 for example). So we again reached to a ~graph structure. (Hm. Maybe dependents can be also used instead of pulledby...) 4. It is not easy to determine which package is unresolvable. If a pulled dependency satisfier of foo is unresolvable we may could find an other (resolvable) satisfier. But this is not handled in the current code neither, so your _alpm_mark_unresolvable() is OK. 5. I may overlook something, but as I see, the following situation can happen: # pacman -S foo bar, where foo depends on bar. During resolvedeps foo may become unresolvable, but bar not. In this case pacman asks the user whether he wants to remove foo from target list. User answers yes. Since your _alpm_is_needed code (btw, _alpm prefix is not needed here) doesn't check pulled flag, it will determine that bar is not needed (which is not true, bar was an explicit package), and pacman will also remove bar as well, and the user wasn't informed about this. 6. I think a dependency cycle can lead to an infinite loop due to _alpm_is_needed. Bye