Blob Blame History Raw
From bec9d65390249d4e88f5095e751283645a2a4c08 Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
Date: Mon, 7 Nov 2022 12:07:27 +0100
Subject: [PATCH] test: fix keymaps installation on Arch

Where the keymaps live under /usr/share/kbd/keymaps/.

(cherry picked from commit 1edad89399e7cbee230878589ac618103c157ec7)

Related #2138081
---
 test/test-functions | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/test/test-functions b/test/test-functions
index 45ca472916..194cd682bb 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -2007,7 +2007,8 @@ install_locales() {
 install_keymaps() {
     local i p
     local -a prefix=(
-        "/usr"
+        "/usr/lib"
+        "/usr/share"
     )
 
     dinfo "Install console keymaps"
@@ -2016,7 +2017,7 @@ install_keymaps() {
             && [[ "$(meson configure "${BUILD_DIR:?}" | grep 'split-usr' | awk '{ print $2 }')" == "true" ]] \
             || [[ ! -L /lib ]]; then
         prefix+=(
-            ""
+            "/lib"
         )
     fi
 
@@ -2025,12 +2026,12 @@ install_keymaps() {
             # The first three paths may be deprecated.
             # It seems now the last three paths are used by many distributions.
             for i in \
-                "$p"/lib/kbd/keymaps/include/* \
-                "$p"/lib/kbd/keymaps/i386/include/* \
-                "$p"/lib/kbd/keymaps/i386/qwerty/us.* \
-                "$p"/lib/kbd/keymaps/legacy/include/* \
-                "$p"/lib/kbd/keymaps/legacy/i386/qwerty/us.* \
-                "$p"/lib/kbd/keymaps/xkb/us*; do
+                "$p"/kbd/keymaps/include/* \
+                "$p"/kbd/keymaps/i386/include/* \
+                "$p"/kbd/keymaps/i386/qwerty/us.* \
+                "$p"/kbd/keymaps/legacy/include/* \
+                "$p"/kbd/keymaps/legacy/i386/qwerty/us.* \
+                "$p"/kbd/keymaps/xkb/us*; do
                     [[ -f "$i" ]] || continue
                     inst "$i"
             done
@@ -2039,10 +2040,10 @@ install_keymaps() {
         # When it takes any argument, then install more keymaps.
         for p in "${prefix[@]}"; do
             for i in \
-                "$p"/lib/kbd/keymaps/include/* \
-                "$p"/lib/kbd/keymaps/i386/*/* \
-                "$p"/lib/kbd/keymaps/legacy/i386/*/* \
-                "$p"/lib/kbd/keymaps/xkb/*; do
+                "$p"/kbd/keymaps/include/* \
+                "$p"/kbd/keymaps/i386/*/* \
+                "$p"/kbd/keymaps/legacy/i386/*/* \
+                "$p"/kbd/keymaps/xkb/*; do
                     [[ -f "$i" ]] || continue
                     inst "$i"
             done