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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 693CC159C9B for ; Mon, 12 Aug 2024 12:33:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 062F3E2D0C; Mon, 12 Aug 2024 12:33:07 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E58E9E2D0C for ; Mon, 12 Aug 2024 12:33:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 13CB9343021 for ; Mon, 12 Aug 2024 12:33:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1D5CA1E5D for ; Mon, 12 Aug 2024 12:33:04 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1723465946.91b1222f17bb1f28e3151b1e00d2ddb22645e00a.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/gpsd/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-geosciences/gpsd/gpsd-3.25-r1.ebuild sci-geosciences/gpsd/gpsd-3.25-r2.ebuild X-VCS-Directories: sci-geosciences/gpsd/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 91b1222f17bb1f28e3151b1e00d2ddb22645e00a X-VCS-Branch: master Date: Mon, 12 Aug 2024 12:33:04 +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: b53b5b44-d92d-4e9c-a458-963169ee4883 X-Archives-Hash: 2144d093ced9601e184570a19666a89d commit: 91b1222f17bb1f28e3151b1e00d2ddb22645e00a Author: Sam James gentoo org> AuthorDate: Mon Aug 12 12:29:36 2024 +0000 Commit: Sam James gentoo org> CommitDate: Mon Aug 12 12:32:26 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91b1222f sci-geosciences/gpsd: fix USE=python install * Add missing `assert` which reveals one problem where the directory is trashed after one impl, which is a problem given the package is multi impl. * grep for the known-bad shebang before fixing so we don't try to touch ELF. Closes: https://bugs.gentoo.org/937612 Signed-off-by: Sam James gentoo.org> .../gpsd/{gpsd-3.25-r1.ebuild => gpsd-3.25-r2.ebuild} | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sci-geosciences/gpsd/gpsd-3.25-r1.ebuild b/sci-geosciences/gpsd/gpsd-3.25-r2.ebuild similarity index 94% rename from sci-geosciences/gpsd/gpsd-3.25-r1.ebuild rename to sci-geosciences/gpsd/gpsd-3.25-r2.ebuild index f7f785b3ea35..615d6bafd6f9 100644 --- a/sci-geosciences/gpsd/gpsd-3.25-r1.ebuild +++ b/sci-geosciences/gpsd/gpsd-3.25-r2.ebuild @@ -213,10 +213,11 @@ python_test() { :; } -python_install(){ - mkdir -p "${T}/scripts" || die - grep -Rl "${D}/usr/bin" -e "/usr/bin/env python" | xargs mv -t "${T}/scripts" - python_doscript "${T}"/scripts/* +python_install() { + while read -d '' -r file ; do + grep -q "#!/usr/bin/env python" "${file}" && python_doscript "${file}" + done < <(find "${T}"/scripts -type f -print0) + distutils-r1_python_install } @@ -231,7 +232,13 @@ src_install() { find "${D}"/python-discard/ -type d -delete # Install correct multi-python copy pushd "${P}" || die - use python && distutils-r1_src_install + if use python ; then + mkdir -p "${T}/scripts" || die + grep -Rl "${D}/usr/bin" -e "/usr/bin/env python" | xargs cp -t "${T}/scripts" + assert "Moving Python scripts failed" + + distutils-r1_src_install + fi popd || die }