Skip to content

Commit

Permalink
Installing packages from BaseOS and AppStream if available (aws#2740)
Browse files Browse the repository at this point in the history
Co-authored-by: Himani Deshpande <[email protected]>
  • Loading branch information
himani2411 and Himani Deshpande authored Jun 4, 2024
1 parent 13c5323 commit 09c6d60
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@
if [ $? -ne 0 ]; then
# Previous releases are moved into a vault area once a new minor release version is available for at least a week.
# https://wiki.rockylinux.org/rocky/repo/#notes-on-devel
base_os_package_url="https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/BaseOS/#{node['kernel']['machine']}/os/Packages/k/${package}.rpm"
appstream_package_url="https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/AppStream/#{node['kernel']['machine']}/os/Packages/k/${package}.rpm"
base_os_status_code=$(curl --write-out '%{http_code}' --silent --output /dev/null ${base_os_package_url})
appstream_status_code=$(curl --write-out '%{http_code}' --silent --output /dev/null ${appstream_package_url})
set -e
dnf install -y https://dl.rockylinux.org/vault/rocky/#{node['platform_version']}/BaseOS/#{node['kernel']['machine']}/os/Packages/k/${package}.rpm
if [ $base_os_status_code != 404 ]; then
dnf install -y ${base_os_package_url}
elif [ $appstream_status_code != 404 ]; then
dnf install -y ${appstream_package_url}
fi
fi
dnf clean all
INSTALL_KERNEL_SOURCE
Expand Down

0 comments on commit 09c6d60

Please sign in to comment.