From 0eaeae1b81985056a75af25237e4662c042bf3d1 Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Fri, 19 Jan 2024 18:32:44 +0100 Subject: [PATCH] Allow duplicate DESCR files in main/wip --- v23/pkglint.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/v23/pkglint.go b/v23/pkglint.go index debce11c..d427655e 100644 --- a/v23/pkglint.go +++ b/v23/pkglint.go @@ -940,12 +940,20 @@ func (ip *InterPackage) CheckDuplicateDescr(filename CurrPath) { h := sha1.Sum(b) existing := descr[h] descr[h] = append(existing, filename) - if len(existing) == 0 { + var duplicate CurrPath + for _, e := range existing { + if e.Dir().Base() == filename.Dir().Base() && + G.Pkgsrc.IsWip(filename) != G.Pkgsrc.IsWip(e) { + continue + } + duplicate = e + } + if duplicate.IsEmpty() { return } line := NewLineWhole(filename) line.Warnf("DESCR file is the same as %q.", - line.Rel(existing[len(existing)-1])) + line.Rel(duplicate)) line.Explain( "Each DESCR file should be unique,", "to help the user choose the most appropriate package.",