diff options
author | gdt <gdt@pkgsrc.org> | 2007-08-08 01:44:24 +0000 |
---|---|---|
committer | gdt <gdt@pkgsrc.org> | 2007-08-08 01:44:24 +0000 |
commit | f435245a772f518d13c0b02dbaa48b7ce141400c (patch) | |
tree | 97052521ef4aab749047e2c6bf52213d69aea83d /mk | |
parent | d5af98e19c0507f1dcfbf504857490c9319a2b74 (diff) | |
download | pkgsrc-f435245a772f518d13c0b02dbaa48b7ce141400c.tar.gz |
Improve previous: Per tnn@ suggestion, don't do pkg_admin unset unless
+INSTALLED_INFO is present, to avoid complaint from pkg_admin (see
pkg/36741). Separate tag removal into a separate target, and use
STEP_MSG and _PKG_DEBUG properly.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/flavor/pkg/replace.mk | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/mk/flavor/pkg/replace.mk b/mk/flavor/pkg/replace.mk index 02bb8bc5abd..649e69babc3 100644 --- a/mk/flavor/pkg/replace.mk +++ b/mk/flavor/pkg/replace.mk @@ -1,4 +1,4 @@ -# $NetBSD: replace.mk,v 1.10 2007/08/07 22:27:12 gdt Exp $ +# $NetBSD: replace.mk,v 1.11 2007/08/08 01:44:24 gdt Exp $ # # _flavor-replace: @@ -21,6 +21,7 @@ _flavor-replace: \ install-clean \ install \ replace-fixup-required-by \ + replace-fixup-installed-info \ .PHONY # _flavor-undo-replace: @@ -137,17 +138,13 @@ replace-preserve-required-by: .PHONY ### replace-fixup-required-by (PRIVATE) ###################################################################### ### replace-fixup-required-by fixes the +CONTENTS files of dependent -### packages to refer to the replacement package. It also removes -### unsafe_depends* and rebuild tags from this package. +### packages to refer to the replacement package. replace-fixup-required-by: .PHONY @${STEP_MSG} "Fixing @pkgdep entries in dependent packages." ${_PKG_SILENT}${_PKG_DEBUG} \ set -e; \ ${TEST} -f ${_REPLACE_OLDNAME_FILE} || exit 0; \ ${TEST} -f ${_REPLACE_NEWNAME_FILE} || exit 0; \ - for var in unsafe_depends rebuild; do \ - ${PKG_ADMIN} unset $$var ${PKGBASE}; \ - done; \ ${TEST} -f ${_REQUIRED_BY_FILE} || exit 0; \ oldname=`${CAT} ${_REPLACE_OLDNAME_FILE}`; \ newname=`${CAT} ${_REPLACE_NEWNAME_FILE}`; \ @@ -169,6 +166,20 @@ replace-fixup-required-by: .PHONY done ###################################################################### +### replace-fixup-installed-info (PRIVATE) +###################################################################### +### replace-fixup-installed-info removes unsafe_depends* and rebuild +### tags from this package. +### XXX pkg_admin should not complain on unset with no +INSTALLED_INFO. +replace-fixup-installed-info: .PHONY + @${STEP_MSG} "Removing unsafe_depends tag." + ${_PKG_SILENT}${_PKG_DEBUG} \ + for var in unsafe_depends rebuild; do \ + ${TEST} ! -f ${_PKG_DBDIR}/${PKGNAME}/+INSTALLED_INFO || \ + ${PKG_ADMIN} unset $$var ${PKGBASE}; \ + done + +###################################################################### ### replace-clean (PRIVATE) ###################################################################### ### replace-clean removes the state files for the "replace" target so |