Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Pacman Development (http://www.linux-archive.org/archlinux-pacman-development/)
-   -   resolvedeps is negligent: resolvedeps.py (http://www.linux-archive.org/archlinux-pacman-development/5407-resolvedeps-negligent-resolvedeps-py.html)

Nagy Gabor 11-26-2007 01:56 PM

resolvedeps is negligent: resolvedeps.py
 
Hi!
This is a not-to-commit pactest, I just refer to this old thread...:
http://www.archlinux.org/pipermail/pacman-dev/2007-August/009072.html
I don't know whether we should fix this or not... This is not a critical bug,
just resolvedeps is a bit negligent, but checkdeps will report its negligence
(however, pacman doesn't seem to be very informative...).
By fixing this the code would be cleaner, more clever, but _notably_ slower, so
I still don't know what to do... What do you think?

---resolvedeps.py---
self.description = "resolvedeps test"

sp1 = pmpkg("pkg1")
sp1.depends = [ "pkg2>=2.0-1" , "provision" ]
self.addpkg2db("sync", sp1)

sp2 = pmpkg("pkg2", "2.0-1")
self.addpkg2db("sync", sp2)

sp3 = pmpkg("provision")
self.addpkg2db("sync", sp3)

lp = pmpkg("pkg2", "1.0-1")
lp.provides = [ "provision" ]
self.addpkg2db("local", lp)

self.args = "-S pkg1 pkg2"

self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")
self.addrule("PKG_VERSION=pkg2|2.0-1")
self.addrule("PKG_EXIST=provision")


----------------------------------------------------
SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev

Xavier 11-26-2007 02:43 PM

resolvedeps is negligent: resolvedeps.py
 
On Mon, Nov 26, 2007 at 03:56:28PM +0100, Nagy Gabor wrote:
> Hi!
> This is a not-to-commit pactest, I just refer to this old thread...:
> http://www.archlinux.org/pipermail/pacman-dev/2007-August/009072.html
> I don't know whether we should fix this or not... This is not a critical bug,
> just resolvedeps is a bit negligent, but checkdeps will report its negligence
> (however, pacman doesn't seem to be very informative...).

Yes I noticed, I think this little bug was in your original checkdeps patch.
At the end of sync_prepare, you should do s/FREELIST(deps);/*data = deps;/
Then the missing dependencies message will magically appear again in the
frontend :)

> By fixing this the code would be cleaner, more clever, but _notably_ slower, so
> I still don't know what to do... What do you think?
>
> ---resolvedeps.py---
> self.description = "resolvedeps test"
>
> sp1 = pmpkg("pkg1")
> sp1.depends = [ "pkg2>=2.0-1" , "provision" ]
> self.addpkg2db("sync", sp1)
>
> sp2 = pmpkg("pkg2", "2.0-1")
> self.addpkg2db("sync", sp2)
>
> sp3 = pmpkg("provision")
> self.addpkg2db("sync", sp3)
>
> lp = pmpkg("pkg2", "1.0-1")
> lp.provides = [ "provision" ]
> self.addpkg2db("local", lp)
>
> self.args = "-S pkg1 pkg2"
>
> self.addrule("PACMAN_RETCODE=0")
> self.addrule("PKG_EXIST=pkg1")
> self.addrule("PKG_EXIST=pkg2")
> self.addrule("PKG_VERSION=pkg2|2.0-1")
> self.addrule("PKG_EXIST=provision")
>
>

I think it would be interesting to see the patch you propose for fixing it,
and a benchmark for measuring how slower it is :)

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev


All times are GMT. The time now is 11:58 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.