Zypper is the repository and package management tool used by MeeGo. It is modelled on yup, installs RPMs behind the scenes, and behaves very much like apt on Debian-based systems.
Like apt, Zypper manages a number of repositories, each of which can contain one or more packages. These repositories are defined in .repo files, which are stored in /etc/zypp/repos.d.
Contents |
There are two ways to add a .repo file to zypper:
/etc/zypp/repos.d as root
zypper ar http://..../<repo>.repo - "ar" is short-hand for "addrepo"
After adding a repository you should run zypper update to update all packages, or zypper refresh just to refresh package lists and verify the new .repo file.
"update" should be run periodically to keep software up to date. For most users, however, the operation will be done through a graphical updater, and you should only need to run this manually when adding a repository.
You can install software from the command line using zypper install [packagename] or zypper in [packagename], or remove it with zypper remove [packagename] or zypper rm [packagename]
The file format for repositories is identical for yum and zypper. The file contains one or more repository definitions, in the form:
[home_yanli_branches_MeeGo_1.1_Core_Update_Testing] name=Branch of MeeGo:1.1:Core:Update:Testing (MeeGo_1.1) autorefresh=1 type=rpm-md baseurl=http://download.meego.com/live/home:/yanli:/branches:/MeeGo:/1.1:/Core:/Update:/Testing/MeeGo_1.1/ gpgcheck=0 enabled=1
The file starts with a unique identifier for the repository, a string to indentify it, and contails a base URL where packages will be found, and an indicator of the type of the repository. This can be yast2, plaindir or rpm-md, and defines the expected format for repository metadata. Usually it will be rpm-md.