From f325deb023e4e2fb9197004be1b3da738680429c Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 29 Mar 2023 10:49:17 +0200 Subject: pkg/subsystem: recognize more maintainers Earlier we only took maintainers if there was just one MAINTAINERS record, but that was a very severe limitation. Let's try a more elaborate approach. It's also not perfect, but allows us to extract many more maintainers, while keeping false positives at zero. Group raw MAINTAINER records by their T: entries. If there's just one set of T: values per group mailing list, take the intersection of M: entries from there. --- pkg/subsystem/linux/maintainers.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/subsystem/linux/maintainers.go') diff --git a/pkg/subsystem/linux/maintainers.go b/pkg/subsystem/linux/maintainers.go index 2f4d63003..90ca79bef 100644 --- a/pkg/subsystem/linux/maintainers.go +++ b/pkg/subsystem/linux/maintainers.go @@ -24,6 +24,7 @@ type maintainersRecord struct { regexps []string lists []string maintainers []string + trees []string } func parseLinuxMaintainers(content io.Reader) ([]*maintainersRecord, error) { @@ -128,6 +129,8 @@ func applyProperty(record *maintainersRecord, property *recordProperty) error { return err } record.lists = append(record.lists, value) + case "T": + record.trees = append(record.trees, property.value) } return nil } -- cgit mrf-deployment