Dňa Thursday 27 March 2008 16:11:04 Josef Reidinger ste napísal:
Hi, I'm sending my proposal for locks API in the attachment. See FATE #120118 and [1] (locks).
The attachment contains io api for locks file and locks-to-pool bridge. Also some functions telling which Resolvables a lock or several locks cover.
question about C++ (function addLocks). I need distinguish between container that contains resolvables and locks. Is this possible in C++? (like Collection<Lock> and Collection<Resolvable> in java?)
some ideas how to solve the issue with support of regexes or wildcards in the locks file:
- keep support of regexes in the locks file - have function which does something like locks coverage. How would it work? It would get old locks and resolvables which the user wanted to lock (including the changed ones). Then, for each lock it gets all matching available resolvables and checks if the set is a subset of currently locked resolvables. If it is, those resolvables are marked as already locked (written/covered/whatever) and the lock is written back to the locks file unchanged (meaning if it was a regex, it will stay so). Thus the remaining resolvables will be written to the locks file individually (without using any regex).
This may not be trivial.
- drop regex support and write one lock per resolvable
- use two files for user (regex) locks and UI locks (as suggested in [1])
Other issues: - how to clean up or maintain the locks file, it will probably be a mess after some time - the locks file format will be extended to include resolvable kind. The question is whether we want to support also something else (architecture, vendor, ...) - the API supports locks file <-> pool manipulation as well as direct to/from locks manipulation, is it OK?
What should happen with locks during system upgrade? Stano -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org