Mailinglist Archive: zypp-devel (227 mails)
| < Previous | Next > |
[zypp-devel] Switch to new locks api
- From: Josef Reidinger <jreidinger@xxxxxxx>
- Date: Fri, 11 Apr 2008 14:09:23 +0200
- Message-id: <47FF54F3.9090203@xxxxxxx>
Libzypp uses new locking api now. You can find it in Locks.h. Works
everything except unlock, which I hope implement today.
few notes about functions
- supported is reading and writing locks to file (default is file specified in zypp.conf).
- loadLock append to locks available, if someone find useful setting new locks instead appending (something like restore old locks for frontend) it can be added.
- addLock locks all result of query and also store this query for later save, also Selectabable can be locked, it uses optimally query to lock
- saving locks must frontend explicit call
- saving locks rewrite locks file (as unwanted side effect remove all comments)
- existEmptyLocks and removeEmptyLocks is functions to maintance locks. First say if exist some locks which doesn't lock anything and second clean it. (ask for each lock by callback)
- if locksfile.apply (see zypp.conf) is on (default) then after start of zypp locks is loaded and applied
overview of new file format
structure is 'attribute: value', locks (queries) separated by empty line
attribute can be global_string (see addString for PoolQuery), string_type (values can be exact, substring, regex, glob), repo (repo allias), kind (Resolvable kind), require_all (if all attribute must match), case_sensitive (search case sensitive), install_status( values can be all, installed, not-installed) and all SolvAttributes with replaced colon ( s/:/_/g ). for example look [0].
default locks file path is /etc/zypp/locks
Pepa
[0] http://svn.opensuse.org/svn/zypp/trunk/libzypp/tests/zypp/data/PoolQuery/savedqueries
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
few notes about functions
- supported is reading and writing locks to file (default is file specified in zypp.conf).
- loadLock append to locks available, if someone find useful setting new locks instead appending (something like restore old locks for frontend) it can be added.
- addLock locks all result of query and also store this query for later save, also Selectabable can be locked, it uses optimally query to lock
- saving locks must frontend explicit call
- saving locks rewrite locks file (as unwanted side effect remove all comments)
- existEmptyLocks and removeEmptyLocks is functions to maintance locks. First say if exist some locks which doesn't lock anything and second clean it. (ask for each lock by callback)
- if locksfile.apply (see zypp.conf) is on (default) then after start of zypp locks is loaded and applied
overview of new file format
structure is 'attribute: value', locks (queries) separated by empty line
attribute can be global_string (see addString for PoolQuery), string_type (values can be exact, substring, regex, glob), repo (repo allias), kind (Resolvable kind), require_all (if all attribute must match), case_sensitive (search case sensitive), install_status( values can be all, installed, not-installed) and all SolvAttributes with replaced colon ( s/:/_/g ). for example look [0].
default locks file path is /etc/zypp/locks
Pepa
[0] http://svn.opensuse.org/svn/zypp/trunk/libzypp/tests/zypp/data/PoolQuery/savedqueries
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
| < Previous | Next > |