# Path: pyanaconda/iutil.py
# def augmentEnv():
# def _run_program(argv, root='/', stdin=None, stdout=None, env_prune=None):
#     def chroot():
# def execWithRedirect(command, argv, stdin=None, stdout=None,
#                      root='/', env_prune=None):
# def execWithCapture(command, argv, stdin=None, root='/'):
# def execReadlines(command, argv, stdin=None, root='/', env_prune=None):
#     def queue_lines(out, queue):
#     def chroot():
# def execConsole():
# def getDirSize(directory):
#     def getSubdirSize(directory):
# def mkdirChain(directory):
# def get_active_console(dev="console"):
# def isConsoleOnVirtualTerminal(dev="console"):
# def strip_markup(text):
# def reIPL(ipldev):
# def resetRpmDb():
# def parseNfsUrl(nfsurl):
# def add_po_path(module, directory):
# def setup_translations(module):
# def fork_orphan():
# def _run_systemctl(command, service):
# def start_service(service):
# def stop_service(service):
# def restart_service(service):
# def service_running(service):
# def dracut_eject(device):
# def vtActivate(num):
#     def __init__(self, url=None, protocol="http://", host=None, port="3128",
#                  username=None, password=None):
#     def parse_url(self):
#     def parse_components(self):
#     def dict(self):
#     def __str__(self):
# def getdeepattr(obj, name):
# def setdeepattr(obj, name, value):
# def strip_accents(s):
# def cmp_obj_attrs(obj1, obj2, attr_list):
# def dir_tree_map(root, func, files=True, dirs=True):
# def chown_dir_tree(root, uid, gid, from_uid_only=None, from_gid_only=None):
#     def conditional_chown(path, uid, gid, from_uid=None, from_gid=None):
# def is_unsupported_hw():
# def _toASCII(s):
# def upperASCII(s):
# def lowerASCII(s):
# def upcase_first_letter(text):
# class ProxyStringError(Exception):
# class ProxyString(object):
# 
# Path: pyanaconda/flags.py
# class Flags(object):
# class BootArgs(OrderedDict):
#     def __setattr__(self, attr, val):
#     def get(self, attr, val=None):
#     def set_cmdline_bool(self, flag):
#     def __init__(self, read_cmdline=True):
#     def read_cmdline(self):
#     def __init__(self, cmdline=None, files=None):
#     def read(self, filenames):
#     def readstr(self, cmdline):
#     def getbool(self, arg, default=False):
# def can_touch_runtime_system(msg, touch_live=False):
# 
# Path: pyanaconda/constants.py
# DEFAULT_VC_FONT = "latarcyrheb-sun16"
# 
# DEFAULT_KEYBOARD = "us"
# 
# THREAD_XKL_WRAPPER_INIT = "AnaXklWrapperInitThread"
# 
# Path: pyanaconda/threads.py
# class ThreadManager(object):
# class AnacondaThread(threading.Thread):
#     def __init__(self):
#     def __call__(self):
#     def add(self, obj):
#     def remove(self, name):
#     def exists(self, name):
#     def get(self, name):
#     def wait(self, name):
#     def wait_all(self):
#     def set_error(self, name, *exc_info):
#     def get_error(self, name):
#     def any_errors(self):
#     def raise_error(self, name):
#     def in_main_thread(self):
#     def running(self):
#     def names(self):
#     def __init__(self, *args, **kwargs):
#     def run(self, *args, **kwargs):
# def initThreading():


import types
import os
import re
import shutil
import ctypes
import gettext
import threading
import logging
from collections import namedtuple
from pyanaconda import iutil
from pyanaconda import flags
from pyanaconda.safe_dbus import dbus_call_safe_sync, dbus_get_property_safe_sync
from pyanaconda.safe_dbus import DBUS_SYSTEM_BUS_ADDR, DBusPropertyError
from pyanaconda.constants import DEFAULT_VC_FONT, DEFAULT_KEYBOARD, THREAD_XKL_WRAPPER_INIT
from pyanaconda.threads import threadMgr, AnacondaThread
from gi.repository import Xkl, Gio, GLib
        from gi.repository import GdkX11

            # make sure the right directory exists under the given root
            rooted_xconf_dir = os.path.normpath(root + "/" + xconf_dir)
            try:
                if not os.path.isdir(rooted_xconf_dir):
                    os.makedirs(rooted_xconf_dir)
            except OSError:
                errors.append("Cannot create directory xorg.conf.d")

            # copy the file to the chroot
            try:
                shutil.copy2(xconf_file_path,
                             os.path.normpath(root + "/" + xconf_file_path))
            except IOError:
                # The file may not exist (eg. text install) so don't raise
                pass

            # restore the original values
            localed_wrapper.set_layouts(layouts_variants,
                                        options)
        else:
            try:
                # just let systemd-localed write out the conf file
                localed_wrapper.set_layouts(keyboard.x_layouts,
                                            keyboard.switch_options)
            except InvalidLayoutVariantSpec as ilvs:
                # some weird value appeared as a requested X layout
                log.error("Failed to write out config file: %s", ilvs)

                # try default

# Path: pyanaconda/iutil.py
# def augmentEnv():
# def _run_program(argv, root='/', stdin=None, stdout=None, env_prune=None):
#     def chroot():
# def execWithRedirect(command, argv, stdin=None, stdout=None,
#                      root='/', env_prune=None):
# def execWithCapture(command, argv, stdin=None, root='/'):
# def execReadlines(command, argv, stdin=None, root='/', env_prune=None):
#     def queue_lines(out, queue):
#     def chroot():
# def execConsole():
# def getDirSize(directory):
#     def getSubdirSize(directory):
# def mkdirChain(directory):
# def get_active_console(dev="console"):
# def isConsoleOnVirtualTerminal(dev="console"):
# def strip_markup(text):
# def reIPL(ipldev):
# def resetRpmDb():
# def parseNfsUrl(nfsurl):
# def add_po_path(module, directory):
# def setup_translations(module):
# def fork_orphan():
# def _run_systemctl(command, service):
# def start_service(service):
# def stop_service(service):
# def restart_service(service):
# def service_running(service):
# def dracut_eject(device):
# def vtActivate(num):
#     def __init__(self, url=None, protocol="http://", host=None, port="3128",
#                  username=None, password=None):
#     def parse_url(self):
#     def parse_components(self):
#     def dict(self):
#     def __str__(self):
# def getdeepattr(obj, name):
# def setdeepattr(obj, name, value):
# def strip_accents(s):
# def cmp_obj_attrs(obj1, obj2, attr_list):
# def dir_tree_map(root, func, files=True, dirs=True):
# def chown_dir_tree(root, uid, gid, from_uid_only=None, from_gid_only=None):
#     def conditional_chown(path, uid, gid, from_uid=None, from_gid=None):
# def is_unsupported_hw():
# def _toASCII(s):
# def upperASCII(s):
# def lowerASCII(s):
# def upcase_first_letter(text):
# class ProxyStringError(Exception):
# class ProxyString(object):
# 
# Path: pyanaconda/flags.py
# class Flags(object):
# class BootArgs(OrderedDict):
#     def __setattr__(self, attr, val):
#     def get(self, attr, val=None):
#     def set_cmdline_bool(self, flag):
#     def __init__(self, read_cmdline=True):
#     def read_cmdline(self):
#     def __init__(self, cmdline=None, files=None):
#     def read(self, filenames):
#     def readstr(self, cmdline):
#     def getbool(self, arg, default=False):
# def can_touch_runtime_system(msg, touch_live=False):
# 
# Path: pyanaconda/constants.py
# DEFAULT_VC_FONT = "latarcyrheb-sun16"
# 
# DEFAULT_KEYBOARD = "us"
# 
# THREAD_XKL_WRAPPER_INIT = "AnaXklWrapperInitThread"
# 
# Path: pyanaconda/threads.py
# class ThreadManager(object):
# class AnacondaThread(threading.Thread):
#     def __init__(self):
#     def __call__(self):
#     def add(self, obj):
#     def remove(self, name):
#     def exists(self, name):
#     def get(self, name):
#     def wait(self, name):
#     def wait_all(self):
#     def set_error(self, name, *exc_info):
#     def get_error(self, name):
#     def any_errors(self):
#     def raise_error(self, name):
#     def in_main_thread(self):
#     def running(self):
#     def names(self):
#     def __init__(self, *args, **kwargs):
#     def run(self, *args, **kwargs):
# def initThreading():


# Path: pyanaconda/keyboard.py
import types
import os
import re
import shutil
import ctypes
import gettext
import threading
import logging
from collections import namedtuple
from pyanaconda import iutil
from pyanaconda import flags
from pyanaconda.safe_dbus import dbus_call_safe_sync, dbus_get_property_safe_sync
from pyanaconda.safe_dbus import DBUS_SYSTEM_BUS_ADDR, DBusPropertyError
from pyanaconda.constants import DEFAULT_VC_FONT, DEFAULT_KEYBOARD, THREAD_XKL_WRAPPER_INIT
from pyanaconda.threads import threadMgr, AnacondaThread
from gi.repository import Xkl, Gio, GLib
        from gi.repository import GdkX11


            # make sure the right directory exists under the given root
            rooted_xconf_dir = os.path.normpath(root + "/" + xconf_dir)
            try:
                if not os.path.isdir(rooted_xconf_dir):
                    os.makedirs(rooted_xconf_dir)
            except OSError:
                errors.append("Cannot create directory xorg.conf.d")

            # copy the file to the chroot
            try:
                shutil.copy2(xconf_file_path,
                             os.path.normpath(root + "/" + xconf_file_path))
            except IOError:
                # The file may not exist (eg. text install) so don't raise
                pass

            # restore the original values
            localed_wrapper.set_layouts(layouts_variants,
                                        options)
        else:
            try:
                # just let systemd-localed write out the conf file
                localed_wrapper.set_layouts(keyboard.x_layouts,
                                            keyboard.switch_options)
            except InvalidLayoutVariantSpec as ilvs:
                # some weird value appeared as a requested X layout
                log.error("Failed to write out config file: %s", ilvs)

                # try default

                keyboard.x_layouts = [DEFAULT_KEYBOARD]