From b4edb7d0eb83e6094946fd5ad7f1701066feb93c Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 26 May 2017 09:47:07 +0200 Subject: [PATCH] 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 --- .../pre-install.d/00-disable-zypper-recommends | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 diskimage_builder/elements/zypper-minimal/pre-install.d/00-disable-zypper-recommends diff --git a/diskimage_builder/elements/zypper-minimal/pre-install.d/00-disable-zypper-recommends b/diskimage_builder/elements/zypper-minimal/pre-install.d/00-disable-zypper-recommends new file mode 100755 index 00000000..1cdb75ea --- /dev/null +++ b/diskimage_builder/elements/zypper-minimal/pre-install.d/00-disable-zypper-recommends @@ -0,0 +1,18 @@ +#!/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_ +}