| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: bsd.pkg.update.mk,v 1.20 2010/02/25 02:08:33 joerg Exp $ | | 1 | # $NetBSD: bsd.pkg.update.mk,v 1.21 2010/06/15 04:14:26 dholland Exp $ |
2 | # | | 2 | # |
3 | # This Makefile fragment is included by bsd.pkg.mk and contains the targets | | 3 | # This Makefile fragment is included by bsd.pkg.mk and contains the targets |
4 | # and variables for "make update". | | 4 | # and variables for "make update". |
5 | # | | 5 | # |
6 | # There is no documentation on what "update" actually does. This is merely | | 6 | # There is no documentation on what "update" actually does. This is merely |
7 | # an attempt to separate the magic into a separate module that can be | | 7 | # an attempt to separate the magic into a separate module that can be |
8 | # reimplemented later. | | 8 | # reimplemented later. |
9 | # | | 9 | # |
10 | | | 10 | |
11 | NOCLEAN?= NO # don't clean up after update | | 11 | NOCLEAN?= NO # don't clean up after update |
12 | REINSTALL?= NO # reinstall upon update | | 12 | REINSTALL?= NO # reinstall upon update |
13 | | | 13 | |
14 | # UPDATE_TARGET is the target that is invoked when updating packages during | | 14 | # UPDATE_TARGET is the target that is invoked when updating packages during |
| @@ -41,26 +41,27 @@ update-create-ddir: ${_DDIR} | | | @@ -41,26 +41,27 @@ update-create-ddir: ${_DDIR} |
41 | RESUMEUPDATE?= YES | | 41 | RESUMEUPDATE?= YES |
42 | CLEAR_DIRLIST?= NO | | 42 | CLEAR_DIRLIST?= NO |
43 | | | 43 | |
44 | update: | | 44 | update: |
45 | @${PHASE_MSG} "Resuming update for ${PKGNAME}" | | 45 | @${PHASE_MSG} "Resuming update for ${PKGNAME}" |
46 | . if ${REINSTALL} != "NO" && ${UPDATE_TARGET} != "replace" | | 46 | . if ${REINSTALL} != "NO" && ${UPDATE_TARGET} != "replace" |
47 | ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL | | 47 | ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL |
48 | . endif | | 48 | . endif |
49 | .else | | 49 | .else |
50 | RESUMEUPDATE?= NO | | 50 | RESUMEUPDATE?= NO |
51 | CLEAR_DIRLIST?= YES | | 51 | CLEAR_DIRLIST?= YES |
52 | | | 52 | |
53 | update: | | 53 | update: |
| | | 54 | ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} check-vulnerable |
54 | ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} update-create-ddir | | 55 | ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} update-create-ddir |
55 | . if ${UPDATE_TARGET} != "replace" | | 56 | . if ${UPDATE_TARGET} != "replace" |
56 | ${RUN} if ${PKG_INFO} -qe ${PKGBASE}; then \ | | 57 | ${RUN} if ${PKG_INFO} -qe ${PKGBASE}; then \ |
57 | ${RECURSIVE_MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL \ | | 58 | ${RECURSIVE_MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL \ |
58 | || (${RM} ${_DDIR} && ${FALSE}); \ | | 59 | || (${RM} ${_DDIR} && ${FALSE}); \ |
59 | fi | | 60 | fi |
60 | . endif | | 61 | . endif |
61 | .endif | | 62 | .endif |
62 | ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} KEEP_WRKDIR=YES DEPENDS_TARGET=${DEPENDS_TARGET:Q} | | 63 | ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} KEEP_WRKDIR=YES DEPENDS_TARGET=${DEPENDS_TARGET:Q} |
63 | ${RUN} \ | | 64 | ${RUN} \ |
64 | [ ! -s ${_DDIR} ] || for dep in `${CAT} ${_DDIR}` ; do \ | | 65 | [ ! -s ${_DDIR} ] || for dep in `${CAT} ${_DDIR}` ; do \ |
65 | (if cd ../.. && cd "$${dep}" ; then \ | | 66 | (if cd ../.. && cd "$${dep}" ; then \ |
66 | ${PHASE_MSG} "Installing in $${dep}" && \ | | 67 | ${PHASE_MSG} "Installing in $${dep}" && \ |