Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts
@ 2021-04-03  2:03 gt7-void
  2021-04-04 17:41 ` dkwo
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: gt7-void @ 2021-04-03  2:03 UTC (permalink / raw)
  To: ml

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

New issue by gt7-void on void-packages repository

https://github.com/void-linux/void-packages/issues/29965

Description:
The way new entries are added to `common/shlibs` (generally at the end) often results in merge conflicts (e.g. all PR for new packages that are open at a given time are incompatible since they all append at the same position).

It occurs to me that a way to minimize those conflicts would be to have `common/shlibs` be sorted by soname. In this way it becomes very unlikely that two commits conflict (they will only if they are lexicographically next to each other).

In addition, this would help to be explicit about repeated sonames and remove unnecessary duplicates.

This may be a little bit painful at the time the list is sorted, but then it's just a matter to keep it sorted (maybe some hook can check and complain about unsorted entries?).

The same applies to `common/options.description`, although that file is not updated so often, OTOH it's almost sorted (only 6 entries out of order).

A possible sort order would be to use:
```
$ sort common/shlibs -sk1,1
```
and
```
$ sort common/options.description -sk1,1 -t=
```

To see the kinds of soname repetitions:
```
$ sort common/shlibs -sk1,1 | awk '$1=="#" { next } $1==k&&first{print first; first="";d++} $1==k{print;x++} $1!=k{k=$1;first=$0;t++} END{print t, d, x}'
...
3866 61 92
```
I.e. out of 3866 different sonames, there are 61 repeated (61+92 times in total).

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] sorted common/shlibs to avoid merge/rebase conflicts
  2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
@ 2021-04-04 17:41 ` dkwo
  2021-04-04 17:48 ` ericonr
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dkwo @ 2021-04-04 17:41 UTC (permalink / raw)
  To: ml

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

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/issues/29965#issuecomment-813071261

Comment:
Makes sense to me.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] sorted common/shlibs to avoid merge/rebase conflicts
  2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
  2021-04-04 17:41 ` dkwo
@ 2021-04-04 17:48 ` ericonr
  2021-04-04 19:23 ` Duncaen
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ericonr @ 2021-04-04 17:48 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/issues/29965#issuecomment-813072260

Comment:
> In addition, this would help to be explicit about repeated sonames and remove unnecessary duplicates.

This is a good argument for it that I hadn't thought of.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] sorted common/shlibs to avoid merge/rebase conflicts
  2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
  2021-04-04 17:41 ` dkwo
  2021-04-04 17:48 ` ericonr
@ 2021-04-04 19:23 ` Duncaen
  2021-04-04 19:24 ` Duncaen
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Duncaen @ 2021-04-04 19:23 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/issues/29965#issuecomment-813086622

Comment:
> > In addition, this would help to be explicit about repeated sonames and remove unnecessary duplicates.
> 
> This is a good argument for it that I hadn't thought of.

This is a better lint step than reordering the list if someone forgot it.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] sorted common/shlibs to avoid merge/rebase conflicts
  2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
                   ` (2 preceding siblings ...)
  2021-04-04 19:23 ` Duncaen
@ 2021-04-04 19:24 ` Duncaen
  2021-04-04 19:26 ` Duncaen
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Duncaen @ 2021-04-04 19:24 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/issues/29965#issuecomment-813086622

Comment:
> > In addition, this would help to be explicit about repeated sonames and remove unnecessary duplicates.
> 
> This is a good argument for it that I hadn't thought of.

This is a better lint step than complaining about an unsorted list and a random commit having to reorder it because someone forgot it.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] sorted common/shlibs to avoid merge/rebase conflicts
  2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
                   ` (3 preceding siblings ...)
  2021-04-04 19:24 ` Duncaen
@ 2021-04-04 19:26 ` Duncaen
  2021-04-04 19:26 ` Duncaen
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Duncaen @ 2021-04-04 19:26 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/issues/29965#issuecomment-813086622

Comment:
> > In addition, this would help to be explicit about repeated sonames and remove unnecessary duplicates.
> 
> This is a good argument for it that I hadn't thought of.

This is a better lint step than failing on an unsorted list. If someone forgets to sort it then we have 10 PRs all trying to reorder it, affecting more lines than just adding a new soname in a random position instead of the end to avoid merge conflicts for newly added libraries.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] sorted common/shlibs to avoid merge/rebase conflicts
  2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
                   ` (4 preceding siblings ...)
  2021-04-04 19:26 ` Duncaen
@ 2021-04-04 19:26 ` Duncaen
  2021-04-04 23:13 ` gt7-void
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Duncaen @ 2021-04-04 19:26 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/issues/29965#issuecomment-813086622

Comment:
> > In addition, this would help to be explicit about repeated sonames and remove unnecessary duplicates.
> 
> This is a good argument for it that I hadn't thought of.

This is a better lint step (looking for duplicates) than failing on an unsorted list. If someone forgets to sort it then we have 10 PRs all trying to reorder it, affecting more lines than just adding a new soname in a random position instead of the end to avoid merge conflicts for newly added libraries.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] sorted common/shlibs to avoid merge/rebase conflicts
  2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
                   ` (5 preceding siblings ...)
  2021-04-04 19:26 ` Duncaen
@ 2021-04-04 23:13 ` gt7-void
  2021-04-04 23:17 ` gt7-void
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: gt7-void @ 2021-04-04 23:13 UTC (permalink / raw)
  To: ml

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

New comment by gt7-void on void-packages repository

https://github.com/void-linux/void-packages/issues/29965#issuecomment-813114105

Comment:
> This is a better lint step (looking for duplicates) than failing on an unsorted list.

Is it easy to decide when a duplicate soname is ok or not?

> If someone forgets to sort it then we have 10 PRs all trying to reorder it,

Could we have a lint step checking that the file is sorted?

> affecting more lines than just adding a new soname in a random position instead of the end to avoid merge conflicts for newly added libraries.

Is there a policy about that? I understood sonames had to be placed at (near) the end of the file.

I don't care so much about having the file sorted. The fundamental itch I have is constantly having to amend patches.

The real pain for me was the experience of working with the branch in #29997, which has 7 commits for different packages which add sonames, and any rebase/editing of previous patches would cause a lot of pain. Of course, all this pain would mostly go away if I were to place each soname in a different random place in the file...


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] sorted common/shlibs to avoid merge/rebase conflicts
  2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
                   ` (6 preceding siblings ...)
  2021-04-04 23:13 ` gt7-void
@ 2021-04-04 23:17 ` gt7-void
  2021-04-05  0:29 ` Duncaen
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: gt7-void @ 2021-04-04 23:17 UTC (permalink / raw)
  To: ml

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

New comment by gt7-void on void-packages repository

https://github.com/void-linux/void-packages/issues/29965#issuecomment-813114661

Comment:
Regarding duplicates, there are many different situations:
- exact duplicate lines are obvious to remove, but harmless
- Something like this:
```
ld.so.1 glibc-2.32_1 mips
ld.so.1 glibc-2.32_1 ppc
```
May be ok, although the documentation for the third field is unclear.
- what about this:
```
libClp.so.1 CoinMP-1.8.3_1
libClp.so.1 libClp-1.16.11_1
```
using `xlocate` shows that both packages ship `/usr/lib/libClp.so.1`, but they don't conflict to each other.
- what about this:
```
libGLESv2.so.2 libGLES-1.0_1
libGLESv2.so rpi-userland-0.0.0.0.20150907_1
libGLESv2.so atom-1.41.0_1
libGLESv2.so opera-55.0.2994.37_2
libGLESv2.so discord-0.0.7_1
libGLESv2.so keybase-desktop-3.1.2_1
libGLESv2.so wire-desktop-3.6.2885_1
libGLESv2.so Signal-Desktop-1.23.2_1
libGLESv2.so slack-desktop-3.4.2_1
```
in this case, only `libglvnd` actually ships `/usr/lib/libGLESv2.so`, the ones listed there only have this file in some non-system location, and it doesn't really look like a soname. Is this included here just to keep the linter quiet?
- this one looks ok (packages conflict)
```
libboinc_api.so.7 boinc-7.16.16_2
libboinc_api.so.7 boinc-nox-7.16.16_2
```
- etc.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] sorted common/shlibs to avoid merge/rebase conflicts
  2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
                   ` (7 preceding siblings ...)
  2021-04-04 23:17 ` gt7-void
@ 2021-04-05  0:29 ` Duncaen
  2021-04-05  0:29 ` Duncaen
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Duncaen @ 2021-04-05  0:29 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/issues/29965#issuecomment-813124670

Comment:
> > This is a better lint step (looking for duplicates) than failing on an unsorted list.
> 
> Is it easy to decide when a duplicate soname is ok or not?

If the package name is the same and it is the same as one of the edited templates could be a good first heuristic.
I don't think PRs should lint for things that are not related to the current package.

> > If someone forgets to sort it then we have 10 PRs all trying to reorder it,
> 
> Could we have a lint step checking that the file is sorted?

The problem is the lint step, forcing more things into the lint, especially things that don't belong to the PR in question just makes the changes larger and does not really help anyone.

> > affecting more lines than just adding a new soname in a random position instead of the end to avoid merge conflicts for newly added libraries.
> 
> Is there a policy about that? I understood sonames had to be placed at (near) the end of the file.

No, could be a "tip" instead of a policy, as it "might" reduce the work of the contributor, but it is not required. 

> The real pain for me was the experience of working with the branch in #29997, which has 7 commits for different packages which add sonames, and any rebase/editing of previous patches would cause a lot of pain. Of course, all this pain would mostly go away if I were to place each soname in a different random place in the file...

Right, its a good tip to mention, and people are doing it. Requiring a sorted file through a lint step is one work around with the mentioned downsides, randomly placing the additions is a simple workaround without any real downsides IMHO.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] sorted common/shlibs to avoid merge/rebase conflicts
  2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
                   ` (8 preceding siblings ...)
  2021-04-05  0:29 ` Duncaen
@ 2021-04-05  0:29 ` Duncaen
  2021-04-05  0:30 ` Duncaen
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Duncaen @ 2021-04-05  0:29 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/issues/29965#issuecomment-813124670

Comment:
> > This is a better lint step (looking for duplicates) than failing on an unsorted list.
> 
> Is it easy to decide when a duplicate soname is ok or not?

If the package name is the same and it is the same as one of the edited templates or its sub packages could be a good first heuristic.
I don't think PRs should lint for things that are not related to the current package.

> > If someone forgets to sort it then we have 10 PRs all trying to reorder it,
> 
> Could we have a lint step checking that the file is sorted?

The problem is the lint step, forcing more things into the lint, especially things that don't belong to the PR in question just makes the changes larger and does not really help anyone.

> > affecting more lines than just adding a new soname in a random position instead of the end to avoid merge conflicts for newly added libraries.
> 
> Is there a policy about that? I understood sonames had to be placed at (near) the end of the file.

No, could be a "tip" instead of a policy, as it "might" reduce the work of the contributor, but it is not required. 

> The real pain for me was the experience of working with the branch in #29997, which has 7 commits for different packages which add sonames, and any rebase/editing of previous patches would cause a lot of pain. Of course, all this pain would mostly go away if I were to place each soname in a different random place in the file...

Right, its a good tip to mention, and people are doing it. Requiring a sorted file through a lint step is one work around with the mentioned downsides, randomly placing the additions is a simple workaround without any real downsides IMHO.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] sorted common/shlibs to avoid merge/rebase conflicts
  2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
                   ` (9 preceding siblings ...)
  2021-04-05  0:29 ` Duncaen
@ 2021-04-05  0:30 ` Duncaen
  2022-05-17  2:14 ` github-actions
  2022-06-01  2:14 ` [ISSUE] [CLOSED] " github-actions
  12 siblings, 0 replies; 14+ messages in thread
From: Duncaen @ 2021-04-05  0:30 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/issues/29965#issuecomment-813124670

Comment:
> > This is a better lint step (looking for duplicates) than failing on an unsorted list.
> 
> Is it easy to decide when a duplicate soname is ok or not?

If the package name is the same and it is the same as one of the edited templates or its sub packages could be a good first heuristic.
I don't think PRs should lint for things that are not related to the current package.

> > If someone forgets to sort it then we have 10 PRs all trying to reorder it,
> 
> Could we have a lint step checking that the file is sorted?

The problem is the lint step, forcing more things into the lint, especially things that don't belong to the PR in question just makes the changes larger and does not really help anyone and would probably lead to people duplicating those "lint" fixes into their PRs.

> > affecting more lines than just adding a new soname in a random position instead of the end to avoid merge conflicts for newly added libraries.
> 
> Is there a policy about that? I understood sonames had to be placed at (near) the end of the file.

No, could be a "tip" instead of a policy, as it "might" reduce the work of the contributor, but it is not required. 

> The real pain for me was the experience of working with the branch in #29997, which has 7 commits for different packages which add sonames, and any rebase/editing of previous patches would cause a lot of pain. Of course, all this pain would mostly go away if I were to place each soname in a different random place in the file...

Right, its a good tip to mention, and people are doing it. Requiring a sorted file through a lint step is one work around with the mentioned downsides, randomly placing the additions is a simple workaround without any real downsides IMHO.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [RFC] sorted common/shlibs to avoid merge/rebase conflicts
  2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
                   ` (10 preceding siblings ...)
  2021-04-05  0:30 ` Duncaen
@ 2022-05-17  2:14 ` github-actions
  2022-06-01  2:14 ` [ISSUE] [CLOSED] " github-actions
  12 siblings, 0 replies; 14+ messages in thread
From: github-actions @ 2022-05-17  2:14 UTC (permalink / raw)
  To: ml

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

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/issues/29965#issuecomment-1128327603

Comment:
Issues become stale 90 days after last activity and are closed 14 days after that.  If this issue is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ISSUE] [CLOSED] [RFC] sorted common/shlibs to avoid merge/rebase conflicts
  2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
                   ` (11 preceding siblings ...)
  2022-05-17  2:14 ` github-actions
@ 2022-06-01  2:14 ` github-actions
  12 siblings, 0 replies; 14+ messages in thread
From: github-actions @ 2022-06-01  2:14 UTC (permalink / raw)
  To: ml

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

Closed issue by gt7-void on void-packages repository

https://github.com/void-linux/void-packages/issues/29965

Description:
The way new entries are added to `common/shlibs` (generally at the end) often results in merge conflicts (e.g. all PR for new packages that are open at a given time are incompatible since they all append at the same position).

It occurs to me that a way to minimize those conflicts would be to have `common/shlibs` be sorted by soname. In this way it becomes very unlikely that two commits conflict (they will only if they are lexicographically next to each other).

In addition, this would help to be explicit about repeated sonames and remove unnecessary duplicates.

This may be a little bit painful at the time the list is sorted, but then it's just a matter to keep it sorted (maybe some hook can check and complain about unsorted entries?).

The same applies to `common/options.description`, although that file is not updated so often, OTOH it's almost sorted (only 6 entries out of order).

A possible sort order would be to use:
```
$ sort common/shlibs -sk1,1
```
and
```
$ sort common/options.description -sk1,1 -t=
```

To see the kinds of soname repetitions:
```
$ sort common/shlibs -sk1,1 | awk '$1=="#" { next } $1==k&&first{print first; first="";d++} $1==k{print;x++} $1!=k{k=$1;first=$0;t++} END{print t, d, x}'
...
3866 61 92
```
I.e. out of 3866 different sonames, there are 61 repeated (61+92 times in total).

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-06-01  2:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-03  2:03 [ISSUE] [RFC] sorted common/shlibs to avoid merge/rebase conflicts gt7-void
2021-04-04 17:41 ` dkwo
2021-04-04 17:48 ` ericonr
2021-04-04 19:23 ` Duncaen
2021-04-04 19:24 ` Duncaen
2021-04-04 19:26 ` Duncaen
2021-04-04 19:26 ` Duncaen
2021-04-04 23:13 ` gt7-void
2021-04-04 23:17 ` gt7-void
2021-04-05  0:29 ` Duncaen
2021-04-05  0:29 ` Duncaen
2021-04-05  0:30 ` Duncaen
2022-05-17  2:14 ` github-actions
2022-06-01  2:14 ` [ISSUE] [CLOSED] " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).