From 5f64abe231eaa295540a14d0274040ddf49a1fa1 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sat, 19 May 2012 18:00:57 +0200 Subject: [PATCH] [equo] be more explicit when running with forced "--pretend" when not root Fixes bug 2882 --- client/text_ui.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/client/text_ui.py b/client/text_ui.py index c4e90c3e6..a99507dff 100644 --- a/client/text_ui.py +++ b/client/text_ui.py @@ -401,7 +401,9 @@ def upgrade_packages(entropy_client, onlyfetch = False, replay = False, # check if I am root if not entropy.tools.is_root(): - mytxt = "%s %s %s" % (_("Running with"), bold("--pretend"), red("..."),) + mytxt = "%s %s %s" % ( + purple(_("Running with")), bold("--pretend"), + purple(_("because you are not root")),) print_warning(mytxt) etpUi['pretend'] = True etpUi['ask'] = False @@ -1028,7 +1030,8 @@ def _download_sources(entropy_client, packages = None, deps = True, # check if I am root if not entropy.tools.is_root(): mytxt = "%s %s %s" % ( - _("Running with"), bold("--pretend"), red("..."),) + purple(_("Running with")), bold("--pretend"), + purple(_("because you are not root")),) print_warning(mytxt) etpUi['pretend'] = True etpUi['ask'] = False @@ -1178,7 +1181,9 @@ def _download_packages(entropy_client, packages = None, deps = True, # check if I am root if not entropy.tools.is_root(): - mytxt = "%s %s %s" % (_("Running with"), bold("--pretend"), red("..."),) + mytxt = "%s %s %s" % ( + purple(_("Running with")), bold("--pretend"), + purple(_("because you are not root")),) print_warning(mytxt) etpUi['pretend'] = True etpUi['ask'] = False @@ -1256,7 +1261,9 @@ def install_packages(entropy_client, # check if I am root if not entropy.tools.is_root(): - mytxt = "%s %s %s" % (_("Running with"), bold("--pretend"), red("..."),) + mytxt = "%s %s %s" % ( + purple(_("Running with")), bold("--pretend"), + purple(_("because you are not root")),) print_warning(mytxt) etpUi['pretend'] = True etpUi['ask'] = False @@ -1771,7 +1778,9 @@ def _mask_unmask_packages(entropy_client, packages, action): # check if I am root if not entropy.tools.is_root(): - mytxt = "%s %s %s" % (_("Running with"), bold("--pretend"), red("..."),) + mytxt = "%s %s %s" % ( + purple(_("Running with")), bold("--pretend"), + purple(_("because you are not root")),) print_warning(mytxt) etpUi['pretend'] = True etpUi['ask'] = False @@ -1860,7 +1869,9 @@ def _configure_packages(entropy_client, packages): # check if I am root if not entropy.tools.is_root(): - mytxt = "%s %s %s" % (_("Running with"), bold("--pretend"), red("..."),) + mytxt = "%s %s %s" % ( + purple(_("Running with")), bold("--pretend"), + purple(_("because you are not root")),) print_warning(mytxt) etpUi['pretend'] = True etpUi['ask'] = False @@ -1948,7 +1959,9 @@ def remove_packages(entropy_client, packages = None, atomsdata = None, atomsdata = [] if not entropy.tools.is_root(): - mytxt = "%s %s %s" % (_("Running with"), bold("--pretend"), red("..."),) + mytxt = "%s %s %s" % ( + purple(_("Running with")), bold("--pretend"), + purple(_("because you are not root")),) print_warning(mytxt) etpUi['pretend'] = True etpUi['ask'] = False