Skip to content

Commit 7479b89

Browse files
Use repo instead of enablerepo for Oracle Linux.
Repo flag will turn on a repo like enablerepo, but also limits the dnf action to only use the repos specified by the repo flags. This is necessary for Oracle Linux due to excessively slow metadata updates causing vm start to timeout. Signed-off-by: Chris Perelstein <[email protected]>
1 parent 03ffa07 commit 7479b89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/cidata/cidata.TEMPLATE.d/boot/30-install-packages.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ elif command -v dnf >/dev/null 2>&1; then
5959
if [ -n "${pkgs}" ]; then
6060
dnf_install_flags="-y --setopt=install_weak_deps=False"
6161
if grep -q "Oracle Linux Server release 8" /etc/system-release; then
62-
dnf_install_flags="${dnf_install_flags} --enablerepo ol8_baseos_latest --enablerepo ol8_codeready_builder"
62+
# repo flag instead of enable repo to reduce metadata syncing on slow Oracle repos
63+
dnf_install_flags="${dnf_install_flags} --repo ol8_baseos_latest --repo ol8_codeready_builder"
6364
elif grep -q "release 8" /etc/system-release; then
6465
dnf_install_flags="${dnf_install_flags} --enablerepo powertools"
6566
fi

0 commit comments

Comments
 (0)