[pacman-dev] %REPLACES% doesn't appear in localdb

Xavier shiningxc at gmail.com
Wed Jan 9 10:40:44 EST 2008


Dan McGee wrote:
>
> So my point still stands. Do you know for a fact that having a
> non-empty replaces list for a local package will not affect conflict
> and dependency resolving? Until you have proved this, I don't feel
> comfortable making the change.
>

I have to admit I was also a bit confused by the whole discussion, but 
didn't speak up because it looked like a minor problem.

To answer your question, it's actually rather easy. get_replaces is 
really just used once, and that is in find_replacements.
find_replacements is only used for the -Su operation, and has 0 effect 
on conflict and dependency resolving.

 > grep -r get_replaces lib/libalpm/*.c
lib/libalpm/package.c:
alpm_list_t SYMEXPORT *alpm_pkg_get_replaces(pmpkg_t *pkg)
lib/libalpm/package.c:
newpkg->replaces   = alpm_list_strdup(alpm_pkg_get_replaces(pkg));
lib/libalpm/sync.c:
for(k = alpm_pkg_get_replaces(spkg); k; k = k->next) {

And it's called on spkg, so a sync pkg, in a sync database.




More information about the pacman-dev mailing list