diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-01-09 02:18:42 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-01-09 02:18:42 +0000 |
commit | 6afefabfb5f442a6844cf60664bf0516f661106d (patch) | |
tree | 627b52f407558fbf35d88bbafac646ca7f711bd7 /pym/portage/data.py | |
parent | Add some blank lines around the messages that suggest --without-mask and (diff) | |
download | portage-multirepo-6afefabfb5f442a6844cf60664bf0516f661106d.tar.gz portage-multirepo-6afefabfb5f442a6844cf60664bf0516f661106d.tar.bz2 portage-multirepo-6afefabfb5f442a6844cf60664bf0516f661106d.zip |
Bug #253563 - Replace hardcoded green/red color strings with GOOD/BAD. Thanks
to Vsevolod Kozlov <sevakda@gmail.com> for the initial patch.
svn path=/main/trunk/; revision=12401
Diffstat (limited to 'pym/portage/data.py')
-rw-r--r-- | pym/portage/data.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pym/portage/data.py b/pym/portage/data.py index 5f4d0563..a7ebd9cb 100644 --- a/pym/portage/data.py +++ b/pym/portage/data.py @@ -5,7 +5,7 @@ import os, sys, pwd, grp, platform from portage.util import writemsg -from portage.output import green,red +from portage.output import colorize from portage.output import create_color_func bad = create_color_func("BAD") @@ -28,7 +28,8 @@ if not lchown: lchown = missingos.lchown except ImportError: def lchown(*pos_args, **key_args): - writemsg(red("!!!") + " It seems that os.lchown does not" + \ + writemsg(colorize("BAD", "!!!") + \ + " It seems that os.lchown does not" + \ " exist. Please rebuild python.\n", noiselevel=-1) lchown() @@ -78,17 +79,16 @@ try: except KeyError: portage_uid=0 portage_gid=0 - writemsg("\n") - writemsg( red("portage: 'portage' user or group missing. Please update baselayout\n")) - writemsg( red(" and merge portage user(250) and group(250) into your passwd\n")) - writemsg( red(" and group files. Non-root compilation is disabled until then.\n")) - writemsg( " Also note that non-root/wheel users will need to be added to\n") - writemsg( " the portage group to do portage commands.\n") - writemsg("\n") - writemsg( " For the defaults, line 1 goes into passwd, and 2 into group.\n") - writemsg(green(" portage:x:250:250:portage:/var/tmp/portage:/bin/false\n")) - writemsg(green(" portage::250:portage\n")) - writemsg("\n") + writemsg(colorize("BAD", + "portage: 'portage' user or group missing.") + "\n", noiselevel=-1) + writemsg( + " For the defaults, line 1 goes into passwd, " + \ + "and 2 into group.\n", noiselevel=-1) + writemsg(colorize("GOOD", + " portage:x:250:250:portage:/var/tmp/portage:/bin/false") \ + + "\n", noiselevel=-1) + writemsg(colorize("GOOD", " portage::250:portage") + "\n", + noiselevel=-1) portage_group_warning() userpriv_groups = [portage_gid] |