dev-util/bcc: fix dirname $0 in tools

Closes: https://bugs.gentoo.org/964734
Signed-off-by: Zac Medico <zmedico@gentoo.org>
This commit is contained in:
Zac Medico
2025-10-21 20:26:04 -07:00
parent 812a9e59fb
commit 50670caaa5
4 changed files with 5 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -193,6 +193,7 @@ src_install() {
for tool in "${ED}"/usr/share/bcc/tools/*; do
[[ -d ${tool} || ! -x ${tool} || ${tool} =~ .*[.](c|txt) ]] && continue
grep -qE '^#!/usr/bin/(env |)python' "${tool}" && continue
sed -e 's:dirname \$0:dirname "$(realpath "$0")":' -i "${tool}" || die
target="/usr/sbin/$(bcc_tool_name "${tool}")"
[[ -e ${ED}${target} ]] && continue

View File

@@ -193,6 +193,7 @@ src_install() {
for tool in "${ED}"/usr/share/bcc/tools/*; do
[[ -d ${tool} || ! -x ${tool} || ${tool} =~ .*[.](c|txt) ]] && continue
grep -qE '^#!/usr/bin/(env |)python' "${tool}" && continue
sed -e 's:dirname \$0:dirname "$(realpath "$0")":' -i "${tool}" || die
target="/usr/sbin/$(bcc_tool_name "${tool}")"
[[ -e ${ED}${target} ]] && continue

View File

@@ -193,6 +193,7 @@ src_install() {
for tool in "${ED}"/usr/share/bcc/tools/*; do
[[ -d ${tool} || ! -x ${tool} || ${tool} =~ .*[.](c|txt) ]] && continue
grep -qE '^#!/usr/bin/(env |)python' "${tool}" && continue
sed -e 's:dirname \$0:dirname "$(realpath "$0")":' -i "${tool}" || die
target="/usr/sbin/$(bcc_tool_name "${tool}")"
[[ -e ${ED}${target} ]] && continue

View File

@@ -193,6 +193,7 @@ src_install() {
for tool in "${ED}"/usr/share/bcc/tools/*; do
[[ -d ${tool} || ! -x ${tool} || ${tool} =~ .*[.](c|txt) ]] && continue
grep -qE '^#!/usr/bin/(env |)python' "${tool}" && continue
sed -e 's:dirname \$0:dirname "$(realpath "$0")":' -i "${tool}" || die
target="/usr/sbin/$(bcc_tool_name "${tool}")"
[[ -e ${ED}${target} ]] && continue