Skip to content

Commit

Permalink
setup: for fedora use --use-host-config for dnf repos
Browse files Browse the repository at this point in the history
It will solve the recent CI/CD setup install complain
about not able to find packages.

Signed-off-by: Douglas Schilling Landgraf <[email protected]>
  • Loading branch information
dougsland committed Nov 9, 2024
1 parent 848b5f4 commit ce5f8b9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion setup
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,16 @@ install() {
. /etc/os-release
setupRW "${ROOTFS}" "${RWETCFS}" "${RWVARFS}"

cmd_dnf_install="dnf -y install --releasever=${VERSION_ID} --installroot ${ROOTFS} ${PACKAGES_TO_INSTALL}"
EXTRA_FLAG=""
if grep -qi "^ID=fedora" /etc/os-release; then
EXTRA_FLAG="--use-host-config"
fi

cmd_dnf_install="dnf -y install --releasever=${VERSION_ID} --installroot ${ROOTFS} ${PACKAGES_TO_INSTALL} ${EXTRA_FLAG}"

echo "=====DEBUG==========="
echo "$cmd_dnf_install"
echo "=====DEBUG==========="
${cmd_dnf_install}

if dnf --installroot "${ROOTFS}" list installed "${PACKAGES_TO_REMOVE}" > /dev/null 2>&1; then
Expand Down

0 comments on commit ce5f8b9

Please sign in to comment.