Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 827287 - Please remove the 'max 69 chars' rule in the commit message
Summary: Please remove the 'max 69 chars' rule in the commit message
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-25 14:45 UTC by Agostino Sarubbo
Modified: 2021-11-26 20:14 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-11-25 14:45:58 UTC
The following code aims to find the package with a maximum chars lenght in the tree:

MAX="0" ; for PACKAGE in $( eix --only-names ) ; do LENGHT="${#PACKAGE}" ; test "${LENGHT}" -gt "${MAX}" && MAX="${LENGHT}" ; done ; echo "${MAX}"

The result is gnome-extra/gnome-shell-extension-control-blur-effect-on-lock-screen that has 68 chars, so it is really hard make a stabilization commit message for packages like this.

I'd suggest to increase the value if you think that remove the rule is not possible.
Comment 1 Agostino Sarubbo gentoo-dev 2021-11-25 14:56:24 UTC
s/80/69
Comment 2 Mike Gilbert gentoo-dev 2021-11-25 15:50:44 UTC
The exact check is this:

> # accept 69 overall or unit+50, in case of very long package names
> elif len(summary.strip()) > 69 and len(summary.split(":", 1)[-1]) > 50:
>     problems.append("summary line is too long (max 69 characters)")

Even in the case of a very long package name, you should still have 50 characters to work with.

Are you seeing some different behavior? That might be a bug.

Do you require more than 50 characters to summarize the changes?
Comment 3 Agostino Sarubbo gentoo-dev 2021-11-25 16:22:10 UTC
I opened the bug because Dakon says the same and I remember that I had this problem. However commit 703fb2c1ae9874719fb1e151da143de64738ea89 can be an example.
Comment 4 Ulrich Müller gentoo-dev 2021-11-25 16:32:16 UTC
These limits are defined in GLEP 66, and it doesn't say anything about the length of the package name. The rule there simply is "The summary line must not exceed 69 characters". Which isn't very practical for packages with long names.

@mgorny: Where does the number 69 originate from?

Some statistics for the length of package names (${CATEGORY}/${PN}):

   Mean:          20.3
   10-percentile: 14
   Median:        19
   90-percentile: 28
   95-percentile: 31
   98-percentile: 34
   99-percentile: 37

Shortest package names: dev-go/qr, dev-ml/re, net-fs/mc, x11-wm/i3 (9 chars)
Longest package name: gnome-extra/gnome-shell-extension-control-blur-effect-on-lock-screen (68 chars)

Alternatively, we could introduce a maximum length for package names. :)
Comment 5 Mike Gilbert gentoo-dev 2021-11-25 16:35:51 UTC
That commit has this summary:

> sys-kernel/vanilla-sources: Automated version bump to {4.4.281,4.9.280,4.14.244,4.19.204,5.4.141,5.10.59,5.13.11} - remove old.

I count 128 characters, 100 of which are after the colon.

The start of the message could be shortened, but even then we are looking at 60 characters just for the version list by itself.

I think the version list would need to be dropped, or the limits imposed by repoman (and GLEP 66) would need to be ignored.

Alternatively, you could split this into multiple commits, probably one for each version.
Comment 6 Mike Gilbert gentoo-dev 2021-11-25 16:45:27 UTC
Another possible work around would be to move the version list from the commit summary to the message body in cases where the list is very long. Something like this:

> sys-kernel/vanilla-sources: automated version bump
> 
> Added:
> 4.4.281
> 4.9.280
> 4.14.244
> 4.19.204
> 5.4.141
> 5.10.59
> 5.13.11
> 
> Removed:
> 1.2.3
> 1.2.4
> 1.2.5
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-11-25 16:52:00 UTC
(In reply to Ulrich Müller from comment #4)
> These limits are defined in GLEP 66, and it doesn't say anything about the
> length of the package name. The rule there simply is "The summary line must
> not exceed 69 characters". Which isn't very practical for packages with long
> names.

Yep, we made the repoman check more lenient outside the policy.  I don't think the GLEP really needs to concern itself with finding super exact rule that works for everyone — we just set a good recommendation and assume that there are good cases not to follow this policy to the word.

Of course, you could discuss if having super long package names is really a good idea in the first place.  If anything, it's pain for users to type them if they have to.

> @mgorny: Where does the number 69 originate from?

It's a de-facto standard in the git world.  I'm not sure if it affects git itself but e.g. the vim-syntax marks the summary line when it exceeds 69 chars, and GitHub cuts the summary at 69 chars.
Comment 8 Mike Gilbert gentoo-dev 2021-11-25 19:33:46 UTC
I feel like the current repoman behavior is a reasonable compromise that prevents people from writing overly verbose messages in the summary.

If people feel the need to bypass it, they can run repoman commit --force, or commit using git directly.

I would vote for WONTFIX on this.
Comment 9 Rolf Eike Beer archtester 2021-11-25 19:55:44 UTC
It works for me now, but it hasn't in the past, i.e. the partition check was introduced after I changed my script to not pass the 69 limit. I removed my special hacks and it works with longer descriptions fine just now.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-11-25 20:14:05 UTC
(In reply to Mike Gilbert from comment #5)
> Alternatively, you could split this into multiple commits, probably one for
> each version.

...and this is exactly what should happen and how most of us do things nowadays.
Comment 11 Fabian Groffen gentoo-dev 2021-11-26 07:17:25 UTC
can't we exclude the package name from the length calculation instead?
Comment 12 Ulrich Müller gentoo-dev 2021-11-26 08:10:31 UTC
(In reply to Fabian Groffen from comment #11)
> can't we exclude the package name from the length calculation instead?

But we do, see comment #2.

I vote for WONTFIX too.