diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-12-16 10:18:21 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-12-16 10:18:21 +0000 |
commit | f343fa37ac4649fa0d0373691316ced8c9c4687d (patch) | |
tree | 24c1cf5ace487f9d27064a1c96183add22cca034 | |
parent | deae2c69ad3f32c1d359ad348c84cdda2da77d64 (diff) | |
download | portage-f343fa37ac4649fa0d0373691316ced8c9c4687d.tar.gz portage-f343fa37ac4649fa0d0373691316ced8c9c4687d.tar.bz2 portage-f343fa37ac4649fa0d0373691316ced8c9c4687d.zip |
Warn if /proc is not mounted.
svn path=/main/trunk/; revision=15097
-rw-r--r-- | pym/_emerge/main.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 07a502bea..4e98ec312 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -1130,6 +1130,16 @@ def profile_check(trees, myaction): return 1 return os.EX_OK +def check_procfs(): + procfs_path = '/proc' + if platform.system() not in ("Linux",) or \ + os.path.ismount(procfs_path): + return os.EX_OK + msg = "It sees that %s is not mounted. You have been warned." % procfs_path + writemsg_level("".join("!!! %s\n" % l for l in textwrap.wrap(msg, 70)), + level=logging.ERROR, noiselevel=-1) + return 1 + def emerge_main(): global portage # NFC why this is necessary now - genone portage._disable_legacy_globals() @@ -1193,6 +1203,7 @@ def emerge_main(): repo_name_check(trees) repo_name_duplicate_check(trees) config_protect_check(trees) + check_procfs() for mytrees in trees.values(): mydb = mytrees["porttree"].dbapi |