Skip to content
Gabi Mohr edited this page Apr 28, 2016 · 96 revisions

Package handling overview

The installation of packages is involved in several tasks, means different scenarios like installing a new system, upgrade a distribution or handle individual packages. Using the appropriate YaST module resp. the option meant for a specific task ensures a proper solution.
See also Managing and Updating Software

Online Update

Get updates for packages from the SUSE update repository, like bug- and security-fixes for the distribution installed on the system.

Use YaST Online Update for this task:

Qt UI:     Application Menu YaST
  	      	   Online Update

ncurses UI: 'yast online-update' 

YaST Online Update

Upgrade

Perform a distribution upgrade, e.g. from openSUSE 13.2 to Leap 42.1 or follow Tumbleweed.

Use the YaST Upgrade workflow to upgrade your system:

Boot your machine (from DVD) and choose 'Upgrade' on installation screen

Distribution Upgrade

Or use the command line tool zypper

'zypper dup'

See Upgrade using zypper and Living on Tumbleweed

Update/install/delete individual packages

Configure your system manually by adding packages (also from external repositories), remove unwanted ones or update certain packages.

The YaST Software Management (the Package Selector) is the tool for:

  Qt UI: Application Menu YaST
 	       	    Software Management
 
  ncurses UI: 'yast sw_single'

See Install/Remove Software

Use cases for the YaST Software Management:

1. Install a new package

When installing a new package it's usually wanted to get packages which are recommended by the newly installed one. This also applies to the "installation" of an additional language (selecting a language in View Languages) - you will get all language dependent packages.

View Languages

The installation of the so called "weak" dependencies is ON by default. The Package Selector UIs offer to change the behaviour in menu Dependencies/Install Recommended Packages.

Note It's not recommended to disable the installation of recommended packages during a new installation unless you are trying to install a really minimal system. Make sure then to get all required packages installed.

The menu entry Autocheck is also ON by default which means all dependencies of the package selected for installation are checked immediately (e.g conflicts with other packages, additionally needed packages and the recommended packages). If this is unchecked in menu, the dependencies will only be checked once (when clicking Accept button). How to solve the package conflicts, see Checking Software Dependencies

Dependency menu

The Dependency options are stored (in /etc/sysconfig/yast2), i.e. are set accordingly when starting Package Selector next time (regardless whether starting Qt or text mode).

2. Update a package or "All packages in list"

When selecting a package for update, the package library (the solver) checks all available repositories to find the newest version. In most cases it's wanted that the installed and the updated package come from the same repository (either from SUSE or an external repository). Therefore the related option Allow vendor change in Options menu is OFF by default. This prevents overwriting packages from external repositories with SUSE update packages in case the external source is disabled (or not available). If explicitly required, the option can be turned ON but the setting isn't stored and reset to default for next run.

Note YaST Software Management and Online Update equally respect the dependency settings (and related options). This means the default for the Allow vendor change option is also OFF by default for an online update (because changing the vendor is usually not wanted). When doing an upgrade, a vendor change is done by default.

Options menu

3. Remove a package

Removing a package from the system by default doesn't remove all depending packages because this can easily lead to a loss of packages which are still wanted on the system or even needed (e.g. a script is used by some application). The removal of all depending packages, a "cleanup" means that the package library marks those packages which were installed automatically (because required or recommended by the package) for removal.

If this is wanted, the option Cleanup when deleting packages in Options menu can be turned ON. As for the Allow vendor change option the setting isn't stored to prevent from accidental usage.

Note When doing a Cleanup when deleting packages the Automatic changes dialog should be checked carefully to see whether still wanted packages are selected for removal (possibly change the package status here).

4. System verification

Verify the system means that the dependencies (required packages as well as conflicts/obsoletes) for all packages installed on the system are checked. Missing required packages are selected for installation and conflicts are shown. This check is OFF by default. It can be switched ON in Options menu; the setting is stored in /etc/sysconfig/yast2.

5. Installation of packages for already installed packages

The scenario here mostly applies to the installation of hardware dependent packages from an external repository where e.g. new drivers are available. Adding a new repository doesn't automatically trigger a dependency solver run. Installation of new hardware dependent packages (also applies for language packages) for packages already installed on your system has to be done manually by using Install All Matching Recommended Packages in Extras menu. This action correlates to execution of the command 'zypper inr'.

Extras menu

Using the text mode (ncurses) UI

All settings, options, actions described above are also available in text mode UI, all together located in Dependencies menu.

Text mode Dependencies menu

Hint The YaST gtk front end isn't supported any longer


Files and Variables

From openSUSE Leap42.1, Tumbleweed, SLES-12-SP1 on, the text mode and the Qt UI of the Software Management share configuration files and options:

'/etc/sysconfig/yast2'

## Type: list(yes,no)
## Default: "yes"
#
# By default the package dependencies are checked on every action (installation/update/removal)
# done in the package selector and possible conflicts are shown immediately.
# Set the value to "no" if you want the dependency check only onces before starting the
# package installation/update/removal.
PKGMGR_AUTO_CHECK="yes"

## Type: list(yes,no)
## Default: "no"
#
# The default is "no", i.e. the package dependencies of already installed package are
# not checked when installing a package (only the dependencies of the new package).
# Set this option to "yes" if you want to verify your system (check the dependencies of
# all already installed packages).
PKGMGR_VERIFY_SYSTEM="no"

## Type: list(yes,no)
## Default: "yes"
#
# Install also the weak, recommended, dependencies.
PKGMGR_RECOMMENDED="yes"

'/etc/zypp/zypp.conf'

##
## EXPERTS ONLY: Per default the solver will not replace packages of
## different vendors, unless you explicitly ask to do so. Setting this
## option to TRUE will disable this vendor check (unless the application
## explicitly re-enables it). Packages will then be considered based on
## repository priority and version only. This may easily damage your system.
##
## CHANGING THE DEFAULT IS NOT RECOMMENDED.
##
## Valid values:  boolean
## Default value: false
##
# solver.allowVendorChange = false

##
## EXPERTS ONLY: Cleanup when deleting packages. Whether the solver should
## per default try to remove packages exclusively required by the ones he's
## asked to delete.
##
## This option should be used on a case by case basis, enabled via
## command line options or switches the applications offer. Changing
## the global default on a system where unattended actions are performed,
## may easily damage your system.
##
## CHANGING THE DEFAULT IS NOT RECOMMENDED.
##
## Valid values:  boolean
## Default value: false
##
# solver.cleandepsOnRemove = false

Note Respecting the libzypp settings for these options when starting Qt UI is fixed in libyui-qt-pkg-2.45.6.