FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 07-02-2008, 03:07 PM
Nagy Gabor
 
Default New sync070.py pactest

>From cfcaa50b83d6ce09a026e8275f19ce0665365e31 Mon Sep 17 00:00:00 2001
From: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Date: Wed, 2 Jul 2008 17:04:29 +0200
Subject: [PATCH] New sync070.py pactest

This pactest tests the cooperation between front-end and back-end in case of "-S provision" operation.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
---
pactest/tests/sync070.py | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
create mode 100644 pactest/tests/sync070.py

diff --git a/pactest/tests/sync070.py b/pactest/tests/sync070.py
new file mode 100644
index 0000000..2177ea7
--- /dev/null
+++ b/pactest/tests/sync070.py
@@ -0,0 +1,15 @@
+self.description = "Advanced -S provision test"
+
+sp1 = pmpkg("pkg", "1.0-1")
+self.addpkg2db("sync2", sp1)
+
+sp2 = pmpkg("pkg", "2.0-1")
+sp2.provides = [ "provision" ]
+sp2.conflicts = [ "pkg1=1.0-1" ]
+self.addpkg2db("sync1", sp2)
+
+self.args = "-S provision"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=pkg")
+self.addrule("PKG_VERSION=pkg|2.0-1")
--
1.5.6.1


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 07-02-2008, 03:24 PM
Nagy Gabor
 
Default New sync070.py pactest

> >From cfcaa50b83d6ce09a026e8275f19ce0665365e31 Mon Sep 17 00:00:00
> >2001
> From: Nagy Gabor <ngaba@bibl.u-szeged.hu>
> Date: Wed, 2 Jul 2008 17:04:29 +0200
> Subject: [PATCH] New sync070.py pactest
>
> This pactest tests the cooperation between front-end and back-end in
> case of "-S provision" operation.
>
> Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>

This pactest currently fails. It shows that the current "sync
addtarget" is quite messy. Most of the work (search for provision,
install group) is done in the front-end, some of the work done in the
back-end (interpret '/', avoid duplicated targets, and the
"conversion" from pmpkg_t to pmsyncpkg_t). The only information
back-end can pass to front-end is the package name, which is not
enough (that's why the pactest fails). As a possible fix, we could
patch front-end to give more concrete info to backend (to
sync_addtarget) by using 'db/package' format. But I think that
still would be ugly, the back-end should be able to say, that he wants
to add _this_ (pmpkg_t*) target (API change). IMHO most of the -S
provision/group work should be done by back-end, thus we could hide
some public functions (whatprovides, etc.). Unfortunately an other
problem pops up here: the hackish communication between back-end and
user ("Select packages to install from foo group...").

Conlusion? I don't know. Clearly, the "add provision" and "add group"
analogous to "add literal", that's why these codeparts should be in
back-end. But user<->back-end communication is not perfect atm...

Bye

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

Thread Tools




All times are GMT. The time now is 04:49 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org