[pacman-dev] Another bug in deps.c !!
Nagy Gabor
ngaba at petra.hos.u-szeged.hu
Sat Apr 21 02:27:10 EDT 2007
> Where is qname defined? And can you please explain why and not just
> what the bug is?
Yes, this function is quite messy;-) In each step we permute the
objects (tmptargs list) we want to sort (we try to ensure
that each package follows its dependencies in the list). So tmptargs
stores packages not provides. And in most cases
_alpm_pkg_find(provname, tmptargs) is false, so we may add duplicate entries to tmptargs; here we want to check whether q has been added to tmptargs already or not (qname is the name of q).
> In addition, patch format is much easier for everyone to put in
> context- it has line numbers, function names, etc.
>
> -Dan
------patch-----------
diff -Naur pacman-lib/lib/libalpm/deps.c pacman-lib.new/lib/libalpm/deps.c
--- pacman-lib/lib/libalpm/deps.c 2007-04-21 08:01:40.000000000 +0200
+++ pacman-lib.new/lib/libalpm/deps.c 2007-04-21 08:05:16.000000000 +0200
@@ -163,7 +163,7 @@
for(l = alpm_pkg_get_provides(q); l; l = l->next) {
const char *provname = l->data;
if(!strcmp(depend->name, provname)) {
- if(!_alpm_pkg_find(provname, tmptargs)) {
+ if(!_alpm_pkg_find(qname, tmptargs)) {
change = 1;
tmptargs = alpm_list_add(tmptargs, q);
}
----------------------
Bye, ngaba
More information about the pacman-dev
mailing list