Skip to content

xlint: do not allow $pkgname in changelog/distfiles#351

Open
hosaka wants to merge 1 commit intoleahneukirchen:masterfrom
hosaka:pkgname-in-changelog-distfiles
Open

xlint: do not allow $pkgname in changelog/distfiles#351
hosaka wants to merge 1 commit intoleahneukirchen:masterfrom
hosaka:pkgname-in-changelog-distfiles

Conversation

@hosaka
Copy link
Copy Markdown

@hosaka hosaka commented Mar 11, 2026

Closes #350

@classabbyamp
Copy link
Copy Markdown
Collaborator

this has been a style contention between maintainers, we should probably get a wider consensus

@classabbyamp
Copy link
Copy Markdown
Collaborator

classabbyamp commented Mar 11, 2026

that said, I am in favour of this, and probably also a check for $homepage in the same variables, and check for $pkgname in homepage

@hosaka
Copy link
Copy Markdown
Author

hosaka commented Mar 11, 2026

If it is something that prevents PRs from being merged, it should be added xlint, so the contributors get notified early on. I think there is already a scan for homepage= that does not allow any variables. I can add a $homepage check to changelog/distfiles.

@hosaka hosaka force-pushed the pkgname-in-changelog-distfiles branch from b147ccb to f761c5c Compare March 11, 2026 05:39
@hosaka
Copy link
Copy Markdown
Author

hosaka commented Mar 11, 2026

distfiles=${pkgname} is the most frequently used variation: https://github.com/search?q=repo%3Avoid-linux%2Fvoid-packages+%2Fdistfiles%3D.*\%24\{%3Fpkgname\}%3F%2F&type=code

@ahesford
Copy link
Copy Markdown
Contributor

I agree with the prohibition on variables in changelog, because copying the URL is a useful operation on that field.

I am opposed to a prohibition on $homepage in distfiles. We already require the use of at least one variable, $version, for dynamism. Thus, the distfiles URL is never useful outside of the interpreted shell environment. In many cases, especially for GitHub sources, forced expansion in this field results in extensive repetition for no useful benefit. Although some maintainers disagree with me, I am not sure a consensus has been reached.

I have no strong opinion on prohibiting $pkgname in distfiles. It does not usually save much repetition and this level of dynamism is usually not useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xlint: do not allow ${pkgname} in changelog/distfiles

3 participants