Monday, April 19, 2010

zypper-1.4.2: rewritten package selection code

Zypper has undergone a major refactoring of its package selection code recently. This was mainly to enable automatic testing and to make it easier and safer to add new features.
I'll submit zypper 1.4.2 including this change to Factory soon. It seems to work fine for the most part, but if you spot something that used to work for you in 1.4.1, please let us know via bugzilla. Don't forget to attach both zypper.log and solver test case.

The new version already enables use of unified package arguments (in install, update, and remove commands) in the form of:
[+/-][repo:][type:]name[.arch][OPevr[.arch]]

± (or ~|!) ; install/remove modifier
repo = ; repo alias, number, or name
type = patch|pattern|product ; if not specified 'package' isimplied
name ; can even be a glob
OP = -|=|>=|<=|>|< ; version operator
evr = [epoch:]version[-release] ; edition (version)

E.g. $ zypper in packman:xine-ui-0.99.5cvs20091115-0.pm.1.4 (don't forget to quote the args, if they contain ?/*/</> or spaces).

More about all this (and about a few more features added in the last months) later ...

There is still some work to do to fully support this (especially don't try foo.arch :O), but the main focus now is to make sure that all that used to work before works also now. For future plans see roadmap and comments in the SolverRequester_test code. Don't hesitate to send feedback to or discuss this stuff on zypp-devel@opensuse.org or comment this blog post.