summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bin/fixpackages')
-rwxr-xr-xbin/fixpackages11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/fixpackages b/bin/fixpackages
index 22f90dd2..37cdf282 100755
--- a/bin/fixpackages
+++ b/bin/fixpackages
@@ -15,11 +15,22 @@ except ImportError:
import portage
from portage import os
+from portage.output import EOutput
+from textwrap import wrap
from portage._global_updates import _global_updates
mysettings = portage.settings
mytrees = portage.db
mtimedb = portage.mtimedb
+if mysettings['ROOT'] != "/":
+ out = EOutput()
+ msg = "The fixpackages program is not intended for use with " + \
+ "ROOT != \"/\". Instead use `emaint --fix movebin` and/or " + \
+ "`emaint --fix moveinst."
+ for line in wrap(msg, 72):
+ out.eerror(line)
+ sys.exit(1)
+
try:
os.nice(int(mysettings.get("PORTAGE_NICENESS", "0")))
except (OSError, ValueError) as e: