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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6E2E3158042 for ; Sat, 2 Nov 2024 15:48:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 939A7E0821; Sat, 2 Nov 2024 15:48:33 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 79562E0821 for ; Sat, 2 Nov 2024 15:48:33 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8FA843430BB for ; Sat, 2 Nov 2024 15:48:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2247F1295 for ; Sat, 2 Nov 2024 15:48:31 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1730562349.320df528974c09338c7fef12e41ce66c5593c101.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/gpkg.py X-VCS-Directories: lib/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 320df528974c09338c7fef12e41ce66c5593c101 X-VCS-Branch: master Date: Sat, 2 Nov 2024 15:48:31 +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: e9d2352c-b6df-4c9f-a820-3609e6489c1d X-Archives-Hash: 1b74a5d20fa74365c2ed53fba7e5b95e commit: 320df528974c09338c7fef12e41ce66c5593c101 Author: Etienne Buira free fr> AuthorDate: Sat Nov 2 14:33:27 2024 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Nov 2 15:45:49 2024 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=320df528 gpkg: avoid os.path.islink where lstat is available Signed-off-by: Etienne Buira free.fr> Bug: https://bugs.gentoo.org/942512 Signed-off-by: Zac Medico gentoo.org> lib/portage/gpkg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/portage/gpkg.py b/lib/portage/gpkg.py index 5f392e95e8..c4a2666bc5 100644 --- a/lib/portage/gpkg.py +++ b/lib/portage/gpkg.py @@ -1943,7 +1943,7 @@ class gpkg: file_stat = os.lstat(f) - if os.path.islink(f): + if stat.S_ISLNK(file_stat): path_link = os.readlink(f) path_link_length = len( os.fsencode(path_link) @@ -2035,7 +2035,7 @@ class gpkg: file_stat = os.lstat(path) - if os.path.islink(path): + if stat.S_ISLNK(file_stat): path_link = os.readlink(path) path_link_length = len( _unicode_encode(