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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6FE7015800F for ; Mon, 2 Jan 2023 05:25:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 667A5E0896; Mon, 2 Jan 2023 05:25:58 +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 4D228E0896 for ; Mon, 2 Jan 2023 05:25:58 +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 28FA0335D0D for ; Mon, 2 Jan 2023 05:25:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6721C6F2 for ; Mon, 2 Jan 2023 05:25:55 +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: <1672637151.f1d98b6dc36ff2b47c36427c9938999320352eb4.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/news.py X-VCS-Directories: lib/portage/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f1d98b6dc36ff2b47c36427c9938999320352eb4 X-VCS-Branch: master Date: Mon, 2 Jan 2023 05:25:55 +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: c984f121-1a3a-46f0-97ee-1a135270dd61 X-Archives-Hash: 7251dccfa40419b298445ea1b53a52be commit: f1d98b6dc36ff2b47c36427c9938999320352eb4 Author: Sam James gentoo org> AuthorDate: Mon Jan 2 04:47:11 2023 +0000 Commit: Sam James gentoo org> CommitDate: Mon Jan 2 05:25:51 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f1d98b6d news: fix value of profiles_base This fixes matching profile paths in Display-If-Profile in news items. bad: kwargs['profile']='var/db/repos/gentoo/profiles/default/linux/amd64/17.1/hardened', self.profile='default/linux/amd64/17.1/hardened' good: kwargs['profile']='default/linux/amd64/17.1/hardened', self.profile='default/linux/amd64/17.1/hardened' os.path.join() treats paths differently based on the components given: 'os.path.join(portdir, "profiles", os.path.sep)' passes 3 different paths, whereas before 64d84ce2d9a333e83e2a5fba5e7ec95f936959e7, and now, we concat. profiles and os.path.sep first so that further splitting isn't carried out. Thanks to kurly for noticing a recent news item wasn't showing up. Fixes: 64d84ce2d9a333e83e2a5fba5e7ec95f936959e7 Signed-off-by: Sam James gentoo.org> lib/portage/news.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/portage/news.py b/lib/portage/news.py index 51d493cb7..14401814d 100644 --- a/lib/portage/news.py +++ b/lib/portage/news.py @@ -79,7 +79,7 @@ class NewsManager: portdir = portdb.repositories.mainRepoLocation() profiles_base = None if portdir is not None: - profiles_base = os.path.join(portdir, "profiles", os.path.sep) + profiles_base = os.path.join(portdir, ("profiles" + os.path.sep)) profile_path = None if profiles_base is not None and portdb.settings.profile_path: profile_path = normalize_path(