python-utils-r1.eclass: python_fix_shebang, accept symlink as parameter
authorMichał Górny <mgorny@gentoo.org>
Thu, 26 Nov 2015 22:21:52 +0000 (23:21 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sat, 28 Nov 2015 19:09:06 +0000 (20:09 +0100)
Add '-H' option to find to allow following symlinks passed as
parameters. This makes python_fix_shebang handle either file symlinks
passed directly, or directory symlinks passed directly for recursive
traversal. Both were currently ignored silently.

eclass/python-utils-r1.eclass

index 7b0f2f87a5661900ccd3ab9bc3f0765d78327dab..e0b13455d66eda4708b6f5df8b00a27452622c12 100644 (file)
@@ -1133,7 +1133,7 @@ python_fix_shebang() {
                                eerror "  requested impl: ${EPYTHON}"
                                die "${FUNCNAME}: conversion of incompatible shebang requested"
                        fi
-               done < <(find "${path}" -type f -print0 || die)
+               done < <(find -H "${path}" -type f -print0 || die)
 
                if [[ ! ${any_fixed} ]]; then
                        eqawarn "QA warning: ${FUNCNAME}, ${path#${D}} did not match any fixable files."