diff options
author | kristerw <kristerw> | 2005-09-30 21:36:45 +0000 |
---|---|---|
committer | kristerw <kristerw> | 2005-09-30 21:36:45 +0000 |
commit | e043c14b0a5ded01ff63c614221ae5c9c8d42954 (patch) | |
tree | 18f7436bebb07036db84f70dd5ad6643921527cf /mk/bsd.pkg.check.mk | |
parent | 74f7bffd5a1ec37ef145d633748334ba13a7ecd7 (diff) | |
download | pkgsrc-e043c14b0a5ded01ff63c614221ae5c9c8d42954.tar.gz |
It is confusing to report the files mentioned in the PLIST but filtered
out due to CHECK_FILES_SKIP as "The following files are in the PLIST but
not in ${PREFIX}:". Report those files separately.
Diffstat (limited to 'mk/bsd.pkg.check.mk')
-rw-r--r-- | mk/bsd.pkg.check.mk | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/mk/bsd.pkg.check.mk b/mk/bsd.pkg.check.mk index 332e62b5ce4..2e28f08062d 100644 --- a/mk/bsd.pkg.check.mk +++ b/mk/bsd.pkg.check.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.check.mk,v 1.17 2005/09/25 00:34:12 kristerw Exp $ +# $NetBSD: bsd.pkg.check.mk,v 1.18 2005/09/30 21:36:45 kristerw Exp $ # # This Makefile fragment is included by bsd.pkg.mk and defines the # relevant variables and targets for the various install-time "check" @@ -204,6 +204,8 @@ ${_CHECK_FILES_COOKIE.prefix}: f_deleted=${WRKDIR:Q}/.files.deleted; \ f_expected=${WRKDIR:Q}/.files.expected; \ f_missing=${WRKDIR:Q}/.files.missing; \ + f_missing_real=${WRKDIR:Q}/.files.missing.real; \ + f_missing_skip=${WRKDIR:Q}/.files.missing.skip; \ f_extra=${WRKDIR:Q}/.files.extra; \ ${DIFF} -u ${_CHECK_FILES_PRE.prefix} ${_CHECK_FILES_POST.prefix} \ > ${WRKDIR}/.files.diff || ${TRUE}; \ @@ -214,10 +216,10 @@ ${_CHECK_FILES_COOKIE.prefix}: ${GREP} '^[A-Za-z]' ${PLIST} | ${SED} "s|^|${PREFIX}/|" | ${SORT} \ > $$f_expected; \ ${DIFF} -u ${WRKDIR}/.files.expected ${WRKDIR}/.files.added \ - | ${GREP} '^-[^-]' | ${SED} "s|^-| |" \ + | ${GREP} '^-[^-]' | ${SED} "s|^-||" \ > $$f_missing; \ - ${DIFF} -u ${WRKDIR}/.files.expected ${WRKDIR}/.files.added\ - | ${GREP} '^+[^+]' | ${SED} "s|^+| |" \ + ${DIFF} -u ${WRKDIR}/.files.expected ${WRKDIR}/.files.added \ + | ${GREP} '^+[^+]' | ${SED} "s|^+||" \ > $$f_extra; \ if ${AWK} 'END { if (NR == 0) exit 1; }' $$f_deleted; then \ { ${ECHO} "*** The following files have been deleted" \ @@ -228,20 +230,33 @@ ${_CHECK_FILES_COOKIE.prefix}: if ${AWK} 'END { if (NR == 0) exit 1; }' $$f_missing $$f_extra; \ then \ { ${ECHO} "*** The PLIST does not match installed files!"; \ - if ${AWK} 'END { if (NR == 0) exit 1; }' $$f_missing; then \ + ${CAT} $$f_missing | ${_CHECK_FILES_SKIP_FILTER} \ + > $$f_missing_real; \ + ${DIFF} -u $$f_missing $$f_missing_real \ + | ${GREP} '^-[^-]' | ${SED} "s|^-||" \ + > $$f_missing_skip; \ + if ${AWK} 'END { if (NR == 0) exit 1; }' $$f_missing_real; \ + then \ ${ECHO} "*** The following files are in the" \ "PLIST but not in ${PREFIX}:"; \ - ${CAT} $$f_missing; \ + ${SED} "s|^| |" $$f_missing_real; \ fi; \ if ${AWK} 'END { if (NR == 0) exit 1; }' $$f_extra; then \ ${ECHO} "*** The following files are in" \ "${PREFIX} but not in the PLIST:"; \ - ${CAT} $$f_extra; \ + ${SED} "s|^| |" $$f_extra; \ + fi; \ + if ${AWK} 'END { if (NR == 0) exit 1; }' $$f_missing_skip; \ + then \ + ${ECHO} "*** The following files are in both" \ + "the PLIST and CHECK_FILES_SKIP:"; \ + ${SED} "s|^| |" $$f_missing_skip; \ fi; \ } >> ${.TARGET}; \ fi; \ ${RM} -f ${WRKDIR}/.files.diff $$f_added $$f_deleted \ - $$f_expected $$f_missing $$f_extra + $$f_expected $$f_missing $$f_extra \ + $$f_missing_real $$f_missing_skip .endif ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${.TARGET} |