Appropriately use globals() instead of locals() as suggested by marienz.
Revert fowners/fperms hack, as it was almost as broken as SpankMan's
commit.
svn path=/main/branches/prefix/; revision=6248
# Distributed under the terms of the GNU General Public License v2
# $Id$
-# We want all paths to be in ${ED}, whether or not relative. The first
-# argument should be the mode, according to the man-page. It cannot
-# come after the first argument. That's cool for us.
-mode=$1 ; shift
-exec chown "${mode}" "${@/#/${ED}/}"
+# we can't prefix all arguments because
+# chown takes random options
+slash="/"
+exec chown "${@/#${slash}/${ED}${slash}}"
# Distributed under the terms of the GNU General Public License v2
# $Id$
-# We want all paths to be in ${ED}, whether or not relative. The first
-# argument should be the mode, according to the man-page. It cannot
-# come after the first argument. That's cool for us.
-mode=$1 ; shift
-exec chmod "${mode}" "${@/#/${ED}/}"
+# we can't prefix all arguments because
+# chmod takes random options
+slash="/"
+exec chmod "${@/#${slash}/${ED}${slash}}"
return derived_func
for c in compat_functions_colors:
- locals()[c] = create_color_func(c)
+ globals()[c] = create_color_func(c)
class EOutput:
"""
bin.startswith("new") or \
bin.startswith("prep") or \
bin in ["ecompress","ecompressdir","fowners","fperms"]:
- locals()[bin] = create_portage_wrapper(bin)
+ globals()[bin] = create_portage_wrapper(bin)