ports/153596: [PATCH] ports-mgmt/portlint: improve the patch in ports/136465

TAKATSU Tomonari tota at FreeBSD.org
Sat Jan 1 08:20:11 UTC 2011


>Number:         153596
>Category:       ports
>Synopsis:       [PATCH] ports-mgmt/portlint: improve the patch in ports/136465
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 01 08:20:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     TAKATSU Tomonari
>Release:        FreeBSD 8.1-RELEASE amd64
>Organization:
none (private)
>Environment:
System: FreeBSD photon.local.lan 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010
>Description:
PORTRUBY_MODEXAMPLES substitution problem is still left (see How-To-Repeat).

Considering PLIST_SUB in bsd.port.mk Revision 1.666 line 1664 to 1680,
I have improved the patch in ports/136465 as below table.

----------------------------------------------------------------------
  PLIST_SUB                              XXXDIR                        
----------------------------------------------------------------------
  PORTDOCS        DOCSDIR, RUBY_DOCDIR, RUBY_MODDOCDIR
  PORTEXAMPLES    EXAMPLESDIR, RUBY_EXAMPLESDIR, RUBY_MODEXAMPLESDIR  
  PORTDATA        DATADIR
----------------------------------------------------------------------

Port maintainer (marcus at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
# cd /usr/ports/textproc/ruby-rttool
# portlint -a
WARN: /usr/ports/textproc/ruby-rttool/pkg-plist: [13]: Do not mix %%PORTEXAMPLES%% with %%RUBY_MODEXAMPLESDIR%%. Use '%%PORTRUBY_MODEXAMPLES%%%%RUBY_MODEXAMPLESDIR%%/easiest.html' instead and update Makefile accordingly.
WARN: /usr/ports/textproc/ruby-rttool/pkg-plist: [14]: Do not mix %%PORTEXAMPLES%% with %%RUBY_MODEXAMPLESDIR%%. Use '%%PORTRUBY_MODEXAMPLES%%%%RUBY_MODEXAMPLESDIR%%/easiest.rt' instead and update Makefile accordingly.
WARN: /usr/ports/textproc/ruby-rttool/pkg-plist: [15]: Do not mix %%PORTEXAMPLES%% with %%RUBY_MODEXAMPLESDIR%%. Use '%%PORTRUBY_MODEXAMPLES%%%%RUBY_MODEXAMPLESDIR%%/escape.html' instead and update Makefile accordingly.
WARN: /usr/ports/textproc/ruby-rttool/pkg-plist: [16]: Do not mix %%PORTEXAMPLES%% with %%RUBY_MODEXAMPLESDIR%%. Use '%%PORTRUBY_MODEXAMPLES%%%%RUBY_MODEXAMPLESDIR%%/escape.rt' instead and update Makefile accordingly.
WARN: /usr/ports/textproc/ruby-rttool/pkg-plist: [17]: Do not mix %%PORTEXAMPLES%% with %%RUBY_MODEXAMPLESDIR%%. Use '%%PORTRUBY_MODEXAMPLES%%%%RUBY_MODEXAMPLESDIR%%/rttest.html' instead and update Makefile accordingly.
WARN: /usr/ports/textproc/ruby-rttool/pkg-plist: [18]: Do not mix %%PORTEXAMPLES%% with %%RUBY_MODEXAMPLESDIR%%. Use '%%PORTRUBY_MODEXAMPLES%%%%RUBY_MODEXAMPLESDIR%%/rttest.rd' instead and update Makefile accordingly.
WARN: /usr/ports/textproc/ruby-rttool/pkg-plist: [19]: Do not mix %%PORTEXAMPLES%% with %%RUBY_MODEXAMPLESDIR%%. Use '%%PORTRUBY_MODEXAMPLES%%%%RUBY_MODEXAMPLESDIR%%/test1.html' instead and update Makefile accordingly.
WARN: /usr/ports/textproc/ruby-rttool/pkg-plist: [20]: Do not mix %%PORTEXAMPLES%% with %%RUBY_MODEXAMPLESDIR%%. Use '%%PORTRUBY_MODEXAMPLES%%%%RUBY_MODEXAMPLESDIR%%/test1.rt' instead and update Makefile accordingly.
WARN: /usr/ports/textproc/ruby-rttool/pkg-plist: [21]: Do not mix %%PORTEXAMPLES%% with %%RUBY_MODEXAMPLESDIR%%. Use '%%PORTRUBY_MODEXAMPLES%%%%RUBY_MODEXAMPLESDIR%%/test2.html' instead and update Makefile accordingly.
WARN: /usr/ports/textproc/ruby-rttool/pkg-plist: [22]: Do not mix %%PORTEXAMPLES%% with %%RUBY_MODEXAMPLESDIR%%. Use '%%PORTRUBY_MODEXAMPLES%%%%RUBY_MODEXAMPLESDIR%%/test2.rt' instead and update Makefile accordingly.
WARN: /usr/ports/textproc/ruby-rttool/pkg-plist: [23]: Do not mix %%PORTEXAMPLES%% with %%RUBY_MODEXAMPLESDIR%%. Use '%%PORTRUBY_MODEXAMPLES%%@dirrm %%RUBY_MODEXAMPLESDIR%%' instead and update Makefile accordingly.
FATAL: /usr/ports/textproc/ruby-rttool/distinfo: [1]: unsupported checksum algorithm found: MD5.
1 fatal error and 11 warnings found.
# sed -i '' -e 's|%%PORTEXAMPLES%%|%%PORTRUBY_MODEXAMPLES%%|g' pkg-plist
# sed -i '' -e '1d' distinfo
# portlint -a
looks fine.
# make install
# make deinstall
===>  Deinstalling for textproc/ruby-rttool
===>   Deinstalling ruby18-rttool-1.0.3
pkg_delete: file '/usr/local/%%PORTRUBY_MODEXAMPLES%%share/examples/ruby18/rt/easiest.html' doesn't exist
pkg_delete: file '/usr/local/%%PORTRUBY_MODEXAMPLES%%share/examples/ruby18/rt/easiest.rt' doesn't exist
pkg_delete: file '/usr/local/%%PORTRUBY_MODEXAMPLES%%share/examples/ruby18/rt/escape.html' doesn't exist
pkg_delete: file '/usr/local/%%PORTRUBY_MODEXAMPLES%%share/examples/ruby18/rt/escape.rt' doesn't exist
pkg_delete: file '/usr/local/%%PORTRUBY_MODEXAMPLES%%share/examples/ruby18/rt/rttest.html' doesn't exist
pkg_delete: file '/usr/local/%%PORTRUBY_MODEXAMPLES%%share/examples/ruby18/rt/rttest.rd' doesn't exist
pkg_delete: file '/usr/local/%%PORTRUBY_MODEXAMPLES%%share/examples/ruby18/rt/test1.html' doesn't exist
pkg_delete: file '/usr/local/%%PORTRUBY_MODEXAMPLES%%share/examples/ruby18/rt/test1.rt' doesn't exist
pkg_delete: file '/usr/local/%%PORTRUBY_MODEXAMPLES%%share/examples/ruby18/rt/test2.html' doesn't exist
pkg_delete: file '/usr/local/%%PORTRUBY_MODEXAMPLES%%share/examples/ruby18/rt/test2.rt' doesn't exist
pkg_delete: file '/usr/local/%%PORTRUBY_MODEXAMPLES%%@dirrm share/examples/ruby18/rt' doesn't exist
pkg_delete: couldn't entirely delete package (perhaps the packing list is
incorrectly specified?)

>Fix:

--- portlint-2.13.2.patch begins here ---
Index: src/portlint.pl
===================================================================
RCS file: /home/ncvs/ports/ports-mgmt/portlint/src/portlint.pl,v
retrieving revision 1.117
diff -u -u -r1.117 portlint.pl
--- src/portlint.pl	4 Dec 2010 07:33:14 -0000	1.117
+++ src/portlint.pl	1 Jan 2011 06:20:07 -0000
@@ -699,8 +699,13 @@
 	# E.g., %%PORTDOCS%%%%RUBY_MODDOCDIR%% will be OK because there is
 	# no %%PORTRUBY_MODDOC%% substitution.
 	my %check_xxxdir_ok = (
+		"DOCS"	 		=> "DOCS",
+		"EXAMPLES" 		=> "EXAMPLES",
+		"DATA" 			=> "DATA",
+		"RUBY_DOC" 		=> "DOCS",
+		"RUBY_EXAMPLES"		=> "EXAMPLES",
 		"RUBY_MODDOC" 		=> "DOCS",
-		"RUBY_MODEXAMPLES"	=> "DOCS",
+		"RUBY_MODEXAMPLES"	=> "EXAMPLES",
 	);
 
 	open(IN, "< $file") || return 0;
@@ -925,7 +930,7 @@
 
 		if ($_ =~ m{^%%PORT(\w+)%%(.*?)%%(\w+)DIR%%(.*)$} and $1 ne $3) {
 			&perror("WARN", $file, $., "Do not mix %%PORT$1%% with %%$3DIR%%. ".
-				"Use '%%PORT$3%%$2%%$3DIR%%$4' instead and update Makefile ".
+				"Use '%%PORT$check_xxxdir_ok{$3}%%$2%%$3DIR%%$4' instead and update Makefile ".
 				"accordingly.") unless (defined($check_xxxdir_ok{$3}) and
 					$check_xxxdir_ok{$3} eq $1);
 		}
--- portlint-2.13.2.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list