Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 2/2] python-utils-r1.eclass: python_fix_shebang, accept symlink as parameter
Date: Thu, 26 Nov 2015 22:30:59
Message-Id: 1448577009-32161-2-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: python_fix_shebang, skip empty files by "Michał Górny"
1 Add '-H' option to find to allow following symlinks passed as
2 parameters. This makes python_fix_shebang handle either file symlinks
3 passed directly, or directory symlinks passed directly for recursive
4 traversal. Both were currently ignored silently.
5 ---
6 eclass/python-utils-r1.eclass | 2 +-
7 1 file changed, 1 insertion(+), 1 deletion(-)
8
9 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
10 index 95689f6..84a2588 100644
11 --- a/eclass/python-utils-r1.eclass
12 +++ b/eclass/python-utils-r1.eclass
13 @@ -1131,7 +1131,7 @@ python_fix_shebang() {
14 eerror " requested impl: ${EPYTHON}"
15 die "${FUNCNAME}: conversion of incompatible shebang requested"
16 fi
17 - done < <(find "${path}" -type f "${find_args[@]}" -print0 || die)
18 + done < <(find -H "${path}" -type f "${find_args[@]}" -print0 || die)
19
20 if [[ ! ${any_fixed} ]]; then
21 eqawarn "QA warning: ${FUNCNAME}, ${path#${D}} did not match any fixable files."
22 --
23 2.6.3