From 1bdeaadc95118717e2c78d41fd3540bf11c23997 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 28 Mar 2017 15:58:42 +0200 Subject: [PATCH] Fix opensuse-minimal element on non-SUSE hosts zypper on non-suse hosts is not parsing the pattern repodata because those are marked as an inofficial extension to the repomd specification. This is not a big issue as there is meanwhile in newer openSUSE distributions a pattern *package* that depends on the same packages like the pattern would do, so we can just replace it with that. Change-Id: I0c8f713075bd7e5bf1d425f81933b4666654add7 Depends-On: I34e98f0f7693859ed05011b008334628adff612f Signed-off-by: Paul Belanger --- .../environment.d/10-opensuse-distro-name.bash | 1 + .../opensuse/environment.d/10-opensuse-distro-name.bash | 1 + .../elements/zypper-minimal/root.d/08-zypper-chroot | 4 +--- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/diskimage_builder/elements/opensuse-minimal/environment.d/10-opensuse-distro-name.bash b/diskimage_builder/elements/opensuse-minimal/environment.d/10-opensuse-distro-name.bash index db0f4756..557c4464 100644 --- a/diskimage_builder/elements/opensuse-minimal/environment.d/10-opensuse-distro-name.bash +++ b/diskimage_builder/elements/opensuse-minimal/environment.d/10-opensuse-distro-name.bash @@ -2,6 +2,7 @@ export DISTRO_NAME=opensuse DIB_RELEASE=${DIB_RELEASE:-42.2} export DIB_RELEASE=${DIB_RELEASE,,} export DIB_OPENSUSE_MIRROR=${DIB_OPENSUSE_MIRROR:-http://download.opensuse.org} +export DIB_OPENSUSE_PATTERNS=patterns-openSUSE-base case ${DIB_RELEASE} in # We are using "=>" as the assignment symbol since "@" "=" etc could be used in the URI itself. # Remember, we can't export an array in bash so we use a string instead. diff --git a/diskimage_builder/elements/opensuse/environment.d/10-opensuse-distro-name.bash b/diskimage_builder/elements/opensuse/environment.d/10-opensuse-distro-name.bash index a9d195eb..6291ed39 100644 --- a/diskimage_builder/elements/opensuse/environment.d/10-opensuse-distro-name.bash +++ b/diskimage_builder/elements/opensuse/environment.d/10-opensuse-distro-name.bash @@ -1,5 +1,6 @@ export DISTRO_NAME=opensuse export DIB_RELEASE=${DIB_RELEASE:-42.2} +export DIB_OPENSUSE_PATTERNS=patterns-openSUSE-base case ${DIB_RELEASE} in # Old openSUSE releases 13*) export OPENSUSE_REPO_DIR=openSUSE_${DIB_RELEASE} ;; diff --git a/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot b/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot index cb7909ae..9e375494 100755 --- a/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot +++ b/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot @@ -71,9 +71,7 @@ sudo mount -t sysfs none $TARGET_ROOT/sys # Install filesystem, base and useful tools sudo zypper ${ZYPPER_TARGET_OPTS} install ${ZYPPER_INSTALL_OPTS} filesystem # Install basic components in order -sudo zypper ${ZYPPER_TARGET_OPTS} install ${ZYPPER_INSTALL_OPTS} -t pattern base -# Install a few useful tools -sudo zypper ${ZYPPER_TARGET_OPTS} install ${ZYPPER_INSTALL_OPTS} python zypper +sudo zypper ${ZYPPER_TARGET_OPTS} install ${ZYPPER_INSTALL_OPTS} ${DIB_OPENSUSE_PATTERNS} python zypper sudo # Put in a dummy /etc/resolv.conf over the temporary one we used # to bootstrap. systemd has a bug/feature [1] that it will assume