git: d1349053a7cb - main - MOVEDlint: check for flavored version of a port

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Tue, 23 Aug 2022 12:16:53 UTC
The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d1349053a7cbc231d1eec15719858035f5118db7

commit d1349053a7cbc231d1eec15719858035f5118db7
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2022-08-23 12:15:28 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2022-08-23 12:16:46 +0000

    MOVEDlint: check for flavored version of a port
    
    There is no need to document when a port has been flavored or new
    flavor has been added, check if someone added such a line, and prevent
    the person it is not needed
---
 Tools/scripts/MOVEDlint.awk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Tools/scripts/MOVEDlint.awk b/Tools/scripts/MOVEDlint.awk
index ac85287a0a0d..f9d9ef35bb8d 100755
--- a/Tools/scripts/MOVEDlint.awk
+++ b/Tools/scripts/MOVEDlint.awk
@@ -115,7 +115,11 @@ $3 !~ /^20[0-3][0-9]-[01][0-9]-[0-3][0-9]$/ {
             # No else because the port is there but does not have the flavor,
             # so it should be ok.
         } else {
-            printf "%5d: %s must be marked as resurrected\n", NR, $1 | sort
+	    if ($2 ~ $1 "@") {
+                printf "%5d: %s is a flavor of %s, the line should be removed\n", NR, $2, $1 | sort
+	    } else {
+                printf "%5d: %s must be marked as resurrected\n", NR, $1 | sort
+            }
         }
     }