summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-07 12:39:52 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-07 12:39:52 +0000
commit58b56a401ebd833ce4418dffdf8167251355e843 (patch)
treee9eea70bbf0302e5299eba1091573979188b5304
parent895bbe44b3d6543904ad7badecac0bf18c6650ad (diff)
downloadportage-58b56a401ebd833ce4418dffdf8167251355e843.tar.gz
portage-58b56a401ebd833ce4418dffdf8167251355e843.tar.bz2
portage-58b56a401ebd833ce4418dffdf8167251355e843.zip
If lchown is unavailable for some unexpected reason, make all lchown calls print a warning message (bug #135398).
svn path=/main/trunk/; revision=3466
-rw-r--r--pym/portage_data.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/pym/portage_data.py b/pym/portage_data.py
index 760ab3ea2..bd556b519 100644
--- a/pym/portage_data.py
+++ b/pym/portage_data.py
@@ -31,11 +31,14 @@ if not lchown:
# Included in python-2.3
lchown = os.lchown
else:
- import missingos
- lchown = missingos.lchown
+ try:
+ import missingos
+ lchown = missingos.lchown
+ except ImportError:
+ def lchown(*pos_args, **key_args):
+ writemsg(red("!!!") + " It seems that os.lchown does not" + \
+ " exist. Please rebuild python.\n", noiselevel=-1)
-
-
os.environ["USERLAND"]=userland
# Portage has 3 security levels that depend on the uid and gid of the main