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 14DF21581E7 for ; Fri, 26 Apr 2024 22:06:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4F867E29CF; Fri, 26 Apr 2024 22:06:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 30E9FE29D5 for ; Fri, 26 Apr 2024 22:06:07 +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 645D4340775 for ; Fri, 26 Apr 2024 22:06:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9A0211752 for ; Fri, 26 Apr 2024 22:06: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: <1714169148.36235596e061bf8cf4729b3915f9aaa6ec80baa3.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/__init__.py X-VCS-Directories: lib/portage/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 36235596e061bf8cf4729b3915f9aaa6ec80baa3 X-VCS-Branch: master Date: Fri, 26 Apr 2024 22:06: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: f2610866-6ed0-4b17-9622-8eb0867d5f62 X-Archives-Hash: a6dc1ad51fefe53005dff6d90fd9af73 commit: 36235596e061bf8cf4729b3915f9aaa6ec80baa3 Author: Alfred Wingate protonmail com> AuthorDate: Sat Apr 6 08:28:43 2024 +0000 Commit: Sam James gentoo org> CommitDate: Fri Apr 26 22:05:48 2024 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=36235596 lib: adhere to python package version conventions * Commit metadata isn't valid version that python tooling is expected to parse. Follow python ecosystem conventions and make it a local version. https://packaging.python.org/en/latest/specifications/version-specifiers/#local-version-segments Example: * Old: 3.0.63-g08a2bc380 * New: 3.0.63+g08a2bc380 Bug: https://bugs.gentoo.org/926966 Signed-off-by: Alfred Wingate protonmail.com> Closes: https://github.com/gentoo/portage/pull/1314 Signed-off-by: Sam James gentoo.org> lib/portage/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py index a468eeaff3..21bf993170 100644 --- a/lib/portage/__init__.py +++ b/lib/portage/__init__.py @@ -732,7 +732,7 @@ if installation.TYPE == installation.TYPES.SOURCE: output = _unicode_decode(proc.communicate()[0], encoding=encoding) status = proc.wait() if os.WIFEXITED(status) and os.WEXITSTATUS(status) == os.EX_OK: - VERSION = output.lstrip('portage-').strip() + VERSION = output.lstrip("portage-").strip().replace("-g", "+g") else: VERSION = "HEAD" return VERSION