diff options
author | joerg <joerg@pkgsrc.org> | 2009-03-05 23:07:15 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2009-03-05 23:07:15 +0000 |
commit | 5f28d6bebf5516f88468e07aaba849081b7666ca (patch) | |
tree | f78574667d55fb7ed0487d616b16e412f9a8a542 /mk/bsd.pkg.update.mk | |
parent | 60adce083b9185c977f810f9b448bba91beb32fc (diff) | |
download | pkgsrc-5f28d6bebf5516f88468e07aaba849081b7666ca.tar.gz |
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.
Diffstat (limited to 'mk/bsd.pkg.update.mk')
-rw-r--r-- | mk/bsd.pkg.update.mk | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mk/bsd.pkg.update.mk b/mk/bsd.pkg.update.mk index b96341abb0a..c067cdd7a77 100644 --- a/mk/bsd.pkg.update.mk +++ b/mk/bsd.pkg.update.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.update.mk,v 1.15 2008/04/07 13:31:15 joerg Exp $ +# $NetBSD: bsd.pkg.update.mk,v 1.16 2009/03/05 23:07:15 joerg Exp $ # # This Makefile fragment is included by bsd.pkg.mk and contains the targets # and variables for "make update". @@ -126,11 +126,18 @@ ${_DDIR}: ${_DLIST} ${RUN} pkgs=`${CAT} ${_DLIST}`; \ if [ "$$pkgs" ]; then ${PKG_INFO} -Q PKGPATH $$pkgs; fi > ${_DDIR} -# Note that "pkg_info -qR" wouldn't work here, since it lists only the -# packages that require this package directly. +.if ${PKGTOOLS_VERSION} >= 20090302 +${_DLIST}: ${WRKDIR} + ${PKG_INFO} -qr "${PKGWILDCARD}" > ${_DLIST} +.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 |