Skip to content

Update dnf installation to be compatible with microdnf #324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions packages/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ _install_rpm_key() {
rpm --verbose --import https://build.opensuse.org/projects/${OBS_PROJECT}/signing_keys/download?kind=gpg
}

_install_yum() {
_install_rpm_key

_add_yum_repo() {
cat > /etc/yum.repos.d/crystal.repo <<EOF
[crystal]
name=Crystal (${DISTRO_REPO})
Expand All @@ -223,6 +221,11 @@ gpgcheck=1
gpgkey=https://download.opensuse.org/repositories/${OBS_PROJECT//:/:\/}/${DISTRO_REPO}/repodata/repomd.xml.key
enabled=1
EOF
}

_install_yum() {
_install_rpm_key
_add_yum_repo

if [[ "$CRYSTAL_VERSION" == "latest" ]]; then
yum install -y crystal
Expand All @@ -232,8 +235,8 @@ EOF
}

_install_dnf() {
dnf install -y 'dnf-command(config-manager)'
dnf config-manager --add-repo https://download.opensuse.org/repositories/${OBS_PROJECT}/$DISTRO_REPO/${OBS_PROJECT}.repo
_install_rpm_key
_add_yum_repo

if [[ "$CRYSTAL_VERSION" == "latest" ]]; then
dnf install -y crystal
Expand Down