summaryrefslogtreecommitdiff
path: root/.ci/undo-delangification.sh
diff options
context:
space:
mode:
Diffstat (limited to '.ci/undo-delangification.sh')
-rwxr-xr-x.ci/undo-delangification.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/.ci/undo-delangification.sh b/.ci/undo-delangification.sh
new file mode 100755
index 0000000..cd3844b
--- /dev/null
+++ b/.ci/undo-delangification.sh
@@ -0,0 +1,26 @@
+#!/bin/sh -x
+
+GLIB2_VER=`rpm -q glib2`
+GLIBC_VER=`rpm -q glibc`
+
+# Undo delangification present in the Fedora Docker images
+rm -f /etc/rpm/macros.image-language-conf
+
+dnf install -y $@
+
+# Only reinstall glibc and glib2 if they weren't updated
+RPMS=""
+if [ "$GLIB2_VER" == "`rpm -q glib2`" ] ; then
+ RPMS="glib2"
+fi
+if [ "$GLIBC_VER" == "`rpm -q glibc`" ] ; then
+ if [ -z "$RPMS" ] ; then
+ RPMS="glibc"
+ else
+ RPMS="$RPMS glibc"
+ fi
+fi
+
+if [ ! -z "$RPMS" ] ; then
+ dnf reinstall -y $RPMS
+fi