mirror of
https://github.com/lxc/lxc-templates.git
synced 2025-01-22 12:20:11 +00:00
templates: lxc-opensuse.in: Ensure cache is fully populated
We build our LXC rootfs based on a minimal openSUSE cache. However, since we are only using this cache to bootstrap the rootfs, we need to make sure that all packages are present there otherwise we see failures like the following one expanding package dependencies... expansion error nothing provides net-tools nothing provides iproute2 Failed to download 'opensuse base' Most of the needed packages are being pulled in indirectly as dependencies of other packages but we should be more explicit since dependencies could change in the future. Finally, we pass '--no-recommends' in order to have better control of what packages are being pulled into the cache. Signed-off-by: Markos Chandras <mchandras@suse.de>
This commit is contained in:
parent
2dc3dc54a5
commit
39ba2322d8
@ -154,8 +154,10 @@ download_opensuse()
|
|||||||
zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar "$update_repo_url" update || return 1
|
zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar "$update_repo_url" update || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
support_packages=(zypper patterns-openSUSE-base lxc ncurses-utils iputils udev netcfg hwinfo insserv-compat module-init-tools openSUSE-release openssh pwdutils sysconfig net-tools iproute2)
|
||||||
|
|
||||||
zypper --quiet --root $cache/partial-$arch-packages --non-interactive --gpg-auto-import-keys update || return 1
|
zypper --quiet --root $cache/partial-$arch-packages --non-interactive --gpg-auto-import-keys update || return 1
|
||||||
zypper --root $cache/partial-$arch-packages --non-interactive in --auto-agree-with-licenses --download-only zypper lxc patterns-openSUSE-base bash iputils sed tar rsyslog || return 1
|
zypper --root $cache/partial-$arch-packages --non-interactive in --no-recommends --auto-agree-with-licenses --download-only zypper lxc patterns-openSUSE-base bash iputils sed tar rsyslog ${support_packages[*]} || return 1
|
||||||
|
|
||||||
cat > $cache/partial-$arch-packages/opensuse.conf << EOF
|
cat > $cache/partial-$arch-packages/opensuse.conf << EOF
|
||||||
Preinstall: aaa_base bash coreutils diffutils
|
Preinstall: aaa_base bash coreutils diffutils
|
||||||
@ -168,16 +170,7 @@ Preinstall: libpcre1
|
|||||||
|
|
||||||
RunScripts: aaa_base
|
RunScripts: aaa_base
|
||||||
|
|
||||||
Support: zypper
|
Support: ${support_packages[*]}
|
||||||
Support: patterns-openSUSE-base
|
|
||||||
Support: lxc
|
|
||||||
Support: ncurses-utils
|
|
||||||
Support: iputils
|
|
||||||
Support: udev
|
|
||||||
Support: netcfg
|
|
||||||
Support: hwinfo insserv-compat module-init-tools openSUSE-release openssh
|
|
||||||
Support: pwdutils sysconfig
|
|
||||||
Support: net-tools iproute2
|
|
||||||
|
|
||||||
Ignore: rpm:suse-build-key,build-key
|
Ignore: rpm:suse-build-key,build-key
|
||||||
Ignore: systemd:systemd-presets-branding
|
Ignore: systemd:systemd-presets-branding
|
||||||
|
Loading…
Reference in New Issue
Block a user