Skip to content

Commit

Permalink
Adding ROOTFS repo dir check
Browse files Browse the repository at this point in the history
In case QM ${ROOTFS}/etc/yum.repos.d is empty
Add AutoSD repo in order to install QM

Signed-off-by: Yariv Rachmani <[email protected]>
  • Loading branch information
Yarboa committed Jan 28, 2024
1 parent e6f32bd commit 9ab6a10
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ install() {
# shellcheck source=/dev/null
. /etc/os-release
setupRW "${ROOTFS}" "${RWETCFS}" "${RWVARFS}"
# check if yum repos under ${ROOTFS} is empty
if [ -z "$(find "${ROOTFS}"/etc/yum.repos.d -mindepth 1 -maxdepth 1)" ]; then
cat > "${ROOTFS}/etc/yum.repos.d/autosd.repo" << EOF
[autosd]
name=Automotive-Sig \$releasever
baseurl=https://autosd.sig.centos.org/AutoSD-9/nightly/repos/AutoSD/compose/AutoSD/\$basearch/os
enabled=1
gpgcheck=0
EOF
fi

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

0 comments on commit 9ab6a10

Please sign in to comment.