[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1125300: xkb-data: upgrade of xkb-data from 2.42 to 2.46 fails when user config present



Package: xkb-data
Version: 2.46-2
Severity: normal
X-Debbugs-Cc: farblos@vodafonemail.de, kibi@debian.org, josch@debian.org

I run Xorg/X11 on Debian testing.  AFAIK, the only way to modify or add
keyboard layouts with XKB in that configuration is to modify or add
files below `/usr/share/X11/xkb'.  At least that is what you get when
you search for "xorg configure keyboard layout" on the web.

However, the upgrade of xkb-data from 2.42.* to 2.46.* breaks in the
presence of extra files below `/usr/share/X11/xkb', at least when
executed from `unattended-upgrade':

,----
| Log started: 2026-01-09  11:13:50
| (Reading database ... 102524 files and directories currently installed.)
| Preparing to unpack .../console-setup-linux_1.245_all.deb ...
| Unpacking console-setup-linux (1.245) over (1.244) ...
| Preparing to unpack .../console-setup_1.245_all.deb ...
| Unpacking console-setup (1.245) over (1.244) ...
| Preparing to unpack .../keyboard-configuration_1.245_all.deb ...
| Unpacking keyboard-configuration (1.245) over (1.244) ...
| Preparing to unpack .../xkb-data_2.46-2_all.deb ...
| dpkg-maintscript-helper: error: file '/usr/share/X11/xkb/symbols/jens' not owned by package 'xkb-data:all'
| dpkg-maintscript-helper: error: file '/usr/share/X11/xkb/rules/evdev.xml.orig' not owned by package 'xkb-data:all'
| dpkg-maintscript-helper: error: directory '/usr/share/X11/xkb' contains files not owned by package xkb-data:all, cannot switch to symlink
| dpkg: error processing archive /var/cache/apt/archives/xkb-data_2.46-2_all.deb (--unpack):
|  new xkb-data package pre-installation script subprocess returned error exit status 1
| Errors were encountered while processing:
|  /var/cache/apt/archives/xkb-data_2.46-2_all.deb
| Log ended: 2026-01-09  11:13:55
`----

(See also Debian bug #1122650 for details, where tg@debian.org
has mentioned that fact already without - IMO - stressing it
enough.)

So probably instead of just bailing out when `dpkg-maintscript-helper'
reports in issue, how about renaming the directory tree during preinst
to make place for the symlink?  Like this (completely untested):

,----
| dpkg-maintscript-helper dir_to_symlink /usr/share/X11/xkb /usr/share/xkeyboard-config-2 2.46-2\~ -- "$@" ||
| {
|   mv /usr/share/X11/xkb /usr/share/X11/xkb.dpkg-old &&
|   dpkg-maintscript-helper dir_to_symlink /usr/share/X11/xkb /usr/share/xkeyboard-config-2 2.46-2\~ -- "$@"
| }
`----

That would leave the conf files around for a user to move them to the
new location when she notices that her nice layout does not work as
expected.

Otherwise, if you decide to keep the current behavior, I guess at least
a warning in the release notes would be in order, since I expect to
break future upgrades from trixie to forky in the presence of user
configuration below `/usr/share/X11/xkb'.

-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.17.13+deb14-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information


Reply to: