head 1.27; access; symbols pkgsrc-2023Q4:1.27.0.32 pkgsrc-2023Q4-base:1.27 pkgsrc-2023Q3:1.27.0.30 pkgsrc-2023Q3-base:1.27 pkgsrc-2023Q2:1.27.0.28 pkgsrc-2023Q2-base:1.27 pkgsrc-2023Q1:1.27.0.26 pkgsrc-2023Q1-base:1.27 pkgsrc-2022Q4:1.27.0.24 pkgsrc-2022Q4-base:1.27 pkgsrc-2022Q3:1.27.0.22 pkgsrc-2022Q3-base:1.27 pkgsrc-2022Q2:1.27.0.20 pkgsrc-2022Q2-base:1.27 pkgsrc-2022Q1:1.27.0.18 pkgsrc-2022Q1-base:1.27 pkgsrc-2021Q4:1.27.0.16 pkgsrc-2021Q4-base:1.27 pkgsrc-2021Q3:1.27.0.14 pkgsrc-2021Q3-base:1.27 pkgsrc-2021Q2:1.27.0.12 pkgsrc-2021Q2-base:1.27 pkgsrc-2021Q1:1.27.0.10 pkgsrc-2021Q1-base:1.27 pkgsrc-2020Q4:1.27.0.8 pkgsrc-2020Q4-base:1.27 pkgsrc-2020Q3:1.27.0.6 pkgsrc-2020Q3-base:1.27 pkgsrc-2020Q2:1.27.0.4 pkgsrc-2020Q2-base:1.27 pkgsrc-2020Q1:1.27.0.2 pkgsrc-2020Q1-base:1.27 pkgsrc-2019Q4:1.26.0.52 pkgsrc-2019Q4-base:1.26 pkgsrc-2019Q3:1.26.0.48 pkgsrc-2019Q3-base:1.26 pkgsrc-2019Q2:1.26.0.46 pkgsrc-2019Q2-base:1.26 pkgsrc-2019Q1:1.26.0.44 pkgsrc-2019Q1-base:1.26 pkgsrc-2018Q4:1.26.0.42 pkgsrc-2018Q4-base:1.26 pkgsrc-2018Q3:1.26.0.40 pkgsrc-2018Q3-base:1.26 pkgsrc-2018Q2:1.26.0.38 pkgsrc-2018Q2-base:1.26 pkgsrc-2018Q1:1.26.0.36 pkgsrc-2018Q1-base:1.26 pkgsrc-2017Q4:1.26.0.34 pkgsrc-2017Q4-base:1.26 pkgsrc-2017Q3:1.26.0.32 pkgsrc-2017Q3-base:1.26 pkgsrc-2017Q2:1.26.0.28 pkgsrc-2017Q2-base:1.26 pkgsrc-2017Q1:1.26.0.26 pkgsrc-2017Q1-base:1.26 pkgsrc-2016Q4:1.26.0.24 pkgsrc-2016Q4-base:1.26 pkgsrc-2016Q3:1.26.0.22 pkgsrc-2016Q3-base:1.26 pkgsrc-2016Q2:1.26.0.20 pkgsrc-2016Q2-base:1.26 pkgsrc-2016Q1:1.26.0.18 pkgsrc-2016Q1-base:1.26 pkgsrc-2015Q4:1.26.0.16 pkgsrc-2015Q4-base:1.26 pkgsrc-2015Q3:1.26.0.14 pkgsrc-2015Q3-base:1.26 pkgsrc-2015Q2:1.26.0.12 pkgsrc-2015Q2-base:1.26 pkgsrc-2015Q1:1.26.0.10 pkgsrc-2015Q1-base:1.26 pkgsrc-2014Q4:1.26.0.8 pkgsrc-2014Q4-base:1.26 pkgsrc-2014Q3:1.26.0.6 pkgsrc-2014Q3-base:1.26 pkgsrc-2014Q2:1.26.0.4 pkgsrc-2014Q2-base:1.26 pkgsrc-2014Q1:1.26.0.2 pkgsrc-2014Q1-base:1.26 pkgsrc-2013Q4:1.24.0.4 pkgsrc-2013Q4-base:1.24 pkgsrc-2013Q3:1.24.0.2 pkgsrc-2013Q3-base:1.24 pkgsrc-2013Q2:1.23.0.18 pkgsrc-2013Q2-base:1.23 pkgsrc-2013Q1:1.23.0.16 pkgsrc-2013Q1-base:1.23 pkgsrc-2012Q4:1.23.0.14 pkgsrc-2012Q4-base:1.23 pkgsrc-2012Q3:1.23.0.12 pkgsrc-2012Q3-base:1.23 pkgsrc-2012Q2:1.23.0.10 pkgsrc-2012Q2-base:1.23 pkgsrc-2012Q1:1.23.0.8 pkgsrc-2012Q1-base:1.23 pkgsrc-2011Q4:1.23.0.6 pkgsrc-2011Q4-base:1.23 pkgsrc-2011Q3:1.23.0.4 pkgsrc-2011Q3-base:1.23 pkgsrc-2011Q2:1.23.0.2 pkgsrc-2011Q2-base:1.23 pkgsrc-2011Q1:1.22.0.6 pkgsrc-2011Q1-base:1.22 pkgsrc-2010Q4:1.22.0.4 pkgsrc-2010Q4-base:1.22 pkgsrc-2010Q3:1.22.0.2 pkgsrc-2010Q3-base:1.22 pkgsrc-2010Q2:1.21.0.2 pkgsrc-2010Q2-base:1.21 pkgsrc-2010Q1:1.20.0.2 pkgsrc-2010Q1-base:1.20 pkgsrc-2009Q4:1.18.0.6 pkgsrc-2009Q4-base:1.18 pkgsrc-2009Q3:1.18.0.4 pkgsrc-2009Q3-base:1.18 pkgsrc-2009Q2:1.18.0.2 pkgsrc-2009Q2-base:1.18 pkgsrc-2009Q1:1.17.0.2 pkgsrc-2009Q1-base:1.17 pkgsrc-2008Q4:1.15.0.10 pkgsrc-2008Q4-base:1.15 pkgsrc-2008Q3:1.15.0.8 pkgsrc-2008Q3-base:1.15 cube-native-xorg:1.15.0.6 cube-native-xorg-base:1.15 pkgsrc-2008Q2:1.15.0.4 pkgsrc-2008Q2-base:1.15 cwrapper:1.15.0.2 pkgsrc-2008Q1:1.14.0.2 pkgsrc-2008Q1-base:1.14 pkgsrc-2007Q4:1.13.0.4 pkgsrc-2007Q4-base:1.13 pkgsrc-2007Q3:1.13.0.2 pkgsrc-2007Q3-base:1.13 pkgsrc-2007Q2:1.7.0.8 pkgsrc-2007Q2-base:1.7 pkgsrc-2007Q1:1.7.0.6 pkgsrc-2007Q1-base:1.7 jlam-pkgviews:1.7.0.4 jlam-pkgviews-base:1.7 pkgsrc-2006Q4:1.7.0.2 pkgsrc-2006Q4-base:1.7 pkgsrc-2006Q3:1.6.0.2 pkgsrc-2006Q3-base:1.6 pkgsrc-2006Q2:1.5.0.2 pkgsrc-2006Q2-base:1.5; locks; strict; comment @# @; 1.27 date 2020.01.11.19.30.50; author rillig; state Exp; branches; next 1.26; commitid xsmTdVRlbxbj9jSB; 1.26 date 2014.02.14.07.14.23; author obache; state Exp; branches; next 1.25; commitid HPCJc2XgIN7cp2px; 1.25 date 2014.02.14.06.47.24; author obache; state Exp; branches; next 1.24; commitid IkymDgGrdvsKf2px; 1.24 date 2013.08.31.20.17.37; author rillig; state Exp; branches; next 1.23; commitid ChulBoqQ00aC6E3x; 1.23 date 2011.05.04.09.49.34; author obache; state Exp; branches; next 1.22; 1.22 date 2010.07.03.04.24.14; author darcy; state Exp; branches; next 1.21; 1.21 date 2010.06.15.04.14.26; author dholland; state Exp; branches; next 1.20; 1.20 date 2010.02.25.02.08.33; author joerg; state Exp; branches; next 1.19; 1.19 date 2010.02.19.14.27.36; author joerg; state Exp; branches; next 1.18; 1.18 date 2009.05.16.01.27.30; author joerg; state Exp; branches; next 1.17; 1.17 date 2009.03.07.19.36.31; author joerg; state Exp; branches; next 1.16; 1.16 date 2009.03.05.23.07.15; author joerg; state Exp; branches; next 1.15; 1.15 date 2008.04.07.13.31.15; author joerg; state Exp; branches; next 1.14; 1.14 date 2008.02.07.21.36.13; author rillig; state Exp; branches; next 1.13; 1.13 date 2007.09.07.16.47.05; author rillig; state Exp; branches; next 1.12; 1.12 date 2007.09.07.11.14.10; author rillig; state Exp; branches; next 1.11; 1.11 date 2007.09.07.10.57.35; author obache; state Exp; branches; next 1.10; 1.10 date 2007.09.07.10.38.44; author rillig; state Exp; branches; next 1.9; 1.9 date 2007.09.06.08.28.01; author rillig; state Exp; branches; next 1.8; 1.8 date 2007.09.06.08.24.12; author rillig; state Exp; branches; next 1.7; 1.7 date 2006.10.05.12.56.27; author rillig; state Exp; branches; next 1.6; 1.6 date 2006.07.27.21.46.45; author jlam; state Exp; branches; next 1.5; 1.5 date 2006.06.07.10.04.03; author tron; state Exp; branches; next 1.4; 1.4 date 2006.06.05.22.49.44; author jlam; state Exp; branches; next 1.3; 1.3 date 2006.06.05.17.21.54; author jlam; state Exp; branches; next 1.2; 1.2 date 2006.06.04.08.25.53; author jlam; state Exp; branches; next 1.1; 1.1 date 2006.06.03.23.11.42; author jlam; state Exp; branches; next ; desc @@ 1.27 log @mk/bsd.pkg.update.mk: fix indentation @ text @# $NetBSD: bsd.pkg.update.mk,v 1.26 2014/02/14 07:14:23 obache Exp $ # # This Makefile fragment is included by bsd.pkg.mk and contains the targets # and variables for "make update". # # There is no documentation on what "update" actually does. This is merely # an attempt to separate the magic into a separate module that can be # reimplemented later. # NOCLEAN?= NO # don't clean up after update REINSTALL?= NO # reinstall upon update # UPDATE_TARGET is the target that is invoked when updating packages during # a "make update". This variable is user-settable within /etc/mk.conf. # .if !defined(UPDATE_TARGET) . if defined(DEPENDS_TARGET) && (${DEPENDS_TARGET} == "update") . if make(package) || make(package-install) UPDATE_TARGET= package-install . else UPDATE_TARGET= install . endif . else UPDATE_TARGET= ${DEPENDS_TARGET} . endif .endif # The 'update' target can be used to update a package and all # currently installed packages that depend upon this package. _DDIR= ${WRKDIR}/.DDIR _DLIST= ${WRKDIR}/.DLIST .PHONY: update-create-ddir update-create-ddir: ${_DDIR} .PHONY: update .if !target(update) . if exists(${_DDIR}) RESUMEUPDATE?= YES CLEAR_DIRLIST?= NO update: @@${PHASE_MSG} "Resuming update for ${PKGNAME}" . if ${REINSTALL} != "NO" && ${UPDATE_TARGET} != "replace" ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL . endif . else RESUMEUPDATE?= NO CLEAR_DIRLIST?= YES update: ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} check-vulnerable ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} update-create-ddir . if ${UPDATE_TARGET} != "replace" ${RUN} if ${PKG_INFO} -qe ${PKGBASE}; then \ ${RECURSIVE_MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL \ || (${RM} ${_DDIR} && ${FALSE}); \ fi . endif . endif ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} KEEP_WRKDIR=YES DEPENDS_TARGET=${DEPENDS_TARGET:Q} ${RUN} \ [ ! -s ${_DDIR} ] || for dep in `${CAT} ${_DDIR}` ; do \ (if cd ../.. && cd "$${dep}" ; then \ ${PHASE_MSG} "Installing in $${dep}" && \ if [ "(" "${RESUMEUPDATE}" = "NO" -o \ "${REINSTALL}" != "NO" ")" -a \ "${UPDATE_TARGET}" != "replace" ] ; then \ ${RECURSIVE_MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES; \ fi && \ ${RECURSIVE_MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} \ _PKGSRC_UPDATE_CHECK=yes \ DEPENDS_TARGET=${DEPENDS_TARGET:Q} ; \ else \ ${PHASE_MSG} "Skipping removed directory $${dep}"; \ fi) ; \ done . if ${NOCLEAN} == "NO" ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} clean-update CLEAR_DIRLIST=YES . endif .PHONY: clean-update clean-update: ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} update-create-ddir ${RUN} \ if [ -s ${_DDIR} ] ; then \ for dep in `${CAT} ${_DDIR}` ; do \ (if cd ../.. && cd "$${dep}" ; then \ ${RECURSIVE_MAKE} ${MAKEFLAGS} clean ; \ else \ ${PHASE_MSG} "Skipping removed directory $${dep}";\ fi) ; \ done ; \ fi . if ${CLEAR_DIRLIST} != "NO" ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} clean . else ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} clean update-dirlist DIRLIST="`${CAT} ${_DDIR}`" PKGLIST="`${CAT} ${_DLIST}`" @@${WARNING_MSG} "preserved leftover directory list. Your next" @@${WARNING_MSG} "\`\`${MAKE} update'' may fail. It is advised to use" @@${WARNING_MSG} "\`\`${MAKE} update REINSTALL=YES'' instead!" . endif .endif # !target(update) .PHONY: update-dirlist update-dirlist: ${RUN} ${MKDIR} ${WRKDIR} .if defined(PKGLIST) . for __tmp__ in ${PKGLIST} ${RUN} ${ECHO} >>${_DLIST} "${__tmp__}" . endfor .endif .if defined(DIRLIST) . for __tmp__ in ${DIRLIST} ${RUN} ${ECHO} >>${_DDIR} "${__tmp__}" . endfor .endif ${_DDIR}: ${_DLIST} ${RUN} pkgs=`${CAT} ${_DLIST}`; \ if [ "$$pkgs" ]; then ${PKG_INFO} -Q PKGPATH $$pkgs; fi > ${_DDIR} ${_DLIST}: ${WRKDIR} ${RUN} if ${PKG_INFO} -qe "${PKGWILDCARD}"; then \ ${PKG_INFO} -qr "${PKGWILDCARD}" > ${_DLIST}; \ else \ ${TOUCH} ${_DLIST}; \ fi @ 1.26 log @fixes last commit, delete too aggressively :( @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.25 2014/02/14 06:47:24 obache Exp $ d40 1 a40 1 .if exists(${_DDIR}) d46 1 a46 1 . if ${REINSTALL} != "NO" && ${UPDATE_TARGET} != "replace" d48 2 a49 2 . endif .else d56 1 a56 1 . if ${UPDATE_TARGET} != "replace" d61 1 a62 1 .endif d80 1 a80 1 .if ${NOCLEAN} == "NO" d82 1 a82 1 .endif d98 1 a98 1 .if ${CLEAR_DIRLIST} != "NO" d100 1 a100 1 .else d105 1 a105 1 .endif @ 1.25 log @Prevent to force creation binary package in ${PACKAGES} for the case installing dependency with USE_DESTDIR=yes unless creating binary packages. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.24 2013/08/31 20:17:37 rillig Exp $ d19 1 a19 1 . make(package) || make(package-install) @ 1.24 log @The pkg_info command is an internal detail and therefore should be hidden behind the ${RUN} macro, just like all the other commands. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.23 2011/05/04 09:49:34 obache Exp $ d19 1 a19 1 . if ${_USE_DESTDIR} != "no" || make(package) || make(package-install) @ 1.23 log @Also set `package-install' to UPDATE_TARGET/DEPENDS_TARGET if current target is `package-install', to indirect dependency also create binary package with `make package' or `make package-install'. should fix PR#44857. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.22 2010/07/03 04:24:14 darcy Exp $ d130 1 a130 1 if ${PKG_INFO} -qe "${PKGWILDCARD}"; then \ @ 1.22 log @The "-p" option is redundant as it is included in the MKDIR variable. As discussed with joerg@@. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.21 2010/06/15 04:14:26 dholland Exp $ d19 1 a19 1 . if ${_USE_DESTDIR} != "no" || make(package) @ 1.21 log @Apply my fix for PR 35091: do a check-vulnerable step first in "make update", so if it's going to fail because of a known vulnerability it does so before uninstalling anything. I've been carrying this patch for some three years with no ill effects. Ok by agc@@. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.20 2010/02/25 02:08:33 joerg Exp $ d112 1 a112 1 ${RUN} ${MKDIR} -p ${WRKDIR} @ 1.20 log @If using "make package", default to recursion with package-install. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.19 2010/02/19 14:27:36 joerg Exp $ d54 1 @ 1.19 log @Garbage collect support for old pkg_install versions. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.18 2009/05/16 01:27:30 joerg Exp $ d19 1 a19 1 . if ${_USE_DESTDIR} != "no" a20 2 . elif make(package) UPDATE_TARGET= package @ 1.18 log @Don't require pkg_delete or pkg_info -r to list packages in full topological sort for the make update list. This breaks naturally when new dependencies are introduced that are also in the list scheduled for later installation. Reported by David Holland. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.17 2009/03/07 19:36:31 joerg Exp $ a129 1 .if ${PKGTOOLS_VERSION} >= 20090302 a135 12 .elif ${PKGTOOLS_VERSION} >= 20090225 ${_DLIST}: ${WRKDIR} ${RUN}echo "Please update to pkg_install-20090302 or later" 2>&1 ${RUN}exit 1 .else ${_DLIST}: ${WRKDIR} ${RUN} \ ${PKG_DELETE} -n "${PKGWILDCARD}" 2>&1 \ | ${GREP} '^ ' \ | ${AWK} '{ l[NR]=$$0 } END { for (i=NR;i>0;--i) print l[i] }' \ > ${_DLIST} .endif @ 1.17 log @make update might be called without having the package installed, so check for the presence before trying to extract dependencies. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.16 2009/03/05 23:07:15 joerg Exp $ d75 1 @ 1.16 log @Use pkg_info -r if present and fall back to pkg_delete for pkg_install before 20090225. Intermediate versions get an explicit error. The building of the recursive dependency was broken as the new pkg_delete would stop without recursing and the target dependend on that behavior. Reported by David Holland. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.15 2008/04/07 13:31:15 joerg Exp $ d131 5 a135 1 ${PKG_INFO} -qr "${PKGWILDCARD}" > ${_DLIST} @ 1.15 log @Prefer package-destdir as default for update with USE_DESTDIR. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.14 2008/02/07 21:36:13 rillig Exp $ d129 8 a136 2 # Note that "pkg_info -qR" wouldn't work here, since it lists only the # packages that require this package directly. d143 1 @ 1.14 log @Replaced _PKG_SILENT and _PKG_DEBUG with RUN. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.13 2007/09/07 16:47:05 rillig Exp $ d19 3 a21 1 . if make(package) @ 1.13 log @Replaced ${_PKG_SILENT}${_PKG_DEBUG} with ${RUN}, since it is shorter. Removed unnecessary braces around a single pipeline. Also removed the ||true, since awk is very unlikely to fail. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.12 2007/09/07 11:14:10 rillig Exp $ d63 1 a63 1 ${_PKG_SILENT}${_PKG_DEBUG} \ d86 1 a86 1 ${_PKG_SILENT}${_PKG_DEBUG} \ @ 1.12 log @pkg_info -qR doesn't give the same results as pkg_delete -n. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.11 2007/09/07 10:57:35 obache Exp $ d47 1 a47 2 ${_PKG_SILENT}${_PKG_DEBUG} \ ${RECURSIVE_MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL d54 1 a54 1 ${_PKG_SILENT}${_PKG_DEBUG}${RECURSIVE_MAKE} ${MAKEFLAGS} update-create-ddir d56 1 a56 1 ${_PKG_SILENT}${_PKG_DEBUG}if ${PKG_INFO} -qe ${PKGBASE}; then \ d62 1 a62 2 ${_PKG_SILENT}${_PKG_DEBUG} \ ${RECURSIVE_MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} KEEP_WRKDIR=YES DEPENDS_TARGET=${DEPENDS_TARGET:Q} d79 1 a79 2 ${_PKG_SILENT}${_PKG_DEBUG} \ ${RECURSIVE_MAKE} ${MAKEFLAGS} clean-update CLEAR_DIRLIST=YES d85 1 a85 1 ${_PKG_SILENT}${_PKG_DEBUG}${RECURSIVE_MAKE} ${MAKEFLAGS} update-create-ddir d97 1 a97 1 ${_PKG_SILENT}${_PKG_DEBUG}${RECURSIVE_MAKE} ${MAKEFLAGS} clean d99 1 a99 2 ${_PKG_SILENT}${_PKG_DEBUG} \ ${RECURSIVE_MAKE} ${MAKEFLAGS} clean update-dirlist DIRLIST="`${CAT} ${_DDIR}`" PKGLIST="`${CAT} ${_DLIST}`" d110 1 a110 1 ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} -p ${WRKDIR} d113 1 a113 1 ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} >>${_DLIST} "${__tmp__}" d118 1 a118 1 ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} >>${_DDIR} "${__tmp__}" d130 5 a134 5 ${_PKG_SILENT}${_PKG_DEBUG} \ { ${PKG_DELETE} -n "${PKGWILDCARD}" 2>&1 | \ ${GREP} '^ ' | \ ${AWK} '{ l[NR]=$$0 } END { for (i=NR;i>0;--i) print l[i] }' \ || ${TRUE}; } > ${_DLIST} @ 1.11 log @Correct typo, really fixes PR 36940. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.10 2007/09/07 10:38:44 rillig Exp $ d131 2 @ 1.10 log @pkg_info needs at least one package name. Fixes PR 36940. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.9 2007/09/06 08:28:01 rillig Exp $ d128 1 a128 1 ${RUN} pkgs=`${CAT _DLIST}`; \ @ 1.9 log @One line of code can say as much as ten. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.8 2007/09/06 08:24:12 rillig Exp $ d128 2 a129 1 ${RUN} ${PKG_INFO} -Q PKGPATH `${CAT} ${_DLIST}` > ${_DDIR} @ 1.8 log @Why do things in a simple way when there is a complicated alternative? @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.7 2006/10/05 12:56:27 rillig Exp $ d128 1 a128 4 ${RUN} \ for pkg in `${CAT} ${_DLIST}`; do \ ${PKG_INFO} -Q PKGPATH "$${pkg}"; \ done >> ${_DDIR} @ 1.7 log @Suppress the message that ".DDIR is up-to-date" by introducing a .PHONY target. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.6 2006/07/27 21:46:45 jlam Exp $ d128 4 a131 10 ${_PKG_SILENT}${_PKG_DEBUG} \ ddir=`${SED} 's:-[^-]*$$::' ${_DLIST}`; \ ${ECHO} >${_DDIR}; \ for pkg in $${ddir} ; do \ if ${PKG_INFO} -b "$${pkg}" >/dev/null 2>&1 ; then \ ${PKG_INFO} -b "$${pkg}" | ${SED} -ne \ 's,\([^/]*/[^/]*\)/Makefile:.*,\1,p' | \ ${HEAD} -1 >>${_DDIR}; \ fi ; \ done @ 1.6 log @Whenever we invoke a recursive make, we need to ensure that the proper environment ${PKGSRC_MAKE_ENV} is also passed along. Create a convenience variable RECURSIVE_MAKE that does exactly this and that can be used in place of MAKE when invoking make recursively. Use RECURSIVE_MAKE everywhere in pkgsrc/mk that we invoke make recursively. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.5 2006/06/07 10:04:03 tron Exp $ d35 3 d55 1 a55 1 ${_PKG_SILENT}${_PKG_DEBUG}${RECURSIVE_MAKE} ${MAKEFLAGS} ${_DDIR} d88 1 a88 1 ${_PKG_SILENT}${_PKG_DEBUG}${RECURSIVE_MAKE} ${MAKEFLAGS} ${_DDIR} @ 1.5 log @1.) Remove all instances of '@@${WARNING_MSG} "Warning: ...' which resulted in error message like 'WARNING: Warning: ...'. 2.) Replace "WARN_MSG" with "WARNING_MSG" which makes the "make package" target work again for restricted packages like "acroread7". @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.4 2006/06/05 22:49:44 jlam Exp $ d45 1 a45 1 ${MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL d52 1 a52 1 ${_PKG_SILENT}${_PKG_DEBUG}${MAKE} ${MAKEFLAGS} ${_DDIR} d55 1 a55 1 ${MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL \ d61 1 a61 2 ${MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} KEEP_WRKDIR=YES \ DEPENDS_TARGET=${DEPENDS_TARGET:Q} d69 1 a69 1 ${MAKE} ${MAKEFLAGS} deinstall _UPDATE_RUNNING=YES; \ d71 1 a71 1 ${MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} \ d79 1 a79 1 ${MAKE} ${MAKEFLAGS} clean-update CLEAR_DIRLIST=YES d85 1 a85 1 ${_PKG_SILENT}${_PKG_DEBUG}${MAKE} ${MAKEFLAGS} ${_DDIR} d90 1 a90 1 ${MAKE} ${MAKEFLAGS} clean ; \ d97 1 a97 1 ${_PKG_SILENT}${_PKG_DEBUG}${MAKE} ${MAKEFLAGS} clean d100 1 a100 2 ${MAKE} ${MAKEFLAGS} clean update-dirlist \ DIRLIST="`${CAT} ${_DDIR}`" PKGLIST="`${CAT} ${_DLIST}`" @ 1.4 log @Use PHASE_MSG, STEP_MSG, WARNING_MSG, and ERROR_MSG in place of ECHO_MSG in various places. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.3 2006/06/05 17:21:54 jlam Exp $ d103 3 a105 3 @@${WARNING_MSG} "Warning: preserved leftover directory list. Your next" @@${WARNING_MSG} " \`\`${MAKE} update'' may fail. It is advised to use" @@${WARNING_MSG} " \`\`${MAKE} update REINSTALL=YES'' instead!" @ 1.3 log @Move definitions for UPDATE_TARGET and DEPENDS_TARGET closer to where they are used. Also, move UPDATE_RUNNING into the install module where it is used, and make it "private" by prepending with an underscore. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.2 2006/06/04 08:25:53 jlam Exp $ d42 1 a42 2 ${_PKG_SILENT}${_PKG_DEBUG}${ECHO_MSG} \ "${_PKGSRC_IN}> Resuming update for ${PKGNAME}" d66 1 a66 1 ${ECHO_MSG} "${_PKGSRC_IN}> Installing in $${dep}" && \ d75 1 a75 1 ${ECHO_MSG} "${_PKGSRC_IN}> Skipping removed directory $${dep}"; \ d93 1 a93 1 ${ECHO_MSG} "${_PKGSRC_IN}> Skipping removed directory $${dep}";\ d103 3 a105 4 ${_PKG_SILENT}${_PKG_DEBUG}${ECHO_MSG} \ "${_PKGSRC_IN}> Warning: preserved leftover directory list. Your next";\ ${ECHO_MSG} "${_PKGSRC_IN}> \`\`${MAKE} update'' may fail. It is advised to use";\ ${ECHO_MSG} "${_PKGSRC_IN}> \`\`${MAKE} update REINSTALL=YES'' instead!" @ 1.2 log @Move some "update"-only variables from bsd.pkg.mk to bsd.pkg.update.mk. @ text @d1 1 a1 1 # $NetBSD: bsd.pkg.update.mk,v 1.1 2006/06/03 23:11:42 jlam Exp $ d14 15 d46 1 a46 1 ${MAKE} ${MAKEFLAGS} deinstall UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL d56 1 a56 1 ${MAKE} ${MAKEFLAGS} deinstall UPDATE_RUNNING=YES DEINSTALLDEPENDS=ALL \ d71 1 a71 1 ${MAKE} ${MAKEFLAGS} deinstall UPDATE_RUNNING=YES; \ @ 1.1 log @First pass at implementing support for package system flavors other than pkgsrc's current one. This is an important lead-up to any project that redesigns the pkg_* tools in that it doesn't tie us to past design (mis)choices. This commit mostly deals with rearranging code, although there was a considerable amount of rewriting done in cases where I thought the code was somewhat messy and was difficult to understand. The design I chose for supporting multiple package system flavors is that the various depends, install, package, etc. modules would define default targets and variables that may be overridden in files from pkgsrc/mk/flavor/${PKG_FLAVOR}. The default targets would do the sensible thing of doing nothing, and pkgsrc infrastructure would rely on the appropriate things to be defined in pkgsrc/mk/flavor to do the real work. The pkgsrc/mk/flavor directory contains subdirectories corresponding to each package system flavor that we support. Currently, I only have "pkg" which represents the current pkgsrc-native package flavor. I've separated out most of the code where we make assumptions about the package system flavor, mostly either because we directly use the pkg_* tools, or we make assumptions about the package meta-data directory, or we directly manipulate the package meta-data files, and placed it into pkgsrc/mk/flavor/pkg. There are several new modules that have been refactored out of bsd.pkg.mk as part of these changes: check, depends, install, package, and update. Each of these modules has been slimmed down by rewriting them to avoid some recursive make calls. I've also religiously documented which targets are "public" and which are "private" so that users won't rely on reaching into pkgsrc innards to call a private target. The "depends" module is a complete overhaul of the way that we handle dependencies. There is now a separate "depends" phase that occurs before the "extract" phase where dependencies are installed. This differs from the old way where dependencies were installed just before extraction occurred. The reduce-depends.mk file is now replaced by a script that is invoked only once during the depends phase and is used to generate a cookie file that holds the full set of reduced dependencies. It is now possible to type "make depends" in a package directory and all missing dependencies will be installed. Future work on this project include: * Resolve the workflow design in anticipation of future work on staged installations where "package" conceptually happens before "install". * Rewrite the buildlink3 framework to not assume the use of the pkgsrc pkg_* tools. * Rewrite the pkginstall framework to provide a standard pkg_* tool to perform the actions, and allowing a purely declarative file per package to describe what actions need to be taken at install or deinstall time. * Implement support for the SVR4 package flavor. This will be proof that the appropriate abstractions are in place to allow using a completely different set of package management tools. @ text @d1 1 a1 1 # $NetBSD$ d11 3 @