[jhbuild] systeminstall: Also support sudo
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] systeminstall: Also support sudo
- Date: Thu, 29 Sep 2011 14:45:54 +0000 (UTC)
commit 5faf6467fbcb31fcbc7696ec85ca55a9f8fa9114
Author: Colin Walters <walters verbum org>
Date: Thu Sep 29 10:44:55 2011 -0400
systeminstall: Also support sudo
jhbuild/utils/systeminstall.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/utils/systeminstall.py b/jhbuild/utils/systeminstall.py
index 860c73a..93d0581 100644
--- a/jhbuild/utils/systeminstall.py
+++ b/jhbuild/utils/systeminstall.py
@@ -51,9 +51,12 @@ def get_installed_pkgconfigs(config):
class SystemInstall(object):
def __init__(self):
- if not cmds.has_command('pkexec'):
+ if cmds.has_command('pkexec'):
+ self._root_command_prefix_args = ['pkexec']
+ elif cmds.has_command('sudo'):
+ self._root_command_prefix_args = ['sudo']
+ else:
raise SystemExit, _('No suitable root privilege command found; you should install "pkexec"')
- self._root_command_prefix_args = ['pkexec']
def install(self, pkgconfig_ids):
"""Takes a list of pkg-config identifiers and uses a system-specific method to install them."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]