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 5BF4E15800F for ; Wed, 22 Feb 2023 09:40:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A4DDDE07A5; Wed, 22 Feb 2023 09:40:23 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 881BDE07A5 for ; Wed, 22 Feb 2023 09:40:23 +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 737D634027D for ; Wed, 22 Feb 2023 09:40:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DA9D67D0 for ; Wed, 22 Feb 2023 09:40:20 +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: <1677058808.f29cc2578b1c97164c1411b14a2dd8195b14ab1e.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/sync/modules/git/, / X-VCS-Repository: proj/portage X-VCS-Files: NEWS lib/portage/sync/modules/git/git.py X-VCS-Directories: / lib/portage/sync/modules/git/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f29cc2578b1c97164c1411b14a2dd8195b14ab1e X-VCS-Branch: master Date: Wed, 22 Feb 2023 09:40:20 +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: 5109eff9-5748-4349-abb2-7ea0a5600b64 X-Archives-Hash: 7e9c4df73df6968f0ab7af20779a6265 commit: f29cc2578b1c97164c1411b14a2dd8195b14ab1e Author: Florian Schmaus gentoo org> AuthorDate: Wed Feb 22 09:07:31 2023 +0000 Commit: Sam James gentoo org> CommitDate: Wed Feb 22 09:40:08 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f29cc257 sync: git: fix code comment regarding clobbering the repository The logic the code comment stated was simply inverted, and so was the NEWS item. The actual implementation is correct. Signed-off-by: Florian Schmaus gentoo.org> Closes: https://github.com/gentoo/portage/pull/992 Signed-off-by: Sam James gentoo.org> NEWS | 10 ++++++++-- lib/portage/sync/modules/git/git.py | 5 +++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 9389d2c09..ac658c923 100644 --- a/NEWS +++ b/NEWS @@ -125,8 +125,14 @@ Breaking changes: to work. The default value of 'volatile' is determined as follows: - - If unset and the repository is under /var/db/repos and the repository - exists and it's owned by either 'portage' or 'root', set to yes. + - If the repository is under /var/db/repos or if it is owned by either + 'portage' or 'root', then it defaults to 'no'. That is, portage + assumes full control over the repository, potentially performing + destructive changes to the repository. + - If the repository is not under /var/db/repos or owned by a different + user than 'portage' or 'root', then it defaults to 'yes'. That is, + portage assumes the repository is user owned and does *not* perform + any destructive changes. Features: * cnf: make.conf.example.loong: add for the loong arch (bug #884135). diff --git a/lib/portage/sync/modules/git/git.py b/lib/portage/sync/modules/git/git.py index bd31f0445..6551ef29d 100644 --- a/lib/portage/sync/modules/git/git.py +++ b/lib/portage/sync/modules/git/git.py @@ -194,13 +194,14 @@ class GitSync(NewBase): # 1. sync-type=git # 2. # - volatile=no (explicitly set to no), OR - # - volatile is unset AND the repository owner is neither root or portage + # - volatile is unset AND the repository owner is either root or portage # 3. Portage is syncing the respository (rather than e.g. auto-sync=no # and never running 'emaint sync -r foo') # # Portage will not clobber if: # 1. volatile=yes (explicitly set in the config), OR - # 2. volatile is unset and the repository owner is root or portage. + # 2. volatile is unset and the repository owner is neither root nor + # portage. # # 'volatile' refers to whether the repository is volatile and may # only be safely changed by Portage itself, i.e. whether Portage