On 7/15/07, Xavier <shiningxc@gmail.com> wrote:
I've benn looking at that function again, and here is what I saw in Andrew's commit : +/* TODO: This should use _alpm_checkdeps() */ int pacman_deptest(alpm_list_t *targets)
As I tried to explain there : http://www.archlinux.org/pipermail/pacman-dev/2007-June/008654.html
checkdeps isn't really what we want. Here, we just want to check that a list of dependencies from the PKGBUILD is already installed locally. checkdeps however checks if we can install a package, by checking its dependencies. And checkdeps gets this information from the sync or local databases, it can't really get the deps list from an external PKGBUILD.
But there is at least one way to do that, it's creating a dummy package, with the same list of dependencies as in the PKGBUILD, and work with that in libalpm. I looked at the history of deptest(), and it's actually what Aurelien did at some point : http://projects.archlinux.org/git/?p=pacman.git;a=commit;h=0756af675d6b99a1c... http://projects.archlinux.org/git/?p=pacman.git;a=commit;h=cda9c6671ced31a7d...
But it was rather messy, so Aaron cleaned that : http://projects.archlinux.org/git/?p=pacman.git;a=commit;h=4dd6c9222879198ea...
So well, I still have the same opinion that in my earlier answer to Andrew, what pacman_deptest does is just the mythic "search for satisfier" function that Nagy has been talked about for ages, and that is used everywhere in the code :)
Going through email here, and bringing things up. To get me back up to speed better - what is actionable here? Are you saying you don't like Andrew's change, or do you have something that supersedes it?