install.py wrapper for xattrs, bug #465000
install.py: Python 2.6 and 3.1 optparse compat
install.py: add note about parse_known_args
Normalize EPREFIX more.
install.py: use surrogateescape for Python >=3.2

We can't trust that the filesystem encoding (locale dependent)
correctly matches the arguments, so use surrogateescape to
pass through the original argv bytes for Python 3.
Since Python <3.2 does not support bytes in Popen args, trust
the locale in that case.
install.py: add bash wrapper for python script

The wrapper is needed in order to support the PORTAGE_PYTHON variable,
and also safe python imports (see bug #469338).
FEATURES=xattr: wrap install binary, bug #465000

The install wrapper is added to PATH only when FEATURES=xattr is
enabled, and the wrapper respects PORTAGE_XATTR_EXCLUDE.
emerge-delta-webrsync: check full snapshot sig

This patch merges a lot of code from emerge-webrsync, so that the same
code is used when it's necessary to download a full snapshot and check
the signature. This will fix bug #286373.
emerge-delta-webrsync: clean TMPDIR more
emerge-webrsync: fetch_file rm absolute path
find_binary: return bytes when input is bytes
Python 3.1: pass bytes to Popen

For Python 3.1, it's possible to pass bytes to Popen as long as the
executable has an absolute path, since otherwise we would trigger a
TypeError in os._execvp (see http://bugs.python.org/issue8513).

Note that Python <=3.1.3 produces the following message:

  TypeError: expected an object with the buffer interface

Later 3.1.x releases produce a different message:

  TypeError: startswith first arg must be bytes or a tuple of bytes, not str

The difference in messages is due to os.path.join() implementation
changes, but both errors are triggered by the same underlying bug in
os._execvp() which was fixed by using fsencode() in this hunk:

--- a/Lib/os.py
+++ b/Lib/os.py
@@ -355,7 +355,11 @@ def _execvpe(file, args, env=None):
         return
     last_exc = saved_exc = None
     saved_tb = None
-    for dir in get_exec_path(env):
+    path_list = get_exec_path(env)
+    if name != 'nt':
+        file = fsencode(file)
+        path_list = map(fsencode, path_list)
+    for dir in path_list:
         fullname = path.join(dir, file)
Use /proc/<pid>/fd for solaris compat, bug 474536
getconfig: convert source IOError to ParseError