pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/patch When testing whether the patches/ directory e...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/07de3031f492
branches:  trunk
changeset: 529126:07de3031f492
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri May 25 14:21:32 2007 +0000

description:
When testing whether the patches/ directory exists or not, take into
account that CVS usually leaves empty directories around. This fixes the
bootstrapping after a "cvs update" without the -P option. The error
message leading to it was:

===> running: (cd /home/p/src/devel/bmake && /home/p/pkg/bin/bmake -s
        -DPKG_PRESERVE MAKECONF=/home/p/work/mk.conf.example
        WRKOBJDIR=/home/p/work/pkgsrc bootstrap-register)
ERROR: [resolve-dependencies] A package matching ``digest>=20010302'' should
ERROR:     be installed, but one cannot be found.  Perhaps there is a
ERROR:     stale work directory for ../../pkgtools/digest?

diffstat:

 mk/patch/bsd.patch-vars.mk |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r ca648e868abd -r 07de3031f492 mk/patch/bsd.patch-vars.mk
--- a/mk/patch/bsd.patch-vars.mk        Fri May 25 11:55:56 2007 +0000
+++ b/mk/patch/bsd.patch-vars.mk        Fri May 25 14:21:32 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.patch-vars.mk,v 1.3 2006/07/13 14:02:34 jlam Exp $
+# $NetBSD: bsd.patch-vars.mk,v 1.4 2007/05/25 14:21:32 rillig Exp $
 #
 # This Makefile fragment is included separately by bsd.pkg.mk and
 # defines some variables which must be defined earlier than where
@@ -31,9 +31,17 @@
 USE_TOOLS+=    patch
 .endif
 
+# Just testing whether the directories exist or not is not enough.
+# There may be directories that are empty except for the CVS metafiles.
+# This complicated test is necessary to not record pkgtools/digest
+# as a dependency for devel/bmake.
 .if (defined(PATCHDIR) && exists(${PATCHDIR})) || \
     (defined(LOCALPATCHES) && exists(${LOCALPATCHES}/${PKGPATH}))
+_patches!=     echo ${PATCHDIR}/* ${LOCALPATCHES}/${PKGPATH}/*
+_patches:=     ${_patches:N*/CVS:N*/\*}
+.  if !empty(_patches)
 USE_TOOLS+=    digest:bootstrap
+.  endif
 .endif
 
 # These tools are used to output the contents of the distribution patches



Home | Main Index | Thread Index | Old Index