diff options
author | rillig <rillig> | 2007-03-09 00:39:54 +0000 |
---|---|---|
committer | rillig <rillig> | 2007-03-09 00:39:54 +0000 |
commit | 3b3503d7a1a4896e5289672056038aca0151797f (patch) | |
tree | 008807eeeda864fdd459d9968b98336e030621b9 /mk/flavor | |
parent | aa2482e490d11b8ec0d308a8c903c4dd145678c6 (diff) | |
download | pkgsrc-3b3503d7a1a4896e5289672056038aca0151797f.tar.gz |
Renamed some more flavor-specific targets to have the form _flavor-*.
Split check-vulnerable into a general an a flavor-specific part, for
consistence with all the other targets.
Diffstat (limited to 'mk/flavor')
-rw-r--r-- | mk/flavor/README | 8 | ||||
-rw-r--r-- | mk/flavor/pkg/check.mk | 28 | ||||
-rw-r--r-- | mk/flavor/pkg/deinstall.mk | 15 | ||||
-rw-r--r-- | mk/flavor/pkg/depends.mk | 13 | ||||
-rw-r--r-- | mk/flavor/pkg/install.mk | 45 | ||||
-rw-r--r-- | mk/flavor/pkg/metadata.mk | 4 |
6 files changed, 50 insertions, 63 deletions
diff --git a/mk/flavor/README b/mk/flavor/README index aca6fc0a9eb..36ca1b2a8e8 100644 --- a/mk/flavor/README +++ b/mk/flavor/README @@ -45,12 +45,12 @@ XXX: Why isn't this variable in the previous list? The following make targets must be implemented: -* check-vulnerable -* deinstall-pkg +* _flavor-check-vulnerable +* _flavor-deinstall * show-depends -* depends-install +* _flavor-install-dependencies * bootstrap-depends -* register-pkg +* _flavor-register * tarup (XXX: This doesn't sound like a target that should be defined here.) * tarup-pkg diff --git a/mk/flavor/pkg/check.mk b/mk/flavor/pkg/check.mk index 8b4eddede20..f78515f44ff 100644 --- a/mk/flavor/pkg/check.mk +++ b/mk/flavor/pkg/check.mk @@ -1,20 +1,15 @@ -# $NetBSD: check.mk,v 1.2 2006/07/05 09:08:35 jlam Exp $ +# $NetBSD: check.mk,v 1.3 2007/03/09 00:39:54 rillig Exp $ +# -###################################################################### -### check-vulnerable (PUBLIC, pkgsrc/mk/check/check.mk) -###################################################################### -### check-vulnerable checks for any vulnerabilities in the package -### without needing audit-packages to be installed. -### -### XXX This should really be invoking audit-packages directly. Having -### XXX a separately maintained piece of code that inspects the -### XXX vulnerabilities database is poor. -### -.PHONY: check-vulnerable -check-vulnerable: -.if defined(ALLOW_VULNERABLE_PACKAGES) - @${DO_NADA} -.else +# _flavor-check-vulnerable: +# Checks for known vulnerabilities in the package without needing +# audit-packages to be installed. +# +# XXX: This should really be invoking audit-packages directly. +# Having separately maintained piece of code that inspects the +# vulnerabilities database is poor. +# +_flavor-check-vulnerable: .PHONY ${_PKG_SILENT}${_PKG_DEBUG} \ vulnfile=${PKGVULNDIR:Q}/pkg-vulnerabilities; \ if ${TEST} ! -f "$$vulnfile"; then \ @@ -51,4 +46,3 @@ check-vulnerable: ${ERROR_MSG} "Define ALLOW_VULNERABLE_PACKAGES if this package is absolutely essential"; \ ${FALSE}; \ fi -.endif diff --git a/mk/flavor/pkg/deinstall.mk b/mk/flavor/pkg/deinstall.mk index 08c9752361e..07485b89fd8 100644 --- a/mk/flavor/pkg/deinstall.mk +++ b/mk/flavor/pkg/deinstall.mk @@ -1,4 +1,4 @@ -# $NetBSD: deinstall.mk,v 1.2 2006/06/05 17:21:55 jlam Exp $ +# $NetBSD: deinstall.mk,v 1.3 2007/03/09 00:39:55 rillig Exp $ # Set the appropriate flags to pass to pkg_delete(1) based on the value # of DEINSTALLDEPENDS (see pkgsrc/mk/install/deinstall.mk). @@ -23,12 +23,13 @@ _PKG_ARGS_DEINSTALL+= -N -f # update w/o removing any files . endif .endif -###################################################################### -### deinstall-pkg (PRIVATE, pkgsrc/mk/install/deinstall.mk) -###################################################################### -### deinstall-pkg removes the package from the system. -### -deinstall-pkg: +# _flavor-deinstall: +# Removes a package from the system. +# +# See also: +# deinstall +# +_flavor-deinstall: ${_PKG_SILENT}${_PKG_DEBUG} \ found="`${PKG_INFO} -e \"${PKGNAME}\" || ${TRUE}`"; \ case "$$found" in \ diff --git a/mk/flavor/pkg/depends.mk b/mk/flavor/pkg/depends.mk index 03e37a7f684..bcf9ca99c4b 100644 --- a/mk/flavor/pkg/depends.mk +++ b/mk/flavor/pkg/depends.mk @@ -1,4 +1,4 @@ -# $NetBSD: depends.mk,v 1.21 2007/03/08 15:38:47 rillig Exp $ +# $NetBSD: depends.mk,v 1.22 2007/03/09 00:39:55 rillig Exp $ _DEPENDS_FILE= ${WRKDIR}/.depends _REDUCE_DEPENDS_CMD= ${SETENV} CAT=${CAT:Q} \ @@ -64,13 +64,10 @@ ${_DEPENDS_FILE}: done >> ${.TARGET}.tmp ${RUN} ${MV} ${.TARGET}.tmp ${.TARGET} -###################################################################### -### depends-install (PRIVATE, pkgsrc/mk/depends/depends.mk) -###################################################################### -### depends-install installs any missing dependencies. -### -.PHONY: depends-install -depends-install: ${_DEPENDS_FILE} +# _flavor-install-dependencies: +# Installs any missing dependencies. +# +_flavor-install-dependencies: .PHONY ${_DEPENDS_FILE} ${RUN} \ while read type pattern dir rest; do \ { [ "$$dir" ] && [ ! "$$rest" ]; } \ diff --git a/mk/flavor/pkg/install.mk b/mk/flavor/pkg/install.mk index 2ecd6273b87..3f2d9f6b76c 100644 --- a/mk/flavor/pkg/install.mk +++ b/mk/flavor/pkg/install.mk @@ -1,13 +1,22 @@ -# $NetBSD: install.mk,v 1.8 2006/07/07 21:24:28 jlam Exp $ +# $NetBSD: install.mk,v 1.9 2007/03/09 00:39:55 rillig Exp $ +# +# _flavor-check-conflicts: +# Checks for conflicts between the package and installed packages. +# +# XXX: Needs WRKDIR. +# +# _flavor-check-installed: +# Checks if the package (or an older version of it) is already +# installed on the system. +# +# XXX: Needs WRKDIR. +# +# _flavor-register: +# Populates the package database with the appropriate entries to +# register the package as being installed on the system. +# -###################################################################### -### install-check-conflicts (PRIVATE, pkgsrc/mk/install/install.mk) -###################################################################### -### install-check-conflicts checks for conflicts between the package -### and and installed packages. -### -.PHONY: install-check-conflicts -install-check-conflicts: error-check +_flavor-check-conflicts: .PHONY error-check ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${WRKDIR}/.CONFLICTS .for _conflict_ in ${CONFLICTS} ${_PKG_SILENT}${_PKG_DEBUG} \ @@ -26,14 +35,7 @@ install-check-conflicts: error-check ${ECHO} "Please remove conflicts first with pkg_delete(1)."; \ ${RM} -f ${WRKDIR}/.CONFLICTS -###################################################################### -### install-check-installed (PRIVATE, pkgsrc/mk/install/install.mk) -###################################################################### -### install-check-installed checks if the package (perhaps an older -### version) is already installed on the system. -### -.PHONY: install-check-installed -install-check-installed: error-check +_flavor-check-installed: .PHONY error-check ${_PKG_SILENT}${_PKG_DEBUG} \ found="`${_PKG_BEST_EXISTS} ${PKGWILDCARD:Q} || ${TRUE}`"; \ ${TEST} -n "$$found" || exit 0; \ @@ -47,20 +49,13 @@ install-check-installed: error-check ${ECHO} " - \"${MAKE} replace\" to replace only the package without"; \ ${ECHO} " re-linking dependencies, risking various problems." -###################################################################### -### register-pkg (PRIVATE, pkgsrc/mk/install/install.mk) -###################################################################### -### register-pkg populates the package database with the appropriate -### entries to register the package as being installed on the system. -### _REGISTER_DEPENDENCIES= \ ${SETENV} PKG_DBDIR=${_PKG_DBDIR:Q} \ AWK=${TOOLS_AWK:Q} \ PKG_ADMIN=${PKG_ADMIN_CMD:Q} \ ${SH} ${PKGSRCDIR}/mk/flavor/pkg/register-dependencies -.PHONY: register-pkg -register-pkg: generate-metadata ${_COOKIE.depends} +_flavor-register: .PHONY generate-metadata ${_COOKIE.depends} @${STEP_MSG} "Registering installation for ${PKGNAME}" ${_PKG_SILENT}${_PKG_DEBUG}${RM} -fr ${_PKG_DBDIR}/${PKGNAME} ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${_PKG_DBDIR}/${PKGNAME} diff --git a/mk/flavor/pkg/metadata.mk b/mk/flavor/pkg/metadata.mk index 77f9368990d..fecdd62efc1 100644 --- a/mk/flavor/pkg/metadata.mk +++ b/mk/flavor/pkg/metadata.mk @@ -1,4 +1,4 @@ -# $NetBSD: metadata.mk,v 1.14 2007/03/02 09:08:33 wiz Exp $ +# $NetBSD: metadata.mk,v 1.15 2007/03/09 00:39:55 rillig Exp $ ###################################################################### ### The targets below are all PRIVATE. @@ -233,7 +233,7 @@ ${_MESSAGE_FILE}: ${MESSAGE_SRC} # PKGSRC_MESSAGE_RECIPIENTS. # .PHONY: install-display-message -register-pkg: install-display-message +_flavor-register: install-display-message install-display-message: ${_MESSAGE_FILE} @${STEP_MSG} "Please note the following:" @${ECHO_MSG} "" |