Skip to content

Commit b1e2331

Browse files
authored
Update dnf installation to be compatible with microdnf (#324)
1 parent 5f6fcad commit b1e2331

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

packages/scripts/install.sh

+8-5
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,7 @@ _install_rpm_key() {
215215
rpm --verbose --import https://build.opensuse.org/projects/${OBS_PROJECT}/signing_keys/download?kind=gpg
216216
}
217217

218-
_install_yum() {
219-
_install_rpm_key
220-
218+
_add_yum_repo() {
221219
cat > /etc/yum.repos.d/crystal.repo <<EOF
222220
[crystal]
223221
name=Crystal (${DISTRO_REPO})
@@ -227,6 +225,11 @@ gpgcheck=1
227225
gpgkey=https://download.opensuse.org/repositories/${OBS_PROJECT//:/:\/}/${DISTRO_REPO}/repodata/repomd.xml.key
228226
enabled=1
229227
EOF
228+
}
229+
230+
_install_yum() {
231+
_install_rpm_key
232+
_add_yum_repo
230233

231234
if [[ "$CRYSTAL_VERSION" == "latest" ]]; then
232235
yum install -y crystal
@@ -236,8 +239,8 @@ EOF
236239
}
237240

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

242245
if [[ "$CRYSTAL_VERSION" == "latest" ]]; then
243246
dnf install -y crystal

0 commit comments

Comments
 (0)