From owner-svn-ports-head@FreeBSD.ORG Thu Apr 17 14:42:45 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F16F963; Thu, 17 Apr 2014 14:42:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4170016ED; Thu, 17 Apr 2014 14:42:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HEgjWm087342; Thu, 17 Apr 2014 14:42:45 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HEgjQ2087341; Thu, 17 Apr 2014 14:42:45 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404171442.s3HEgjQ2087341@svn.freebsd.org> From: Bryan Drewery Date: Thu, 17 Apr 2014 14:42:45 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r351479 - head/Mk/Scripts X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 14:42:45 -0000 Author: bdrewery Date: Thu Apr 17 14:42:44 2014 New Revision: 351479 URL: http://svnweb.freebsd.org/changeset/ports/351479 QAT: https://qat.redports.org/buildarchive/r351479/ Log: - Document PLIST_SUB_SED= will disable PLIST_SUB hints - Avoid a redundant 'test -d' - Properly show %%PORTEXAMPLES%% %%PORTDOCS%% where needed - Avoid some forking for always-ignored files With hat: portmgr Modified: head/Mk/Scripts/check_leftovers.sh Modified: head/Mk/Scripts/check_leftovers.sh ============================================================================== --- head/Mk/Scripts/check_leftovers.sh Thu Apr 17 14:37:23 2014 (r351478) +++ head/Mk/Scripts/check_leftovers.sh Thu Apr 17 14:42:44 2014 (r351479) @@ -19,6 +19,9 @@ # stdout: # same -/+/M format, but with files substituted, without approved # whitelisted files, and hides any directories already in plist. +# +# The PLIST_SUB feature can be disabled by setting PLIST_SUB_SED= +# in environment. origin="$1" [ $# -eq 1 ] || { echo "Must supply ORIGIN as parameter" >&2; exit 1; } @@ -42,11 +45,6 @@ plistsub_sed=$(make -C ${portdir} -VPLIS tmpplist=$(make -C ${portdir} -VTMPPLIST) while read modtype path extra; do - ignore_path=0 - sub_path=$(echo "$path" | sed -e "s|^${PREFIX}/||" -e "${plistsub_sed}") - # If this is a directory, use @dirrm in output - [ -d "${path}" ] && sub_path="@dirrm ${sub_path}" - # Ignore everything from these files/directories case "${path}" in ${HOME:-/root}/.ccache/*|\ @@ -64,9 +62,26 @@ while read modtype path extra; do # fc-cache - skip for now /var/db/fontconfig/*) continue ;; esac + + ignore_path=0 + sub_path=$(echo "$path" | sed -e "s|^${PREFIX}/||" -e "${plistsub_sed}") + orig_sub_path="${sub_path}" + # If this is a directory, use @dirrm in output + is_dir=0 + if [ -d "${path}" ]; then + is_dir=1 + sub_path="@dirrm ${sub_path}" + fi + + # Handle PORTDOCS/PORTEXAMPLES/etc + case "${orig_sub_path}" in + %%DOCSDIR%%*) sub_path="%%PORTDOCS%%${sub_path}" ;; + %%EXAMPLESDIR%%*) sub_path="%%PORTEXAMPLES%%${sub_path}" ;; + esac + case $modtype in +) - if [ -d "${path}" ]; then + if [ ${is_dir} -eq 1 ]; then # home directory of users created case " ${homedirs} " in *\ ${path}\ *) continue ;;