app-portage/eclass-manpages: add a check for the @ECLASS name #537392
authorMike Frysinger <vapier@gentoo.org>
Fri, 14 Aug 2015 04:03:18 +0000 (00:03 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 14 Aug 2015 04:05:35 +0000 (00:05 -0400)
app-portage/eclass-manpages/files/eclass-to-manpage.awk

index 11ece1f82a7e13e4489d5792fd1d38bdb797cdcb..ee428107500466555f5d2f82e3ca9075de48e6ad 100644 (file)
@@ -145,6 +145,10 @@ function handle_eclass() {
        desc = ""
        example = ""
 
+       # Sanity check the eclass name. #537392
+       if (eclass !~ /[.]eclass$/)
+               fail(eclass ": @ECLASS name is missing a '.eclass' suffix")
+
        # first the man page header
        print ".\\\" -*- coding: utf-8 -*-"
        print ".\\\" ### DO NOT EDIT THIS FILE"