ZYpp
Encyclopedia
ZYpp is a package management engine that powers Linux applications like YaST, Zypper and the openSUSE
OpenSUSE
openSUSE is a general purpose operating system built on top of the Linux kernel, developed by the community-supported openSUSE Project and sponsored by SUSE...

/SUSE Linux Enterprise
SUSE Linux distributions
SUSE Linux is a computer operating system. It is built on top of the open source Linux kernel and is distributed with system and application software from other open source projects. SUSE Linux is of German origin and mainly developed in Europe. The first version appeared in early 1994, making...

 implementation of PackageKit
PackageKit
PackageKit is an open source and free suite of software applications designed to provide a consistent and high-level front end for a number of different package management systems...

. Unlike other common package managers, it provides a powerful satisfiability solver
Boolean satisfiability problem
In computer science, satisfiability is the problem of determining if the variables of a given Boolean formula can be assigned in such a way as to make the formula evaluate to TRUE...

 to compute package dependencies and a convenient package management API. It is an open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 and free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 project sponsored by Novell
Novell
Novell, Inc. is a multinational software and services company. It is a wholly owned subsidiary of The Attachmate Group. It specializes in network operating systems, such as Novell NetWare; systems management solutions, such as Novell ZENworks; and collaboration solutions, such as Novell Groupwise...

 and licensed under the terms of the GNU General Public License
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

 v2 or later.

Zypper is the native command line interface of the ZYpp package manager for installing, removing, updating and querying software packages of local or remote (networked) media. Its graphical equivalent is the YaST package manager module. It has been used in openSUSE
OpenSUSE
openSUSE is a general purpose operating system built on top of the Linux kernel, developed by the community-supported openSUSE Project and sponsored by SUSE...

 since version 10.2 beta1. In openSUSE 11.1, Zypper reached version 1.0. On June 2, 2009, Ark Linux
Ark Linux
Ark Linux is a Linux distribution maintained by a group of volunteers and aims to be easy to install and use. Its default desktop environment is KDE.Ark Linux is available both as an installable CD and as a Live CD, and is free software.-Principles:...

 announced that it has completed its review of dependency solvers and has chosen ZYpp and its tools to replace the aging apt-rpm, as the first distribution to do so.

Purpose

Following its consecutive acquisitions of Ximian
Ximian
Ximian was a company that provided free software desktop applications for Linux and Unix based on the GNOME platform. Ximian was founded by Miguel de Icaza and Nat Friedman in October, 1999, and was bought by Novell on August 4, 2003...

 and SuSE GmbH
SUSE Linux distributions
SUSE Linux is a computer operating system. It is built on top of the open source Linux kernel and is distributed with system and application software from other open source projects. SUSE Linux is of German origin and mainly developed in Europe. The first version appeared in early 1994, making...

 in 2003, Novell
Novell
Novell, Inc. is a multinational software and services company. It is a wholly owned subsidiary of The Attachmate Group. It specializes in network operating systems, such as Novell NetWare; systems management solutions, such as Novell ZENworks; and collaboration solutions, such as Novell Groupwise...

 decided to merge both package management systems YaST package manager and Red Carpet in a best of breed approach, as the two solutions so far were used at Novell. Looking at the existing open source tools and their maturity available back in 2005, none of those fulfilled the requirements and were able to work smoothly with the existing Linux management infrastructure software developed by Ximian and SUSE, so it was decided to get the best ideas from existing pieces and to work on a new implementation. Libzypp, the resulting library, was aimed to be the software management engine of the SUSE distributions
SUSE Linux distributions
SUSE Linux is a computer operating system. It is built on top of the open source Linux kernel and is distributed with system and application software from other open source projects. SUSE Linux is of German origin and mainly developed in Europe. The first version appeared in early 1994, making...

 and the Linux Management component of the ZENworks Management
Novell ZENworks
Novell ZENworks, a suite of software products developed and maintained by Novell, Inc. for computer systems management, aims to manage the entire life cycle of servers, of desktop PCs , of laptops, and of handheld devices such as personal digital assistants . ZENworks recently included full disk...

 suite.

The early days

The Libzypp's solver was a port from the red carpet solver, which was written to update packages in an already installed system. Using it for the complete installation process brought it to its limits, and adding extensions such as support for weak dependencies and patches made it fragile and unpredictable. Although this first version of Zypp's solver worked satisfactorily on the company enterprise products with the coupled ZMD daemon, it led to an openSUSE 10.1 release which came out in May 2006 with a system package not working as expected. In December 2006, the openSUSE 10.2 release corrected some defects of the previous release, using the revisited ZYpp v2. ZMD was subsequently removed from the 10.3 release and reserved only for the company Enterprise products. While ZYpp v3 provided openSUSE with a relatively good package manager, equivalent to other existing packages management systems, it suffered from some flaws in its implementation which greatly limited its speed performance.

SAT solver integration

An area where libzypp needed significant improvement was the speed of the dependency solver.

Projects like OPIUM (Optimal Package Install/Uninstall Manager) and Mancoosi were trying to fix dependency solving issues with a SAT solver
Boolean satisfiability problem
In computer science, satisfiability is the problem of determining if the variables of a given Boolean formula can be assigned in such a way as to make the formula evaluate to TRUE...

. Traditional solvers like Apt sometimes show unacceptable deficiencies. SAT solvers, based on Computational complexity theory
Computational complexity theory
Computational complexity theory is a branch of the theory of computation in theoretical computer science and mathematics that focuses on classifying computational problems according to their inherent difficulty, and relating those classes to each other...

, work differently from the usual tools such as Apt. It was decided to integrate SAT algorithms into the ZYpp stack; the solver algorithms used were based on the popular minisat solver.
The SAT solver implementation as it appears in openSUSE 11.0 is based on two major, but independent, blocks:
  • Using a data dictionary
    Data dictionary
    A data dictionary, or metadata repository, as defined in the IBM Dictionary of Computing, is a "centralized repository of information about data such as meaning, relationships to other data, origin, usage, and format." The term may have one of several closely related meanings pertaining to...

     approach to store and retrieve package and dependency information. A new solv format was created, which stores a repository as a string dictionary, a relation dictionary and then all package dependencies. Reading and merging multiple solv repositories takes just some milliseconds.
  • Using satisfiability for computing package dependencies. The Boolean satisfiability problem
    Boolean satisfiability problem
    In computer science, satisfiability is the problem of determining if the variables of a given Boolean formula can be assigned in such a way as to make the formula evaluate to TRUE...

    is a well-researched problem with many exemplar solvers available; it is very fast, as package solving complexity is very low compared to other areas where SAT solvers are used. In addition, it does not require complex algorithms and it can provide understandable suggestions by calculating proof of why a problem is unsolvable.


After several months of work, the benchmark results of this fourth Zypp version integrated with the SAT solver are more than encouraging, moving YaST and zypper ahead of other rpm based package managers in terms of speed and footprint.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK