pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/46570 (infelicities in pkglint)



The following reply was made to PR pkg/46570; it has been noted by GNATS.

From: David Holland <dholland-pbugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/46570 (infelicities in pkglint)
Date: Sun, 12 Jun 2016 00:53:47 +0000

 On Sun, Jun 12, 2016 at 12:40:01AM +0000, David Holland wrote:
  >  2. It objects if the include guard in a bl3 file doesn't match the
  >  package name when the package name contains characters not legal in
  >  make identifiers. It ought to fold the package name into a legal make
  >  identifier before comparing, transforming - and + and . and probably a
  >  few other things to _.
  >  
  >  For example: x11/gtk+extra, where it wants the include guard symbol to
  >  be GTK+EXTRA.
 
 patch for this:
 
 Index: files/buildlink3.go
 ===================================================================
 RCS file: /cvsroot/pkgsrc/pkgtools/pkglint/files/buildlink3.go,v
 retrieving revision 1.5
 diff -u -p -r1.5 buildlink3.go
 --- files/buildlink3.go	5 Jun 2016 11:24:32 -0000	1.5
 +++ files/buildlink3.go	12 Jun 2016 00:51:59 -0000
 @@ -83,7 +83,11 @@ func ChecklinesBuildlink3Mk(mklines *MkL
  	exp.ExpectEmptyLine()
  
  	// See pkgtools/createbuildlink/files/createbuildlink, keyword PKGUPPER
 -	ucPkgbase := strings.ToUpper(strings.Replace(pkgbase, "-", "_", -1))
 +
 +	tmp := strings.Replace(pkgbase, "-", "_", -1)
 +	tmp = strings.Replace(tmp, "+", "_", -1)
 +	tmp = strings.Replace(tmp, ".", "_", -1)
 +	ucPkgbase := strings.ToUpper(tmp)
  	if ucPkgbase != pkgupper && !containsVarRef(pkgbase) {
  		pkgupperLine.Errorf("Package name mismatch between multiple-inclusion guard %q (expected %q) and package name %q (from %s).",
  			pkgupper, ucPkgbase, pkgbase, pkgbaseLine.ReferenceFrom(pkgupperLine))
 
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index