[pacman-dev] pacman_deptest function

Xavier shiningxc at gmail.com
Sun Jul 15 12:00:46 EDT 2007


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=0756af675d6b99a1c5e7cfb622344d71e3f4d377
http://projects.archlinux.org/git/?p=pacman.git;a=commit;h=cda9c6671ced31a7d96d5d72bdcc56341430f820

But it was rather messy, so Aaron cleaned that :
http://projects.archlinux.org/git/?p=pacman.git;a=commit;h=4dd6c9222879198eaff8da464d9eb0ecf6313954

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 :)




More information about the pacman-dev mailing list