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 9058E15A7DA for ; Tue, 21 Mar 2023 23:52:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 78E64E0877; Tue, 21 Mar 2023 23:52:47 +0000 (UTC) Received: from smtp.gentoo.org (dev.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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 63289E0877 for ; Tue, 21 Mar 2023 23:52:47 +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 22598340B6A for ; Tue, 21 Mar 2023 23:52:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 605158EE for ; Tue, 21 Mar 2023 23:52:44 +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: <1679442760.d2dc5a816c2ececad408bfbf6205ec8a4a01a5b5.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/archive-conf X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: d2dc5a816c2ececad408bfbf6205ec8a4a01a5b5 X-VCS-Branch: master Date: Tue, 21 Mar 2023 23:52:44 +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: 531b0941-2f01-4104-b9d4-9fae037ffbc6 X-Archives-Hash: c898364c3623b66e21f026dcc447ae30 commit: d2dc5a816c2ececad408bfbf6205ec8a4a01a5b5 Author: Oskari Pirhonen gmail com> AuthorDate: Tue Mar 21 03:00:31 2023 +0000 Commit: Sam James gentoo org> CommitDate: Tue Mar 21 23:52:40 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=d2dc5a81 archive-conf: switch from os.popen() to subprocess.run() Signed-off-by: Oskari Pirhonen gmail.com> Closes: https://github.com/gentoo/portage/pull/1008 Signed-off-by: Sam James gentoo.org> bin/archive-conf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/archive-conf b/bin/archive-conf index a11677753..a6de29da6 100755 --- a/bin/archive-conf +++ b/bin/archive-conf @@ -9,6 +9,7 @@ # Jeremy Wohl's dispatch-conf script and the portage chkcontents script. # +import subprocess import sys from os import path as osp @@ -45,8 +46,12 @@ def archive_conf(): # Find all the CONTENTS files in VDB_PATH. eroot_vdb_path = os.path.join(portage.settings["EROOT"], portage.VDB_PATH) - with os.popen(f"find {eroot_vdb_path} -type f -name CONTENTS") as f: - content_files += f.readlines() + find = subprocess.run( + ["find", eroot_vdb_path, "-type", "f", "-name", "CONTENTS"], + capture_output=True, + text=True, + ) + content_files += find.stdout.splitlines() # Search for the saved md5 checksum of all the specified config files # and see if the current file is unmodified or not.