1 |
> On 18 Dec 2022, at 10:19, Florian Schmaus <flow@g.o> wrote: |
2 |
> |
3 |
> On 17.12.22 06:42, Sam James wrote: |
4 |
>>> On 15 Dec 2022, at 19:22, Florian Schmaus <flow@g.o> wrote: |
5 |
>>> 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. |
6 |
>> This wouldn't work for Prefix and also FEATURES="-usersync". |
7 |
> |
8 |
> 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. |
9 |
> |
10 |
|
11 |
The owner of the repository and its permissions will be affected by the permissions used by Portage to sync. |
12 |
|
13 |
> I believe something like this would make everyone happy: |
14 |
> |
15 |
> if volatile_explicitly_configured: |
16 |
> volatile = explicitly_configured_volatile_value |
17 |
> else if prefix |
18 |
> volatile = false |
19 |
> else if Path(repo_dir).user != (root|portage) # Or, if uid >= 1000 |
20 |
> volatile = true |
21 |
> else |
22 |
> volatile = false |
23 |
> |
24 |
> 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. |
25 |
> |
26 |
|
27 |
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. |