diff options
author | jmmv <jmmv> | 2005-01-15 10:50:17 +0000 |
---|---|---|
committer | jmmv <jmmv> | 2005-01-15 10:50:17 +0000 |
commit | f6ff5cca1917224a810f7f3f8fd77daed79d0959 (patch) | |
tree | fa7637a4c3c7616a57db9396affbe70b37f8c097 /mk | |
parent | 07ceabb8edb5f61900696a1a13c625e58953d2ea (diff) | |
download | pkgsrc-f6ff5cca1917224a810f7f3f8fd77daed79d0959.tar.gz |
- Move all CHECK_FILES_SKIP definitions to a central place in bsd.pkg.mk.
- Move the previous block of code down in the file so that all used variables
are defined (specially PKG_SYSCONFDIR). Fixes a problem noticed by
kristerw@'s bulk build in comms/minicom.
- Ignore diff's return code, which aborts make in NetBSD 1.6.2. Also noticed
by kristerw@'s bulk build.
- Use full paths to do the checks, instead of relative to ${PREFIX}. Less
ambiguity. Matches should be turned into regular expressions that anchor
to a whole line (tried that, but found some problems).
- Turn CHECK_FILES to NO by default. As said in the previous point, there
are still some problems that have to be fixed and minor improvements to
be done. And I have no time to fix this ATM. Yes, this definitely needs
more testing. I'm sorry for all the noise. (But hey! you should set and
try this feature locally! ;-)
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.install.mk | 22 | ||||
-rw-r--r-- | mk/bsd.pkg.mk | 61 | ||||
-rw-r--r-- | mk/texinfo.mk | 7 |
3 files changed, 44 insertions, 46 deletions
diff --git a/mk/bsd.pkg.install.mk b/mk/bsd.pkg.install.mk index 54b7aed3d1b..80b9a874a85 100644 --- a/mk/bsd.pkg.install.mk +++ b/mk/bsd.pkg.install.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.install.mk,v 1.68 2005/01/14 18:02:38 jmmv Exp $ +# $NetBSD: bsd.pkg.install.mk,v 1.69 2005/01/15 10:50:17 jmmv Exp $ # # This Makefile fragment is included by bsd.pkg.mk to use the common # INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply: @@ -190,16 +190,6 @@ FILES_SUBST+= RCD_SCRIPTS_SHELL=${RCD_SCRIPTS_SHELL} MESSAGE_SUBST+= RCD_SCRIPTS_DIR=${RCD_SCRIPTS_DIR} MESSAGE_SUBST+= RCD_SCRIPTS_EXAMPLEDIR=${RCD_SCRIPTS_EXAMPLEDIR} -.if defined(PKG_DEVELOPER) && ${CHECK_FILES} == "YES" -. for e c in ${CONF_FILES} ${SUPPORT_FILES} -CHECK_FILES_SKIP+= ${c:S/${PREFIX}\///}/.pkgsrc -. endfor -. for e c u g m in ${CONF_FILES_PERMS} ${SUPPORT_FILES_PERMS} -CHECK_FILES_SKIP+= ${c:S/${PREFIX}\///}/.pkgsrc -. endfor -. undef e c u g m -.endif - # OWN_DIRS contains a list of directories for this package that should be # created and should attempt to be destroyed by the INSTALL/DEINSTALL # scripts. MAKE_DIRS is used the same way, but the package admin @@ -221,16 +211,6 @@ FILES_SUBST+= MAKE_DIRS_PERMS=${MAKE_DIRS_PERMS:Q} FILES_SUBST+= OWN_DIRS=${OWN_DIRS:Q} FILES_SUBST+= OWN_DIRS_PERMS=${OWN_DIRS_PERMS:Q} -.if defined(PKG_DEVELOPER) && ${CHECK_FILES} == "YES" -. for d in ${MAKE_DIRS} ${OWN_DIRS} -CHECK_FILES_SKIP+= ${d:S/${PREFIX}\///} -. endfor -. for d o g m in ${MAKE_DIRS_PERMS} ${OWN_DIRS_PERMS} -CHECK_FILES_SKIP+= ${d:S/${PREFIX}\///} -. endfor -. undef d o g m -.endif - # PKG_CREATE_USERGROUP indicates whether the INSTALL script should # automatically add any needed users/groups to the system using # useradd/groupadd. It is either YES or NO and defaults to YES. diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 04d6debb96d..7aa013060b9 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1562 2005/01/14 18:02:38 jmmv Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1563 2005/01/15 10:50:17 jmmv Exp $ # # This file is in the public domain. # @@ -105,7 +105,7 @@ MKCRYPTO?= yes CLEANDEPENDS?= NO DEINSTALLDEPENDS?= NO # add -R to pkg_delete REINSTALL?= NO # reinstall upon update -CHECK_FILES?= YES # run check-files after install +CHECK_FILES?= NO # run check-files after install CHECK_FILES_STRICT?= NO # make check-files very strict on errors CHECK_SHLIBS?= YES # run check-shlibs after install SHLIB_HANDLING?= YES # do automatic shared lib handling @@ -808,17 +808,6 @@ MESSAGE_SUBST+= PKGNAME=${PKGNAME} \ MESSAGE_SUBST_SED= ${MESSAGE_SUBST:S/=/}!/:S/$/!g/:S/^/ -e s!\\\${/} .endif -# A list of file names that will be skipped when analyzing file lists in -# the check-files target. This is useful to avoid getting errors triggered -# by changes in directories not really handled by pkgsrc. -CHECK_FILES_SKIP+= emul/linux/proc - -CHECK_FILES_SKIP_CMD= -.for name in ${CHECK_FILES_SKIP} -CHECK_FILES_SKIP_CMD+= | ${GREP} -v ${name} -.endfor -.undef name - # If pkgsrc is supposed to ensure that tests are run before installation # of the package, then the build targets should be "build test", otherwise # just "build" suffices. _PKGSRC_BUILD_TARGETS is used in the "all", @@ -3068,6 +3057,39 @@ show-shlib-type: . endif # USE_LANGUAGES .endif +# CHECK_FILES_SKIP is a list of file names that will be skipped when +# analyzing file lists in the check-files target. This is useful to +# avoid getting errors triggered by changes in directories not really +# handled by pkgsrc. +# +# We have to do this here, i.e., quite late in bsd.pkg.mk parsing, so +# that the variables used in them are defined. Otherwise we may get +# problems with the 'for' expressions. +.if defined(INFO_DIR) +CHECK_FILES_SKIP+= ${PREFIX}/${INFO_DIR}/dir +.endif +CHECK_FILES_SKIP+= ${PREFIX}/emul/linux/proc + +.for e c in ${CONF_FILES} ${SUPPORT_FILES} +CHECK_FILES_SKIP+= ${c}/.pkgsrc +.endfor +.for e c o g m in ${CONF_FILES_PERMS} ${SUPPORT_FILES_PERMS} +CHECK_FILES_SKIP+= ${c}/.pkgsrc +.endfor +.for d in ${MAKE_DIRS} ${OWN_DIRS} +CHECK_FILES_SKIP+= ${d} +.endfor +.for d o g m in ${MAKE_DIRS_PERMS} ${OWN_DIRS_PERMS} +CHECK_FILES_SKIP+= ${d} +.endfor +.undef e c d o g m + +CHECK_FILES_SKIP_CMD= +.for name in ${CHECK_FILES_SKIP} +CHECK_FILES_SKIP_CMD+= | ${GREP} -v ${name} +.endfor +.undef name + # Check if the generated PLIST matches the list of really installed files. # .PHONY: check-files @@ -3076,11 +3098,11 @@ check-files: ${_PKG_SILENT}${_PKG_DEBUG} \ errors=0; \ diff -u ${WRKDIR}/.prefix.pre ${WRKDIR}/.prefix.post \ - >${WRKDIR}/.files.diff; \ - ${GREP} '^+/' ${WRKDIR}/.files.diff | ${SED} 's|^+${PREFIX}/||' \ - | ${SORT} >${WRKDIR}/.files.added; \ - ${GREP} '^-/' ${WRKDIR}/.files.diff | ${SED} 's|^-${PREFIX}/||' \ - | ${SORT} >${WRKDIR}/.files.deleted; \ + >${WRKDIR}/.files.diff || ${TRUE}; \ + ${GREP} '^+/' ${WRKDIR}/.files.diff | ${SED} "s|^+||" | ${SORT} \ + >${WRKDIR}/.files.added; \ + ${GREP} '^-/' ${WRKDIR}/.files.diff | ${SED} "s|^-||" | ${SORT} \ + >${WRKDIR}/.files.deleted; \ if ${TEST} `${WC} -l ${WRKDIR}/.files.deleted | \ ${AWK} '{ print $$1; }'` -gt 0; \ then \ @@ -3089,7 +3111,8 @@ check-files: ${SED} "s|^| |" <${WRKDIR}/.files.deleted; \ errors=1; \ fi; \ - ${GREP} '^[A-Za-z]' ${PLIST} | ${SORT} >${WRKDIR}/.files.expected; \ + ${GREP} '^[A-Za-z]' ${PLIST} | ${SED} "s|^|${PREFIX}/|" | \ + ${SORT} >${WRKDIR}/.files.expected; \ if ! ${CMP} -s ${WRKDIR}/.files.expected ${WRKDIR}/.files.added; then \ echo "*** The PLIST does not match installed files!"; \ echo " The following files were not expected in ${PREFIX}:";\ diff --git a/mk/texinfo.mk b/mk/texinfo.mk index 6c95fc9aa24..12cd8394778 100644 --- a/mk/texinfo.mk +++ b/mk/texinfo.mk @@ -1,4 +1,4 @@ -# $NetBSD: texinfo.mk,v 1.26 2005/01/14 18:41:00 jmmv Exp $ +# $NetBSD: texinfo.mk,v 1.27 2005/01/15 10:50:18 jmmv Exp $ # # Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. # All rights reserved. @@ -56,11 +56,6 @@ USE_PKGINSTALL= YES # files and the Info dir file. INFO_DIR?= info -# The 'dir' file has to be skipped from the check-files functionality -# because it does not belong to any package (thus it is not registered -# in any PLIST). -CHECK_FILES_SKIP+= ${INFO_DIR}/dir - # Does the system have the install-info command? # Any version will fit (really?). _INSTALL_INFO= |