public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: John Helmert III <ajak@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Current portage will now truncate your repo's git history to 1
Date: Sat, 17 Dec 2022 20:09:13 -0600	[thread overview]
Message-ID: <Y552SWDvyDP9BJuA@gentoo.org> (raw)
In-Reply-To: <BA316A69-710C-453F-A6DE-880D98AD727D@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 3867 bytes --]

On Sat, Dec 17, 2022 at 05:42:43AM +0000, Sam James wrote:
> 
> 
> > On 15 Dec 2022, at 19:22, Florian Schmaus <flow@gentoo.org> wrote:
> > 
> > This is a public service announcement that the recently stabilized portage version will truncate you repo's git history to 1.
> 
> I wish you'd shown us in #gentoo-portage before sending this, as it's a bit misleading / alarmist. We were actively all speaking
> at the time.
> 
> Not only to reconsider the phrasing and include some important details, but also to mention the rationale, which I describe
> below.
> 
> If you felt the Portage team should've written a news item for it, you were (and still are) free to say so, and we'd
> do it.
> 
> > 
> > While this is a good thing for the majority of Gentoo users, it affects developers that develop in a git known to portage (like me). If I understand the portage maintainers vision correctly, then future portage will assume full control over its configured repositories and potentially perform destructive operations on them, for example "git clean" [1].
> > 
> ... only for repositories of sync-type=git & auto-sync=yes.
> 
> The rationale for this is that most people who use sync-type=git are doing so because they want
> a quicker sync (to complete), a more reliable one (no Manifest race condition issues), and to
> get changes from Gentoo faster.
> 
> Whenever Portage is syncing something, our view was that we should prioritise successful
> completion of syncs, especially given it may be performed unattended.
> 
> If git is pulling from a CDN, Portage may on one sync receive state X, but
> on a subsequent sync receive state X-1. This can cause an odd state
> where git wants to resolve conflicts and manual intervention is required.
> 
> This situation was often worse with sync-depth=1 and would lead
> to orphaned files, hence the 'git clean' PR referenced.
> 
> The motivation behind the sync depth part was because of
> disk space growing unbounded otherwise.

Just to make this more abundantly explicit: it repeatedly happened to
me (but others, too) that on a system using git to sync a shallow
::gentoo clone, during unattended syncs, the repository attempted a
merge with the upstream, yielding a repo in a merging state, with a
huge list of dirtied files in the working tree, plus untracked files.

> > I personally would prefer portage simply adjusting its behavior based on the owner of the repository. That is, if it's the 'portage' user then assume full control, and if it is a different user, then fall back to a preserving, conservative mode of operation. Unfortunately, for me, this idea was received skeptically at best in a recent discussion in #gentoo-portage.
> 
> This wouldn't work for Prefix and also FEATURES="-usersync".
> 
> --
> 
> Now, looking forward in a constructive manner, I think we can
> make both camps happy here with an option to indicate
> If Portage can assume the repository will be touched by something
> other than Portage.
> 
> I propose a configuration option called 'volatile' (thanks
> Arsen for the name suggestion) which indicates that the
> repository may be changed outside of Portage by any time,
> and hence no destructive operations should be carried out.
> 
> If the option is on, it also prohibits some optimisations
> which require assuming the integrity of the repository.
> 
> I have a draft of these changes at https://github.com/gentoo/portage/pull/961.
> 
> (https://github.com/gentoo/portage/pull/961.patch if want to view as a raw patch series.0
> 
> I am undecided on whether volatile should be default on or not. In the PR
> as it is, it defaults to off, which would require a news item. I may just turn it
> on given the tone of this thread, as none of it has been very encouraging
> for further work on Portage.



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2022-12-18  2:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 19:22 [gentoo-dev] Current portage will now truncate your repo's git history to 1 Florian Schmaus
2022-12-15 19:56 ` [gentoo-dev] " Florian Schmaus
2022-12-15 20:10 ` [gentoo-dev] " Toralf Förster
2022-12-15 20:40   ` Florian Schmaus
2022-12-16  1:08     ` [gentoo-dev] " Duncan
2022-12-17  4:01       ` Brian Evans
2022-12-18  1:52         ` John Helmert III
2022-12-17  5:42 ` [gentoo-dev] " Sam James
2022-12-17  6:14   ` Michael
2022-12-17  6:25   ` Sam James
2022-12-18  2:09   ` John Helmert III [this message]
2022-12-18 10:19   ` Florian Schmaus
2022-12-18 11:42     ` Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y552SWDvyDP9BJuA@gentoo.org \
    --to=ajak@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox