[pacman-dev] [PATCH] Fix bug 9395 by allowing pacman to remove unresolvable packages from a transaction

Nagy Gabor ngaba at bibl.u-szeged.hu
Tue Jan 13 12:50:57 EST 2009

> No. pkg->depends or alpm_pkg_get_depends(pkg) is used to get the
> dependency list of pkg. In the old code it was easy to determine if a
> dependency is broken. If we couldn't find a satisfier package in the
> target list or in the local database (which won't be upgraded), we
> simply detected that this dependency is unresolvable. (However, our
> error message was often uninformative, user may got an error message
> like this: "Cannot resolve foo dependency of pulledpkg". User asked:
> Pulledpkg? What? I just did "pacman -S bar". [1])
> However, your patch makes things more complicated. We start to resolve
> foo dependency of bar, which may be satisfied. But *later* it may turn
> out, that we cannot resolve completely the _pulled_ foo satisfier, so
> we simply remove it  from the list. Now it would be elegant if we
> could say: We could not resolve foo dependency of bar. (At this point
> we can clearly see, that the old method doesn't work, because
> *locally* foo is a resolvable dependency.) But it is not so easy to
> detect, probably we need a more sophisticated info (graph?) structure,
> and imho we can catch this broken dependency when we "label" the
> package as unresolvable.
> If we solve this problem, problem [1] will also disappear, which is an
> extra benefit.
> Bye

Oh, I see that I totally misinterpreted something here. If we allow  
pacman to remove targets from the list, we cannot get any unresolved  
dependencies, right? So just forget what I said earlier. (But problem  
[1] is still interesting.) But your method for collecting unresolvable  
dependencies is still not good. Just put the dependency into data list  
when it turns out that the dependency (locally) not resolvable. (When  
resolvedep returns with NULL.) This should be identical to the old  
behavior, if user doesn't let pacman remove targets. If user resolve  
this problem by removing some targets, you can free this list.


SZTE Egyetemi Konyvtar - http://www.bibl.u-szeged.hu
This message was sent using IMP: http://horde.org/imp/

More information about the pacman-dev mailing list