public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/kbd] rawhide: Fix xkb conversion to include layouts with no variants
@ 2026-10-02 16:26 Adam Williamson
0 siblings, 0 replies; only message in thread
From: Adam Williamson @ 2026-10-02 16:26 UTC (permalink / raw)
To: git-commits
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));
}
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-02 16:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-02 16:26 [rpms/kbd] rawhide: Fix xkb conversion to include layouts with no variants Adam Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox