We want to clean up the code of mic2, which use libzypp-bindings. Currently we just use libzypp-bindings to resolve dependencies, and download/install work is controlled in mic2. We have several points to refine the code: 1. Support download/install callback in libzypp-bindings, so that we can let libzypp-binding to download/install packages, and return the progress by callback function. These feature has been implemented in libzypp-bindings with the help of Klaus, but always segmentation fault. 2. Support advanced search in libzypp-bindings, such as wildcard(*) and pattern search. Currently we have just iterate the pool and found the correct poolItem, have not use any search function of libzypp. Use case as follows: (1) PoolQuery. addAttribute(sat::SolvAttr::name, "X11-*"); // Support wildcard search (2) pattern = pool.byIdentBegin (zypp.ResKind.pattern, "xyz") // pattern search My latest libzypp-bindings can be downloaded from here: http://download.meego.com/live/home:/xiaoqiang:/branches:/Tools:/Building/ Attached is the test code. Run test case: [root@localhost mic]# python zypppkgmgr.py zypp architecture: i686 Starting to download: glibc-common-2.13-14.11.i686.rpm Download at 0 % Download at 0 % Download at 10 % Download at 10 % Segmentation fault (core dumped) [root@localhost mic]# python zypppkgmgr.py zypp architecture: i686 Starting to install ncurses Install of ncurses at 100 % Install of ncurses at 0 % Install of ncurses at 0 % Install of ncurses at 100 % Install of ncurses finished with problem no_error : Segmentation fault (core dumped) Thanks Qiang -----Original Message----- From: Duncan Mac-Vicar P. [mailto:dmacvicar@suse.de] Sent: Thursday, September 01, 2011 8:52 PM To: zypp-devel@opensuse.org Subject: Re: [zypp-devel] libzypp-bindings: More API support On 08/30/2011 07:53 AM, Zhang, Qiang Z wrote:
Hi all,
We would like to use more python API in libzypp-bindings, such as PoolQuery, and I have tried to import the related API to libzypp, but fails.
Here's the patch I used to import PoolQuery API:
Just out of curiosity, what are you exactly using the bindings for? -- Duncan Mac-Vicar P. - http://www.suse.com/ SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5, 90409 Nürnberg, Germany -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org