Skip to content
Gabi Mohr edited this page Dec 15, 2015 · 96 revisions

General 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.

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 select "Upgrade" on installation screen

Distribution Upgrade

Or use the command line tool zypper

'zypper dup'

See Upgrade with 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 and Using Qt Software Management

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

See also Package Update

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. 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


For former distributions, openSUSE13.2, SLES-12 we had several issues/bugs reported concerning the Software Managemant UIs:

  • YaST Qt package selector UI has installed recommended packages for already installed packages by default bnc#902394 which led to behaviour that many unwanted packages got installed.

Solution: Let the libzypp default unchanged (don't install recommended packages for already installed packages) for YaST. Offer the possibility to "Install packages for already installed packages" as an action (which correlates to command 'zypper inr'), do not store the setting.

libzypp option:  	ignoreAlreadyRecommended

/etc/sysconfig/yast2:	PKGMGR_REEVALUATE_RECOMMENDED (obsolete/removed)
  • There wasn't a possibility to disable installation of recommended packages, i.e. the 'usual' recommends, the 'weak' dependencies (boo#900853), which made it impossible e.g. to install a minimal system.

Solution: Add an option "Install recommended packages" and save the setting in /etc/sysconfig/yast2

/etc/zypp/zypp.conf:	solver.onlyRequires
/etc/sysconfig/yast2:  	PKGMGR_RECOMMENDED  (newly added)
  • Qt and textmode ncurses UI read/wrote different config files and saved different values; led to inconsistent behaviour when using other UI.

Solution: Use /etc/sysconfig/yast2 for Qt and ncurses UI

/etc/sysconfig/yast2
QT UI:
~/.config/YaST2/YQPackageSelector.conf (completely removed)

The options "Allow Vendor Change" and "Cleanup when deleting" are not saved any longer (were saved from QT UI) because it's not recommended to change the libyzpp default "no" of these options (see comment in etc/zypp.zypp.conf). These options can be changed in UIs but are reset to /etc/zypp/zypp.conf setting for next run of the Package Selector.

/etc/zypp/zypp.conf:  solver.allowVendorChange, solver.cleanupdepsOnRemove
                      read from UIs to get initial value
UI settings aren't saved here nor in /etc/sysconfig/yast2

SLES-12 Release Notes: https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12/#Packages

  2.1.1
  When adding a module repository such as Public Cloud the graphical 
  installer (YaST Qt UI) automatically selects recommended packages. 
  Often this is not expected by the user.

  To work around this bahavior, disable the installation of recommended 
  packages in the installer (YaST Qt UI) or use the text-mode installer 
  (YaST ncurses UI) that by default does not autoinstall recommended packages
  ("Install Recommended Packages for Already Installed Packages" is deactivated).

SLES-12-SP1 Release notes: https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12-SP1/

   3.2.2
   YaST Qt packager UI no longer defaults to installing recommended packages
   for already installed packages. The persistent option controlling this was
   moved to a one-time command Extras/Install All Matching Recommended 
   Packages. (boo#902394)

(For ncurses UI available in menu 'Dependencies', 'Install Recommended Packages for Already Installed Packages Now')

For newly installed packages, the weak dependencies are still installed 
by default, but newly this can be disabled in the UI with the option 
Dependencies/Install Recommended Packages (boo#900853).

(Also for ncurses UI in menu 'Dependencies', 'Install Recommended Packages')

  The YaST Qt packager UI is also using the same configuration file as the
  ncurses packager UI:
    /etc/sysconfig/yast2     (boo#900853).

  We do not recommend to disable installing recommended packages during 
  installation unless you are trying to install a really minimal system. 
  If you do so, make sure to review the package selection; the functionality
  associated to patterns expects recommended packages to be installed, too, 
  and if any of them are missing, some functionality of the patterns may 
  not be available. 

(bnc#797304 don't install recommends for minimal pattern, fate #318099 Possibility to install with "no recommends")

Summary

Current behaviour (openSUSE Leap42.1, SLES-12-SP1, Tumbleweed)

Text mode (ncurses) and Qt respect same 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
Clone this wiki locally