teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0038-test-fix-keymaps-installation-on-Arch.patch

ac3a84
From bec9d65390249d4e88f5095e751283645a2a4c08 Mon Sep 17 00:00:00 2001
ac3a84
From: Frantisek Sumsal <frantisek@sumsal.cz>
ac3a84
Date: Mon, 7 Nov 2022 12:07:27 +0100
ac3a84
Subject: [PATCH] test: fix keymaps installation on Arch
ac3a84
ac3a84
Where the keymaps live under /usr/share/kbd/keymaps/.
ac3a84
ac3a84
(cherry picked from commit 1edad89399e7cbee230878589ac618103c157ec7)
ac3a84
ac3a84
Related #2138081
ac3a84
---
ac3a84
 test/test-functions | 25 +++++++++++++------------
ac3a84
 1 file changed, 13 insertions(+), 12 deletions(-)
ac3a84
ac3a84
diff --git a/test/test-functions b/test/test-functions
ac3a84
index 45ca472916..194cd682bb 100644
ac3a84
--- a/test/test-functions
ac3a84
+++ b/test/test-functions
ac3a84
@@ -2007,7 +2007,8 @@ install_locales() {
ac3a84
 install_keymaps() {
ac3a84
     local i p
ac3a84
     local -a prefix=(
ac3a84
-        "/usr"
ac3a84
+        "/usr/lib"
ac3a84
+        "/usr/share"
ac3a84
     )
ac3a84
 
ac3a84
     dinfo "Install console keymaps"
ac3a84
@@ -2016,7 +2017,7 @@ install_keymaps() {
ac3a84
             && [[ "$(meson configure "${BUILD_DIR:?}" | grep 'split-usr' | awk '{ print $2 }')" == "true" ]] \
ac3a84
             || [[ ! -L /lib ]]; then
ac3a84
         prefix+=(
ac3a84
-            ""
ac3a84
+            "/lib"
ac3a84
         )
ac3a84
     fi
ac3a84
 
ac3a84
@@ -2025,12 +2026,12 @@ install_keymaps() {
ac3a84
             # The first three paths may be deprecated.
ac3a84
             # It seems now the last three paths are used by many distributions.
ac3a84
             for i in \
ac3a84
-                "$p"/lib/kbd/keymaps/include/* \
ac3a84
-                "$p"/lib/kbd/keymaps/i386/include/* \
ac3a84
-                "$p"/lib/kbd/keymaps/i386/qwerty/us.* \
ac3a84
-                "$p"/lib/kbd/keymaps/legacy/include/* \
ac3a84
-                "$p"/lib/kbd/keymaps/legacy/i386/qwerty/us.* \
ac3a84
-                "$p"/lib/kbd/keymaps/xkb/us*; do
ac3a84
+                "$p"/kbd/keymaps/include/* \
ac3a84
+                "$p"/kbd/keymaps/i386/include/* \
ac3a84
+                "$p"/kbd/keymaps/i386/qwerty/us.* \
ac3a84
+                "$p"/kbd/keymaps/legacy/include/* \
ac3a84
+                "$p"/kbd/keymaps/legacy/i386/qwerty/us.* \
ac3a84
+                "$p"/kbd/keymaps/xkb/us*; do
ac3a84
                     [[ -f "$i" ]] || continue
ac3a84
                     inst "$i"
ac3a84
             done
ac3a84
@@ -2039,10 +2040,10 @@ install_keymaps() {
ac3a84
         # When it takes any argument, then install more keymaps.
ac3a84
         for p in "${prefix[@]}"; do
ac3a84
             for i in \
ac3a84
-                "$p"/lib/kbd/keymaps/include/* \
ac3a84
-                "$p"/lib/kbd/keymaps/i386/*/* \
ac3a84
-                "$p"/lib/kbd/keymaps/legacy/i386/*/* \
ac3a84
-                "$p"/lib/kbd/keymaps/xkb/*; do
ac3a84
+                "$p"/kbd/keymaps/include/* \
ac3a84
+                "$p"/kbd/keymaps/i386/*/* \
ac3a84
+                "$p"/kbd/keymaps/legacy/i386/*/* \
ac3a84
+                "$p"/kbd/keymaps/xkb/*; do
ac3a84
                     [[ -f "$i" ]] || continue
ac3a84
                     inst "$i"
ac3a84
             done