From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5FC851382C5 for ; Fri, 16 Apr 2021 15:08:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8A11CE081A; Fri, 16 Apr 2021 15:08:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6A1BDE0823 for ; Fri, 16 Apr 2021 15:08:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 096E7340BC9 for ; Fri, 16 Apr 2021 15:08:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7F123643 for ; Fri, 16 Apr 2021 15:08:23 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1618583866.583af0f01ece9c63042a8a12bac11aaa53faa19b.vapier@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: lddtree.py lddtree.sh X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 583af0f01ece9c63042a8a12bac11aaa53faa19b X-VCS-Branch: master Date: Fri, 16 Apr 2021 15:08:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5b30d3ad-c56b-40d8-80f0-3c5fa0e8d625 X-Archives-Hash: b503a11b33c0e340c0f449d1a027a445 commit: 583af0f01ece9c63042a8a12bac11aaa53faa19b Author: Mike Frysinger chromium org> AuthorDate: Fri Apr 16 14:37:46 2021 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Fri Apr 16 14:37:46 2021 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=583af0f0 lddtree: handle ${ORIGIN} like $ORIGIN Bug: https://bugs.gentoo.org/653586 Signed-off-by: Mike Frysinger gentoo.org> lddtree.py | 2 ++ lddtree.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lddtree.py b/lddtree.py index fae39e0..cd068f6 100755 --- a/lddtree.py +++ b/lddtree.py @@ -207,6 +207,8 @@ def ParseLdPaths(str_ldpaths, root='', path=None): ldpath = os.getcwd() elif '$ORIGIN' in ldpath: ldpath = ldpath.replace('$ORIGIN', os.path.dirname(path)) + elif '${ORIGIN}' in ldpath: + ldpath = ldpath.replace('${ORIGIN}', os.path.dirname(path)) else: ldpath = root + ldpath ldpaths.append(normpath(ldpath)) diff --git a/lddtree.sh b/lddtree.sh index b05ce19..5271dae 100755 --- a/lddtree.sh +++ b/lddtree.sh @@ -73,7 +73,7 @@ find_elf() { if [[ ${c_last_needed_by} != ${needed_by} ]] ; then c_last_needed_by=${needed_by} c_last_needed_by_rpaths=$(scanelf -qF '#F%r' "${needed_by}" | \ - sed -e 's|:| |g' -e "s:[$]ORIGIN:${needed_by%/*}:") + sed -E -e 's|:| |g' -e "s:[$](ORIGIN|\{ORIGIN\}):${needed_by%/*}:") fi check_paths "${elf}" ${c_last_needed_by_rpaths} && return 0