Libzypp/Package Management
From openSUSE
Contents |
Package Management and Package Dependency Resolving
Introduction
SUSE Linux uses rpm as its package format. The basic tool for this is the RPM (RPM Package manager) program, it handles installation, removal and querying of packages.
RPM checks that the requirements of a package are met, e.g. if package X needs package libY and you try to install package X but without having libY installed, rpm will refuse to install X and give a warning that libY is missing. RPM has no way to install automatically a package that contains libY.
There are various programs using rpm (and other package formats) to support the following use cases with a comfortable user interface:
- Install a package and all of its dependencies automatically
- Download these packages from a remote server or local media
- Remove packages
- Update packages with newer versions
Libzypp
SUSE Linux 10.0 offers the following programs for this:
- YOU - the YaST online update (only update)
- yast package manager ("yast sw_single") for installation and removal (but not update)
- apt-rpm as alternative for yast and YOU
With SUSE Linux 10.1, SUSE has integrated a new package manager resolver library called "libzypp".
libzypp is the integration of SUSE's yast2 Package manager and Ximian's libredcarpet. At Novell two solutions so far were used - Red Carpet and YaST package manager - and it was decided to merge both in a best of breed approach.
The advantages for SUSE Linux are:
- A better resolver than before
- More information about why a package is installed or no solution is found
- A better integration of all those feature that were added over the years to our package manager.
- A command line interface ("rug")
- A common handling of packages *and* patches
- Dependency handling for update packages
- A better way to handle selections (we call them now "patterns")
- Remote management (not yet in SUSE Linux 10.1)
- Additional repositories during installation
- More flexibility in handling of different repositories, e.g. it is possible to have additional patterns for each repository.
- Additional dependencies based on language (for fonts, translatations, etc.) or hardware (for drivers)
Evolution
- Thus, following its consecutive acquisitions SuSE GmbH and Ximian, Novell decided to merge both systems RedCarpet and YaST package manager to its Zen Management Network, designed to manage large heterogeneous park. While the resulting manager, ZYpp, worked well on products Company with the ZMD deamon, it was not very well suited for public distribution, leading to an openSUSE 10.1 release which came out with a system package not working as expected.
- The openSUSE 10.2 release corrected some defects of the previous release, using the revisited libzypp v2. Then, ZMD was finally removed permanently from the 10.3 release and reserved only to the company Enterprise products. While zypp v3 provided openSUSE with a relative good package manager, equivalent to other existing packages management systems, it suffers from some flaws in its implementation which limited its performance.
- Projects like OPIUM (Optimal Package Install / Uninstall Manager)[1a] and Mancoosi[1c] were trying to fix dependency solving issues with a SAT solver (Boolean satisfiability problem). Traditional solvers like Apt[1a][1b] sometimes show unacceptable deficiencies, SAT solvers, from the theory of complexity[2], basically work differently from them (see [3] for the operation of the algorithm Apt and Aptitude). It was decided to integrate SAT algorithms into the zypp stack, the solver algorithms used were based on the popular minisat solver.
- After several months of work, the results are more encouraging: the benchmarks of zypp v4 compared to YUM and Smart, on the same machine, speak for themselves (see [5] to see a few graphs) and Smart "use-case" [6] are properly managed. Another surprising feature of this new zypp is its ability to invoke recommendations physical packages. Need to install a new camera? A simple connection of hardware and a simple "zypper update" command line (or via YaST) and zypp will try to get good drivers from the online repositories.
- Zypp is to be an independent project of the openSUSE distribution: It has therefore some degree of interoperability [7] with the de facto standard yum, and can be used with other distributions: the graphical user interface implements a complete PackageKit zypp backend. Taking part of the flexibility of the openSUSE Build Service, packages of the ZYpp package manager will be available for other distribution like Fedora and Mandriva Linux [8].
References
- [1a] C. Tukker, D. Shuffelton, R. Jhala, S. Lerner, OPIUM: OPtimal Package Install/Uninstall Manager, 29th International Conference on Software Engineering (ICSE'07), 2007 : http://www.cs.ucsd.edu/~lerner/papers/opium.pdf
- [1b] EDOS Project Workpackage 2 Team. Report on formal management of software dependencies. EDOS Project Deliverable Work Package 2, Deliverable 2, March 2006 : http://www.edos-project.org/xwiki/bin/Main/Deliverables
- [1c] D. Le Berre, A. Parrain, On SAT Technologies for dependency management and beyond, ASPL 2008, Limerick, 2008 : http://www.mancoosi.org/papers/leberre-sat-beyond.pdf
- [2] http://en.wikipedia.org/wiki/Computational_complexity_theory
- [3] D. Burrows, Modelling and Resolving Software Dependencies, June 2005 : http://people.debian.org/~dburrows/model.pdf
- [4] F. Mancinelli, J. Boender, R. di Cosmo, J. Vouillon, Managing the Complexity of Large Free and Open Source Package-Based Software Distributions, 21st IEEE International Conference on Automated Software Engineering (ASE'06), 2006
- [5] Yum, Smart and ZYpp speed / memory usage : http://duncan.mac-vicar.com/blog/archives/309
- [6] http://svn.labix.org/smart/trunk/README, http://duncan.mac-vicar.com/blog/archives/310, http://duncan.mac-vicar.com/blog/archives/311
- [7] The greatest unknown openSUSE 11.0 package management feature - Interoperability : http://duncan.mac-vicar.com/blog/archives/314
- [8] http://download.opensuse.org/repositories/zypp:/Backport/

