sys-cluster/ceph: Fix call to python_fix_shebang in 14.2.1-r1
authorPatrick McLean <patrick.mclean@sony.com>
Thu, 14 Nov 2019 01:00:24 +0000 (17:00 -0800)
committerPatrick McLean <chutzpah@gentoo.org>
Thu, 14 Nov 2019 01:00:45 +0000 (17:00 -0800)
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
sys-cluster/ceph/ceph-14.2.4-r1.ebuild

index b5c3ff61473f3c81fe759eb1c7d2fa0f3b1e877c..b56ddd9c3f0c385540c3c28a9bbb9f68ee04753a 100644 (file)
@@ -348,8 +348,9 @@ src_install() {
        python_fix_shebang "${ED}"/usr/{,s}bin/
 
        # python_fix_shebang apparently is not idempotent
-       sed -i -r  's:(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]:\1:' \
-               "${ED}"/usr/sbin/{mount.*,ceph-volume{,-systemd}} || die "sed failed"
+       local shebang_regex='(/usr/lib/python-exec/python[0-9]\.[0-9]/python)[0-9]\.[0-9]'
+       grep -r -E -l --null "${shebang_regex}" "${ED}"/usr/{s,}bin/ \
+               | xargs --null --no-run-if-empty -- sed -i -r  "s:${shebang_regex}:\1:" || die
 
        local -a rados_classes=( "${ED}/usr/$(get_libdir)/rados-classes"/* )
        dostrip -x "${rados_classes[@]#${ED}}"