prepstrip: PORTAGE_PYTHONPATH for xattr-helper.py
authorZac Medico <zmedico@gentoo.org>
Fri, 2 Aug 2013 17:41:45 +0000 (10:41 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 2 Aug 2013 17:41:45 +0000 (10:41 -0700)
bin/ebuild-helpers/prepstrip

index 66aa734173c23d2cb64c2481eac7ca8f847461b2..9b2d47cbd9dbdc1745aa8ce170132d3408c16e35 100755 (executable)
@@ -1,7 +1,8 @@
 #!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/helper-functions.sh
 
 # avoid multiple calls to `has`.  this creates things like:
@@ -42,10 +43,12 @@ if [[ ${KERNEL} == linux ]] && ${FEATURES_xattr} ; then
                }
        else
                dump_xattrs() {
+                       PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
                        "${PORTAGE_PYTHON:-/usr/bin/python}" \
                        "${PORTAGE_BIN_PATH}/xattr-helper.py" --dump < <(echo -n "$1")
                }
                restore_xattrs() {
+                       PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
                        "${PORTAGE_PYTHON:-/usr/bin/python}" \
                        "${PORTAGE_BIN_PATH}/xattr-helper.py" --restore
                }