> On 18 Dec 2022, at 10:19, Florian Schmaus <f...@gentoo.org> wrote:
> 
> On 17.12.22 06:42, Sam James wrote:
>>> On 15 Dec 2022, at 19:22, Florian Schmaus <f...@gentoo.org> wrote:
>>> 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".
> 
> Simply do not apply the approach on Prefix. That should be fine. I am not 
> sure how usersync being disabled (or enabled) plays a role here, though.
> 

The owner of the repository and its permissions will be affected by the 
permissions used by Portage to sync.

> I believe something like this would make everyone happy:
> 
> if volatile_explicitly_configured:
>  volatile = explicitly_configured_volatile_value
> else if prefix
>  volatile = false
> else if Path(repo_dir).user != (root|portage) # Or, if uid >= 1000
>  volatile = true
> else
>  volatile = false
> 
> Assuming that the "if target repo is not shallow, then no shallow clone 
> (unless explicitly requested)" check is only applied if volatile=true, then 
> you even have the desired effect that users get their repo automatically 
> converted to shallow ones. Which makes you happy. And the above logic would 
> make me happy, since the "if Path(repo_dir).uid >= 1000" branch would be 
> taken for me.
> 

Feel free to suggest that on the PR, it sounds like a decent compromise, if a 
bit automagic - but it wouldn't be the first or last case of that in Portage.

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to