diff options
-rwxr-xr-x | commands/check-system | 12 | ||||
-rw-r--r-- | devbot/system.py | 22 |
2 files changed, 12 insertions, 22 deletions
diff --git a/commands/check-system b/commands/check-system index ac0b9d3..0b77180 100755 --- a/commands/check-system +++ b/commands/check-system @@ -17,4 +17,16 @@ parser.add_argument("--test", action="store_true", help="don't add or remove packages, test only") args = parser.parse_args() +def apply_ubuntu_tweaks(): + wrapper_config = open("/etc/X11/Xwrapper.config").read() + if "allowed_users=anybody" not in wrapper_config: + print "\nWe are going to allow anybody to run the X server" + + ubuntu_tweaks = os.path.join(config.commands_dir, + "helpers", "ubuntu-tweaks") + + command.run_with_sudo([ubuntu_tweaks]) + +apply_ubuntu_tweaks() + system.check(update=args.update, remove=args.remove, test=args.test) diff --git a/devbot/system.py b/devbot/system.py index 633b36b..cff7432 100644 --- a/devbot/system.py +++ b/devbot/system.py @@ -120,27 +120,6 @@ def stop_xvfb(xvfb_proc, orig_display): xvfb_proc.terminate() -def apply_ubuntu_tweaks(): - # FIXME we don't want the package to depend on external scripts - devbot_dir = os.path.abspath(os.path.dirname(__file__)) - scripts_dir = os.path.join(os.path.dirname(devbot_dir), "scripts") - - wrapper_config = open("/etc/X11/Xwrapper.config").read() - if "allowed_users=anybody" not in wrapper_config: - if "SUGAR_BUILDBOT" in os.environ: - print "\nPlease allow anybody to run the X server with \n" \ - " sudo dpkg-reconfigure x11-common" - else: - print "\nWe are going to allow anybody to run the X server" - ubuntu_tweaks = os.path.join(config.commands_dir, - "helpers", - "ubuntu-tweaks") - command.run_with_sudo([ubuntu_tweaks]) - -def apply_distro_tweaks(distro_name): - if distro_name == "ubuntu": - apply_ubuntu_tweaks() - def warn_if_unsupported(distro_name): if distro_name == "unsupported": print "*********************************************************\n" \ @@ -195,7 +174,6 @@ def check(remove=False, update=False, test=False): run_checks(package_manager, config.load_checks(), packages) warn_if_unsupported(distro_name) - apply_distro_tweaks(distro_name) stop_xvfb(xvfb_proc, orig_display) |