[pacman-dev] resolvedeps should resolve deps in local db too?

Nagy Gabor ngaba at petra.hos.u-szeged.hu
Thu Apr 26 15:58:09 EDT 2007


Hi!

This e-mail is neither a feature request nor a bugreport, just a
question for discussion.
See the following pactest file:
-------------------------
self.description = "resolvedeps test"

lp1 = pmpkg("pkg1")
lp1.depends = ["pkg2=1.0-1"]
self.addpkg2db("local", lp1)

lp2 = pmpkg("pkg2", "1.0-1")
lp2.requiredby = ["pkg1"]
self.addpkg2db("local", lp2)

sp1 = pmpkg("pkg1")
sp1.depends = ["pkg2=1.0-2"]
self.addpkg2db("sync", sp1)

sp2 = pmpkg("pkg2", "1.0-2")
self.addpkg2db("sync", sp2)

self.args = "-S %s" % sp2.name

self.addrule("PKG_VERSION=pkg1|1.0-1")
self.addrule("PKG_VERSION=pkg2|1.0-1")
-------------------------------
Pacman passes this test, but won't resolve dependencies. Resolvedeps
doesn't notice that update of pkg2 would break the dependency of pkg1.
(Because in line 585 PM_TRANS_TYPE_ADD is used). But pacman
does a depcheck after resolvedeps, so it realize the problem (but it
is not resolved by installing pkg1) and we get an error message.
So the philosophic question (I don't know the answer ;-):
"Should -S pkg2 update pkg1 or not?" If -S pkg2 means that we update
pkg2 and do "everything" to install it, then yes. (User is asked
whether to remove conflicting packages etc.). If user expects that after
-S pkg2 _will_ be installed and user doesn't want to run other pacman
commands by hand, the answer is yes. But the dependencies of pkg2 is
resolved, and user probably thinks that only pkg2 and its dependencies
will be installed (he doesn't want to upgrade anything else in the db),
so the answer can also be no.

Bye, ngaba




More information about the pacman-dev mailing list