Bug 199509 - Mk/Scripts/check_leftovers.sh hardcodes CCACHE_DIR
Summary: Mk/Scripts/check_leftovers.sh hardcodes CCACHE_DIR
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bryan Drewery
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-18 07:02 UTC by Enji Cooper
Modified: 2015-11-08 08:23 UTC (History)
2 users (show)

See Also:
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer freebsd_triage 2015-04-18 07:02:30 UTC
CCACHE_DIR can be tuned in bsd.port.mk, based on the value passed in on the command-line/environment. It should be fixed to use the value determined in bsd.port.mk like so, instead of hardcoding the assumption that it's either $HOME/.ccache or /root/.ccache:

$ svn diff ./ports/Mk/Scripts/check_leftovers.sh
Index: ports/Mk/Scripts/check_leftovers.sh
===================================================================
--- ports/Mk/Scripts/check_leftovers.sh (revision 476341)
+++ ports/Mk/Scripts/check_leftovers.sh (.../ports/Mk/Scripts/check_leftovers.sh)       (working copy)
@@ -40,6 +40,7 @@
 else
        LOCALBASE=$(make -C ${portdir} -VLOCALBASE)
 fi
+ccache_dir=$(make -C ${portsdir} -VCCACHE_DIR)
 homedirs=$(awk -F: -v users=$(make -C ${portdir} -V USERS|sed -e 's, ,|,g;/^$/d') 'users && $1 ~ users {print $9}' ${PORTSDIR}/UIDs|sort -u|sed -e "s|/usr/local|${PREFIX}|")
 plistsub_sed=$(make -C ${portdir} -VPLIST_SUB_SED | /bin/sh ${PORTSDIR}/Mk/Scripts/plist_sub_sed_sort.sh)
 tmpplist=$(make -C ${portdir} -VTMPPLIST)
@@ -47,7 +48,7 @@
 while read modtype path extra; do
        # Ignore everything from these files/directories
        case "${path}" in
-               ${HOME:-/root}/.ccache/*|/root/.ccache/*|\
+               ${ccache_dir}|\
                /compat/linux/proc/*|\
                /dev/*|\
                /etc/make.conf.bak|\
Comment 1 Bryan Drewery freebsd_committer freebsd_triage 2015-11-06 20:13:25 UTC
${portdir} is spelled wrong
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-11-06 20:19:32 UTC
A commit references this bug:

Author: bdrewery
Date: Fri Nov  6 20:18:36 UTC 2015
New revision: 400957
URL: https://svnweb.freebsd.org/changeset/ports/400957

Log:
  Don't hardcode CCACHE_DIR.

  PR:		199509
  Submitted by:	ngie (based on)
  Sponsored by:	EMC / Isilon Storage Division
  With hat:	portmgr

Changes:
  head/Mk/Scripts/check_leftovers.sh
Comment 3 Enji Cooper freebsd_committer freebsd_triage 2015-11-06 20:57:47 UTC
(In reply to Bryan Drewery from comment #1)

Yeah... thanks >_>...
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-08 08:23:25 UTC
Assign to committer that resolved.

Does this need to be MFH'd?