The Landscape client should query Smart about the package locks
currently sent on the system, and report all possible changes to the
server.
Full information about locking should be reported to the server, this includes:
1) A new "package-locks" message, with "set" and "unset" fields, to report about newly set/unset package locks. For Smart a package lock is basically an expression matching zero or more packages, any matched package will be locked and Smart will never change its status, for example if it's installed it won't be removed or upgraded, if it's not installed it won't be installed. The package lock expression is defined by a name and optionally a relation/version condition, for example the package lock "foo < 1.0" matches all packages named "foo" with version lower than 1.0.
2) Two new "locked" and "not-locked" fields in the "packages" message, to report changes about the locking status of packages, as consequence of newly created/removed package locks. For example if the package foo-0.9 has id 1, then adding the smart lock "foo < 1.0" will eventually result in a "packages" message with a "locked" field listing package id 1.
Nice branch! Just one comment:
[1] The sequence_to_ranges calls are not tested (although I'm not sure how useful they are).
+1!