[pacman-dev] Weird bug in sync/upgrade behavior

Xavier shiningxc at gmail.com
Mon May 12 09:04:55 EDT 2008


On Mon, May 12, 2008 at 2:58 PM, Dan McGee <dpmcgee at gmail.com> wrote:
>  diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c
>  index fcd555e..bfbf995 100644
>  --- a/lib/libalpm/cache.c
>  +++ b/lib/libalpm/cache.c
>  @@ -24,6 +24,7 @@
>   #include <stdlib.h>
>   #include <errno.h>
>   #include <string.h>
>  +#include <dirent.h>
>
>   /* libalpm */
>   #include "cache.h"
>  @@ -54,6 +55,7 @@ int _alpm_db_load_pkgcache(pmdb_t *db)
>         _alpm_log(PM_LOG_DEBUG, "loading package cache for repository '%s'\n",
>                   db->treename);
>
>  +       rewinddir(db->handle);
>         while((info = _alpm_db_scan(db, NULL)) != NULL) {
>                 _alpm_log(PM_LOG_FUNCTION, "adding '%s' to package
>  cache for db '%s'\n",
>
>  alpm_pkg_get_name(info), db->treename);
>
>

Oh no shit, I noticed this and wanted to ask you about it, why you
removed that rewinddir call...
But then I looked at db_scan code, and it seems like it did a
rewinddir itself, so I thought it was fine ...
And when you showed your weird bug, I thought about that rewinddir
stuff again.. But I didn't say anything.. I suck.
I was still building your last git branch to try reproducing it first.




More information about the pacman-dev mailing list