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 3718D1382C5 for ; Wed, 16 Dec 2020 03:01:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5530AE091C; Wed, 16 Dec 2020 03:01:51 +0000 (UTC) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (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 4C3B3E091C for ; Wed, 16 Dec 2020 03:01:51 +0000 (UTC) Received: by mail-qv1-f47.google.com with SMTP id l14so10690158qvh.2 for ; Tue, 15 Dec 2020 19:01:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WO1uQUezaMej33v2LzQYByx+SZO8KVXel2S1mBXYVIw=; b=LsecS86L4i/Woaa0Oub3DcoRirflR0DESbTZqynDi7uzXRh/cBT3/b3n12bulM30ki xNYJyquj0ULvpGX/9QjDQSWjQyx1VPSz7zzqXoto3Oa2sQoqsv1n9KOh29mgzZGnAAN3 mghwsIWYjH1OnlPH7C4rexEidCjW7xSwmmAYN7iypYUZHIMTPGWBkojnqBW8tKs8vBwN 1bZE5EswJGDKELV4JhaJB9FBas6JJqO90mn/yWbKXRL7Pwi0oiK4emhYlE5zGVcVaobL hYEExEzo8JdpyNSLV9bag1Eew2pDqwp+2PrOh7opGo8TbeXJU14otGjWb1itX4sZeuLn 1XSg== X-Gm-Message-State: AOAM533J41s/v8c+swsVJ8ooqq/3F+S6/cA0vfy1QZbXts+uEV3kpehT 1mbp+bcVHVPpORTbK8kWRL1g626nqhVJtw== X-Google-Smtp-Source: ABdhPJzibqY1IPEGCmYen6hOzPqyAghrC/SNZ+gpTELH11RyDmzgAV0mbN/aLn9jySLq1KuC1TRTuw== X-Received: by 2002:a05:6214:14ee:: with SMTP id k14mr2984943qvw.36.1608087709917; Tue, 15 Dec 2020 19:01:49 -0800 (PST) Received: from localhost ([208.104.103.123]) by smtp.gmail.com with ESMTPSA id i17sm338201qtg.77.2020.12.15.19.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 19:01:49 -0800 (PST) From: Matt Turner To: gentoo-catalyst@lists.gentoo.org Cc: Matt Turner Subject: [gentoo-catalyst] [PATCH 4/5] targets: Use interpreter with portage module for build.py Date: Tue, 15 Dec 2020 22:01:30 -0500 Message-Id: <20201216030131.14158-4-mattst88@gentoo.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201216030131.14158-1-mattst88@gentoo.org> References: <20201216030131.14158-1-mattst88@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 87e38707-912a-46e4-b3d8-4f6346679c57 X-Archives-Hash: d7f5908a18fa73072beb64c6e2ee5a91 Closes: https://bugs.gentoo.org/759685 Signed-off-by: Matt Turner --- targets/stage1/chroot.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh index 83cd084d..6b9bfb3e 100755 --- a/targets/stage1/chroot.sh +++ b/targets/stage1/chroot.sh @@ -2,8 +2,13 @@ source /tmp/chroot-functions.sh -# We do this first, so we know our package list for --debug -buildpkgs=($(/tmp/build.py)) +for module_path in /usr/lib/*/site-packages/portage/__init__.py; do + # Find the python interpreter + interpreter=$(echo $module_path | cut -d/ -f4) + + buildpkgs=($($interpreter /tmp/build.py 2>/dev/null)) + [[ $? == 0 ]] && break +done ## Sanity check profile if [[ ${#buildpkgs[@]} -eq 0 ]]; then -- 2.26.2