On Mon, May 12, 2008 at 4:00 PM, Dan McGee <[EMAIL PROTECTED]> wrote:
>
> I thought the same thing- I saw a rewinddir call in db_scan, so I
> removed what I thought was an extra one here. Either way, I don't plan
> on applying the above patch, as we should just do the rewinddir() call
> inside db_scan() or do something more sane than the above hackjob. I
> just wanted to point out this was the issue.
>
Ok, I just understood how that worked now... I first thought we could
do rewinddir in db_scan but it's not easy. When we do a full scan, we
want do init the scan first with db_rewind, then scan each entry one
by one using one db_scan call each time.
I preferred the old way rather than the above hack, even if they do
exactly the same thing. It was a bit less obscure and more consistent:
_alpm_db_rewind(db);
while((info = _alpm_db_scan(db, NULL)) != NULL) {
Unless you find a better way of course :)
> Allan- I don't know what filesystem you are using, but I wonder if it
> has slightly different *dir() semantics so the bug did not manifest
> itself there...
>
I was able to reproduce it without problems, with latest git and ext3
filesystem.
_______________________________________________
pacman-dev mailing list
[email protected]
http://archlinux.org/mailman/listinfo/pacman-dev