public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Adam Williamson <adamwill@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/kbd] rawhide: Fix xkb conversion to include layouts with no variants
Date: Fri, 02 Oct 2026 16:26:10 GMT [thread overview]
Message-ID: <179095837069.1.6706875383841460246.rpms-kbd-96561b4e4d90@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/kbd
Branch : rawhide
Commit : 96561b4e4d90798cc4240cdf4ab3cd5222fc2f80
Author : Adam Williamson <adamwill@fedoraproject.org>
Date : 2026-09-30T13:04:37-07:00
Stats : +10/-3 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/kbd/c/96561b4e4d90798cc4240cdf4ab3cd5222fc2f80?branch=rawhide
Log:
Fix xkb conversion to include layouts with no variants
This fixes the xkb -> kbd conversion to also include and convert
layouts that have no variants. This was initially noticed for au
in https://bugzilla.redhat.com/show_bug.cgi?id=2543051 , but it
also affects several other layouts.
---
diff --git a/kbd.spec b/kbd.spec
index 45ee558..9a232c9 100644
--- a/kbd.spec
+++ b/kbd.spec
@@ -143,6 +143,8 @@ perl xml2lst.pl < /usr/share/X11/xkb/rules/base.xml > layouts-variants.lst
while read line; do
XKBLAYOUT=`echo "$line" | cut -d " " -f 1`
echo "$XKBLAYOUT" >> layouts-list.lst
+ # skip to next iteration if line has no space, i.e. no variant
+ [[ $line == *" "* ]] || continue
XKBVARIANT=`echo "$line" | cut -d " " -f 2`
ckbcomp -rules base "$XKBLAYOUT" "$XKBVARIANT" | gzip > $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/"$XKBLAYOUT"-"$XKBVARIANT".map.gz
done < layouts-variants.lst
diff --git a/xml2lst.pl b/xml2lst.pl
index 96cf01e..52e40e7 100644
--- a/xml2lst.pl
+++ b/xml2lst.pl
@@ -20,9 +20,14 @@ parse('', $doc);
for $i (@layouts) {
($name) = node_by_name($i, 'name');
@variants = node_by_name($i, '../variantList/variant/configItem');
- for $v (@variants) {
- ($variant) = node_by_name($v, 'name');
- printf("%s %s\n", text_child($name), text_child($variant));
+ if (@variants) {
+ for $v (@variants) {
+ ($variant) = node_by_name($v, 'name');
+ printf("%s %s\n", text_child($name), text_child($variant));
+ }
+ }
+ else {
+ printf("%s\n", text_child($name));
}
}
reply other threads:[~2026-10-02 16:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179095837069.1.6706875383841460246.rpms-kbd-96561b4e4d90@fedoraproject.org \
--to=adamwill@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox