Package Management/y2pmsh

From openSUSE


This tool is not supported anymore. It has been replaced by zypper on openSUSE 10.2 and above.
Please use Zypper instead.


y2pmsh


y2pmsh is a commandline frontend for the YaST Package Manager. y2pmsh has 2 "modes". You can directly pass arguments to it or use it as a shell. So you can either execute

Image:Shellscript.png earth:~ # y2pmsh command argument <enter>

this will run only this y2pmsh command and exit afterwards. Or you start y2pmsh as shell with

Image:Shellscript.png earth:~ # y2pmsh <enter>

and then run commands within this shell session

Image:Shellscript.png

[0] y2pm > command1 argument <enter> [0] y2pm > command2 argument <enter> [0] y2pm > exit <enter>


Installation Repositories


The y2pmsh source command handles the Installation Repositories.

Add your SUSE Linux CDs as installation repository

Image:Shellscript.png earth:~ # y2pmsh source -a cd:///

Add the current stable SUSE Linux as installation source

Image:Shellscript.png earth:~ # y2pmsh source -a http://download.opensuse.org/distribution/SL-OSS-stable/inst-source/

Show the installation repositories youve just added

Image:Shellscript.png

earth:~ # y2pmsh source -s Known sources: 0: [x] SUSE Linux 10.0 (cd:///) 1: [x] SUSE LINUX Version 10.0 (http://download.opensuse.org/distribution/SL-OSS-stable/inst-source/)

Remove the CD installation repository again

Image:Shellscript.png earth:~ # y2pmsh source -R 0

Add the SUSE Linux 10.0 KDE supplementary installation repository

Image:Shellscript.png earth:~ # y2pmsh source -a http://ftp.gwdg.de/pub/linux/suse/ftp.suse.com/suse/i386/supplementary/KDE/update_for_10.0/yast-source/

Update the meta data of the SUSE Linux 10.0 KDE supplementary installation repository

Image:Shellscript.png earth:~ # y2pmsh source -u 1

There are several options to the y2pmsh source command. You can see them with

Image:Shellscript.png earth:~ # y2pmsh source --help


Packages


Handling of packages with y2pmsh is always a three step way. You change the status of a package, let the package manager worry about dependencies and commit your changes.

To install a package you mark it for installation, then you resolve the dependencies of the package and then you commit the changes.

Image:Shellscript.png

earth:~ # y2pmsh <enter> [0] y2pm > install kdegames3-arcade <enter> [0] y2pm > install bzflag <enter> [0] y2pm > install chromium <enter> [0] y2pm > solve <enter> [0] y2pm > commit <enter> [0] y2pm > exit <enter>

To execute these three steps at once there is the y2pmsh isc command.

Install the packages kdegames3-arcade, bzflag and chromium including their dependencies.

Image:Shellscript.png earth:~ # y2pmsh isc kdegames3-arcade bzflag chromium

Removal of packages is also a three step way. But instead of marking packages for installation you mark them to be removed. Then you resolve the dependencies of the packages and commit the changes.

Image:Shellscript.png

earth:~ # y2pmsh <enter> [0] y2pm > remove kdegames3-arcade <enter> [0] y2pm > remove bzflag <enter> [0] y2pm > remove chromium <enter> [0] y2pm > solve <enter> [0] y2pm > commit <enter>

To upgrade your system to the newest available packages you can use the y2pmsh upgrade command.

Image:Shellscript.png

earth:~ # y2pmsh <enter> [0] y2pm > upgrade <enter> [0] y2pm > solve <enter> [0] y2pm > commit <enter> [0] y2pm > exit <enter>