ci/eval/compare/maintainers: fix maintainer pings without meta.position

In a recent change, the path matching was simplified in maintainers.nix.
This revealed a pre-existing logic bug: Packages without `meta.position`
would get an empty string as their file name. The change would then
cause this empty string to always be matched, which lead to maintainer
pings for these packages in seemingly random PRs, when some of their
dependencies were changed.
This commit is contained in:
Wolfgang Walther
2025-10-22 21:06:53 +02:00
parent bd25fcc7b1
commit 6d564102b7

View File

@@ -72,7 +72,8 @@ let
(lib.unsafeGetAttrPos "src" drv) (lib.unsafeGetAttrPos "src" drv)
(lib.unsafeGetAttrPos "pname" drv) (lib.unsafeGetAttrPos "pname" drv)
(lib.unsafeGetAttrPos "version" drv) (lib.unsafeGetAttrPos "version" drv)
]
++ lib.optionals (drv.meta.position or null != null) [
# Use ".meta.position" for cases when most of the package is # Use ".meta.position" for cases when most of the package is
# defined in a "common" section and the only place where # defined in a "common" section and the only place where
# reference to the file with a derivation the "pos" # reference to the file with a derivation the "pos"
@@ -82,7 +83,7 @@ let
# "pkgs/tools/package-management/nix/default.nix:155" # "pkgs/tools/package-management/nix/default.nix:155"
# We transform it to the following: # We transform it to the following:
# { file = "pkgs/tools/package-management/nix/default.nix"; } # { file = "pkgs/tools/package-management/nix/default.nix"; }
{ file = lib.head (lib.splitString ":" (drv.meta.position or "")); } { file = lib.head (lib.splitString ":" drv.meta.position); }
] ]
) )
)); ));