diskimage-builder/diskimage_builder/elements/zypper-minimal/pre-install.d/00-disable-zypper-recommends
Dirk Mueller b4edb7d0eb Disable recommended package installations for zypper-minimal
This is consistent with how dpkg based images are configured
and minimizes the nodepool images drastically (avoid installing
texlive for example)

Change-Id: I98fb31bc0e06869e9770fae3dbd62f0d86acb879
2017-05-26 09:47:07 +02:00

19 lines
416 B
Bash
Executable File

#!/bin/bash
# Prevent libsolv/zypper from installing recommended packages
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
fgrep -qx "solver.onlyRequires = true" /etc/zypp/zypp.conf || {
cat >> /etc/zypp/zypp.conf << _EOF_
## Disable installation of recommended packages, language packages
## and packages which depend on hardware (modalias).
solver.onlyRequires = true
_EOF_
}