[pacman-dev] sync_prepare clean-up III, TODO

Xavier shiningxc at gmail.com
Thu Jul 19 17:00:38 EDT 2007


On Thu, Jul 19, 2007 at 08:32:36PM +0200, Nagy Gabor wrote:
> The second pactest file shows checkdeps cannot get enough information from 
> sync.c to figure out if there is any broken dependency: it should know BOTH 
> the remove and upgrade list to decide properly.
> self.description = "Induced removal would break dependency"
> 

Actually, that's how I first understood the trans argument that you removed
from the checkdeps function.
I thought it existed exactly for that (knowing both upgrade and remove list).
But it appears it was totally wrongly used, and I thought it would be
possible to deal with this in sync.c anyway, but didn't think too much about
it.

> sp1 = pmpkg("pkg1", "1.0-2")
> sp1.replaces = [ "pkg2" ] 
> self.addpkg2db("sync", sp1)
> 
> sp2 = pmpkg("pkg2", "1.0-2")
> self.addpkg2db("local", sp2)
> 
> sp3 = pmpkg("pkg3", "1.0-2")
> sp3.depends = ["pkg2=1.0-2"]
> self.addpkg2db("sync", sp3)
> 
> lp1 = pmpkg("pkg1", "1.0-1")
> self.addpkg2db("sync", lp1)
> 
> lp2 = pmpkg("pkg2", "1.0-2")
> self.addpkg2db("local", lp2)
> 
> lp3 = pmpkg("pkg3", "1.0-1")
> self.addpkg2db("local", lp3)
> 
> self.args = "-Su"
> 
> self.addrule("PACMAN_RETCODE=1")
> self.addrule("PKG_EXIST=pkg2")

That pactest doesn't look right, does it?




More information about the pacman-dev mailing list