Sunday 14 August 2011

The zypper Package Manager


Zypper is the package manager used by MeeGo. And now had some time to work with the zypper package manager I can say this is a nice tool. It has good functionality, a consistent interface and is easy to use and well documented. In comparison to apt-get I'd say it is superior. That is a big admission for a long time Debian user! What won me over was when I tried unsuccessfully to upgrade from MeeGo 1.2.0 to 1.2.8, by adding the repositories. Xorg was broken. I tried to fix. But gave up so decided to revert back. I thought this would take a re-installation. But, no! I just removed the offending 1.2.8 repositories and refreshed. Zypper correctly indicated the downgrade. After some network issues, resiliently managed by zypper, I was back and running. Marvellous! So, while I only be using MeeGo on my netbook, I am now comfortable enough in its use and management to use it as an alternative to Ubuntu. The other advantage I see is professionally it is good to understand how alternate systems are supported by RPM or Deb packages.

Working with Packages

MeeGo is RPM based system using the zypper package manager. I've not used an RPM based system in a very long time. So I will have to learn once again how to,

Help

zypper help orzypper help [command]

Listupdates

zypper lu

Update

zypper up

Search for a package

zypper se [package name]

Install a package

zypper in [package name]

Remove a package

zypper rm [package name]

List packages

zypper pa

Show package info

zypper if [package name]

Working with Repositories

This is the one thing that I was concerned with most. In Debian based systems, package sources are easily maintained. Happily, Zypper is just as easy. Maybe even easier as the command interface is consistent with normal package management. MeeGo can be augmented by OpenSuse package repositories. See the examples below for the repositories use to install Skype.

List repositories 

zypper lr

Add a repository

zypper ar [url to repository] [name of repository]

Remove a repository

zypper rr [name of repository]

Enable a repository

zypper mr -e [name of repository]

Disable a repository

zypper mr -d [name of repository]

Refresh repositories

zypper ref –force Source: http://www.freetechie.com/blog/using-opensuse-zypper-for-package-management-adding-removing-repository-management

Example – add keepassx

This is not in the default MeeGo repositories. So lets install from an alternate repository.
zypper ar http://download.opensuse.org/distribution/11.4/repo/oss/ 11.4-OpenSuse-oss

Search for package:

$ zypper se keepassx Loading repository data... Reading installed packages... S | Name | Summary | Type--+----------+---------------------------------+-------- i | keepassx | Cross Platform Password Manager | package

Install package:

$ zypper if keepassx

Get package information:

$ zypper if keepassxLoading repository data...Reading installed packages...Information for package keepassx:
Repository: @System
Name: keepassx
Version: 0.4.3-1.2
Arch: i586
Vendor: obs://build.opensuse.org/openSUSE:11.4:Contrib
Installed: Yes
Status: up-to-date
Installed Size: 2.7 MiB
Summary: Cross Platform Password Manager
Description:
KeePassX is a free/open-source password manager or safe which helps you to manage your passwords in a secure way. You can put all your passwords in one database, which is locked with one master key or a key-disk. So you only have to remember one single master password or insert the key-disk to unlock the whole database. The databases are encrypted using the best and most secure encryption algorithms currently known (AES and Twofish).zypper in KeePassX

Example - add Skype

Include the following repositories,
zypper ar http://download.opensuse.org/distribution/11.4/repo/non-oss/ 11.4-OpenSuse-non-osszypper ar http://download.opensuse.org/distribution/11.4/repo/oss/ 11.4-OpenSuse-oss

2 comments:

Anonymous said...

hi there,

i want to install java but i don't know what is the package name for java and i can't find it. do you have any idea about that ?

Frank H Jung said...

If you have searched for "java" and came back with no results, then you will need to add a repository that contains a JDK. Have a look at http://wiki.meego.com/Java