From: Zac Medico Date: Fri, 21 Nov 2008 23:21:51 +0000 (-0000) Subject: Bug #247776 - Show a warning message if CONFIG_PROTECT is empty. (trunk r12022) X-Git-Tag: v2.1.6_rc1~25 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f1c99a9a19f4a14b811a4036483343ec0d5834ae;p=portage.git Bug #247776 - Show a warning message if CONFIG_PROTECT is empty. (trunk r12022) svn path=/main/branches/2.1.6/; revision=12023 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index ff4e279ca..e8bcd7cd0 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -13425,6 +13425,14 @@ def repo_name_check(trees): return bool(missing_repo_names) +def config_protect_check(trees): + for root, root_trees in trees.iteritems(): + if not root_trees["root_config"].settings.get("CONFIG_PROTECT"): + msg = "!!! CONFIG_PROTECT is empty" + if root != "/": + msg += " for '%s'" % root + writemsg_level(msg, level=logging.WARN, noiselevel=-1) + def ambiguous_package_name(arg, atoms, root_config, spinner, myopts): if "--quiet" in myopts: @@ -13508,6 +13516,7 @@ def emerge_main(): if "--quiet" not in myopts: portage.deprecated_profile_check() repo_name_check(trees) + config_protect_check(trees) eclasses_overridden = {} for mytrees in trees.itervalues():