Libzypp/Application Layer/Miscellaneous stuff

From openSUSE

Contents

Miscellaneous

Disk Space and Active Disk Partitions

The app layer keeps track of disk usage, taking pending transactions into account. The UI (at least the package selectors) should display the disk space and warn the user when the system is about to run out of disk space.

Currently, the YCP application sets up those disk usage objects. We might want to move that functionality into the app layer where it would most likely make more sense.

Dependency Resolver API

For the UI, the dependency resolver is a self sufficient subsystem that communicates with the rest of libzypp independently. In particular, the dependency resolver has to take care of retrieving any data it needs for solving from the pool.

There must be some call to trigger a new resolver run. If there are any problems, this call has to enumerate (iterator or list) the problems. list.

Each of those dependency problems contains a user-legible (translated!) textual representation of the problem and a number of solutions (iterator or list) from which the user can choose one.

When the user selects solutions for one or more problems, the UI calls the solver again with that context information. This process repeats until there is no more dependency problem or the user chooses to cancel resolving.

For more details, see Solver.h

Export/Import packages and pattern list

This feature enables user to dump list of packages and patterns into XML file or read such list from XML file and change status of affected packages/patterns accordingly. It calls zypp::syscontent::Reader and ::Writed methods.

Currently UI does most of the things by itself: opening the file, catching all exceptions, creating import maps and iterating over all pkgs/patterns to change their status. This functionality could be moved into app layer, where related method would receive file name supplied by UI and do all the rest.