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 DB096158042 for ; Sat, 2 Nov 2024 22:12:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1BAECE07D7; Sat, 2 Nov 2024 22:12:21 +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 00529E07D7 for ; Sat, 2 Nov 2024 22:12:20 +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 1A2C1343099 for ; Sat, 2 Nov 2024 22:12:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7463811DF for ; Sat, 2 Nov 2024 22:12:18 +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: <1730585507.ac88048bb1d6a28dbd415223e2e0fc3ec8b16a6c.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: ac88048bb1d6a28dbd415223e2e0fc3ec8b16a6c X-VCS-Branch: master Date: Sat, 2 Nov 2024 22:12:18 +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: 30c01194-f1d0-4408-ab81-044008b3f139 X-Archives-Hash: 5a0f8d6e97243c15340d92ca5d435a49 commit: ac88048bb1d6a28dbd415223e2e0fc3ec8b16a6c Author: Zac Medico gentoo org> AuthorDate: Sat Nov 2 22:10:44 2024 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Nov 2 22:11:47 2024 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ac88048b gpkg: Fix S_ISLNK usage Fixes: 320df528974c ("gpkg: avoid os.path.islink where lstat is available") 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 e9347919cc..53785c2711 100644 --- a/lib/portage/gpkg.py +++ b/lib/portage/gpkg.py @@ -1943,7 +1943,7 @@ class gpkg: file_stat = os.lstat(f) - if stat.S_ISLNK(file_stat): + if stat.S_ISLNK(file_stat.st_mode): 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 stat.S_ISLNK(file_stat): + if stat.S_ISLNK(file_stat.st_mode): path_link = os.readlink(path) path_link_length = len( _unicode_encode(