pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/flavor/pkg Improve previous: Per tnn@ suggestion, d...
details: https://anonhg.NetBSD.org/pkgsrc/rev/0c4b47c9fb9e
branches: trunk
changeset: 531862:0c4b47c9fb9e
user: gdt <gdt%pkgsrc.org@localhost>
date: Wed Aug 08 01:44:24 2007 +0000
description:
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:
mk/flavor/pkg/replace.mk | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diffs (57 lines):
diff -r b8ca98236fc8 -r 0c4b47c9fb9e mk/flavor/pkg/replace.mk
--- a/mk/flavor/pkg/replace.mk Tue Aug 07 22:27:12 2007 +0000
+++ b/mk/flavor/pkg/replace.mk Wed Aug 08 01:44:24 2007 +0000
@@ -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 @@
install-clean \
install \
replace-fixup-required-by \
+ replace-fixup-installed-info \
.PHONY
# _flavor-undo-replace:
@@ -137,17 +138,13 @@
### 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 @@
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
Home |
Main Index |
Thread Index |
Old Index