Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jul 2014 21:03:11 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r362849 - head/Mk/Scripts
Message-ID:  <201407242103.s6OL3BpL094488@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Thu Jul 24 21:03:10 2014
New Revision: 362849
URL: http://svnweb.freebsd.org/changeset/ports/362849
QAT: https://qat.redports.org/buildarchive/r362849/

Log:
  - Fix check-plist so that its 'files in plist but missing from STAGEDIR' check
    does not incorrectly ignore plist items in %%DOCSDIR%% and %%EXAMPLESDIR%%.
    It was incorrectly ignoring these items when %%PORTDOCS%% or %%PORTEXAMPLES%%
    was missing. This manifested as a failure in 'make package' later when pkg(8)
    detected the missing files.
  
  With hat:	portmgr

Modified:
  head/Mk/Scripts/check-stagedir.sh

Modified: head/Mk/Scripts/check-stagedir.sh
==============================================================================
--- head/Mk/Scripts/check-stagedir.sh	Thu Jul 24 20:49:29 2014	(r362848)
+++ head/Mk/Scripts/check-stagedir.sh	Thu Jul 24 21:03:10 2014	(r362849)
@@ -252,13 +252,20 @@ setup_plist_seds() {
 
 	sed_plist_sub=$(echo "${PLIST_SUB_SED}" | /bin/sh ${SCRIPTSDIR}/plist_sub_sed_sort.sh)
 	unset PLIST_SUB_SED
-	sed_files="s!${PREFIX}/!!g; ${sed_plist_sub} ${sed_portdocsexamples} \
-	    /^share\/licenses/d;"
+	# Used for generate_plist
+	sed_files_gen="s!${PREFIX}/!!g; ${sed_plist_sub} \
+	    ${sed_portdocsexamples} /^share\/licenses/d;"
+	sed_dirs_gen="s!${PREFIX}/!!g; ${sed_plist_sub} s,^,@dirrmtry ,; \
+	    ${sed_portdocsexamples} \
+	    s!@dirrmtry \(/.*\)!@unexec rmdir \"\1\" >/dev/null 2>\&1 || :!; \
+	    /^@dirrmtry share\/licenses/d;"
 
+	# These prevent ignoring DOCS/EXAMPLES dirs with sed_portdocsexamples
+	sed_files="s!${PREFIX}/!!g; ${sed_plist_sub} /^share\/licenses/d;"
 	sed_dirs="s!${PREFIX}/!!g; ${sed_plist_sub} s,^,@dirrmtry ,; \
-	    ${sed_portdocsexamples} \
 	    s!@dirrmtry \(/.*\)!@unexec rmdir \"\1\" >/dev/null 2>\&1 || :!; \
 	    /^@dirrmtry share\/licenses/d;"
+
 }
 
 # Generate plist from staged files
@@ -269,7 +276,7 @@ generate_plist() {
 	find ${STAGEDIR} -type f -o -type l | sort | \
 	    sed -e "s,${STAGEDIR},," >${WRKDIR}/.staged-files
 	comm -13 ${WRKDIR}/.plist-files ${WRKDIR}/.staged-files | \
-	    sed -e "${sed_files}" \
+	    sed -e "${sed_files_gen}" \
 	     >>${WRKDIR}/.staged-plist || :
 
 	### HANDLE DIRS
@@ -282,7 +289,7 @@ generate_plist() {
 	    >${WRKDIR}/.staged-dirs-dfs-sorted
 	# Find all staged dirs and then sort them by depth-first (find -ds)
 	comm -13 ${WRKDIR}/.traced-dirs ${WRKDIR}/.staged-dirs-sorted \
-	    | sort_dfs | sed "${sed_dirs}" \
+	    | sort_dfs | sed "${sed_dirs_gen}" \
 	    >>${WRKDIR}/.staged-plist || :
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407242103.s6OL3BpL094488>