Skip to content

[Backport release-25.05] check-meta: fix 'hasNoMaintainers'#422019

Merged
wolfgangwalther merged 1 commit intorelease-25.05from
backport-412184-to-release-25.05
Jul 3, 2025
Merged

[Backport release-25.05] check-meta: fix 'hasNoMaintainers'#422019
wolfgangwalther merged 1 commit intorelease-25.05from
backport-412184-to-release-25.05

Conversation

@nixpkgs-ci
Copy link
Contributor

@nixpkgs-ci nixpkgs-ci bot commented Jul 3, 2025

Bot-based backport to release-25.05, triggered by a label in #412184.

  • Before merging, ensure that this backport is acceptable for the release.
    • Even as a non-committer, if you find that it is not acceptable, leave a comment.

broken in 650eb61

Previously, if any of `meta.teams` or `meta.maintainers`
was undefined, `hasNoMaintainers` would return false,
suggesting e.g. bash had a maintainer - it does not.

The old logic before meta.teams was:
```nix
  hasNoMaintainers = attrs: attrs ? meta.maintainers && (length attrs.meta.maintainers) == 0;
```
This meant a package that did not define `meta.maintainers` would
appear maintained by this check, while a package with `meta.maintainers = []` would be listed as unmaintained.

This might have been a bug.
If it was not, that logic could be restored by prepending an extra check to the condition:
```nix
  (attrs ? meta.maintainers || attrs ? meta.teams) && (attrs.meta.maintainers or [] == []) && (attrs.meta.teams or [] == [])
```

I believe this makes little sense though. if no maintainer is listed, a package should be considered unmaintained.
If really desired, this can still be bypassed by setting `meta.maintainers = null;` or something.

(cherry picked from commit 1ae214f)
@nixpkgs-ci nixpkgs-ci bot mentioned this pull request Jul 3, 2025
13 tasks
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: stdenv Standard environment 4.workflow: backport This targets a stable branch labels Jul 3, 2025
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jul 3, 2025
@wolfgangwalther wolfgangwalther merged commit cde0c82 into release-25.05 Jul 3, 2025
30 of 32 checks passed
@wolfgangwalther wolfgangwalther deleted the backport-412184-to-release-25.05 branch July 3, 2025 12:47
@github-project-automation github-project-automation bot moved this to Done in Stdenv Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.workflow: backport This targets a stable branch 6.topic: stdenv Standard environment 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants