pmb.install.setup_keymap: fix fail on X11 setup (MR 1968)
Do not fail in "pmbootstrap setup" if a keymap was selected, but no /etc/X11/xorg.conf.d path exists in the rootfs chroot. The grep output is not empty in that case (it would be empty if the directory exists and there are no matches), so we need to add this extra check: (rootfs_nokia-n900) % grep -rl XkbLayout /etc/X11/xorg.conf.d/ grep: /etc/X11/xorg.conf.d/: No such file or directory
This commit is contained in:
parent
e233b73949
commit
9718fd294a
|
@ -294,8 +294,11 @@ def setup_keymap(args):
|
|||
output="interactive")
|
||||
|
||||
# Check xorg config
|
||||
config = pmb.chroot.root(args, ["grep", "-rl", "XkbLayout", "/etc/X11/xorg.conf.d/"],
|
||||
suffix, check=False, output_return=True)
|
||||
config = None
|
||||
if os.path.exists(f"{args.work}/chroot_{suffix}/etc/X11/xorg.conf.d"):
|
||||
config = pmb.chroot.root(args, ["grep", "-rl", "XkbLayout",
|
||||
"/etc/X11/xorg.conf.d/"],
|
||||
suffix, check=False, output_return=True)
|
||||
if config:
|
||||
# Multiple files can contain the keyboard layout, take last
|
||||
config = config.splitlines()[-1]
|
||||
|
|
Loading…
Reference in New Issue