pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/bulk - A warning is printed if there is no PKGNAME ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ae23f6100d48
branches:  trunk
changeset: 502942:ae23f6100d48
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri Nov 11 13:17:58 2005 +0000

description:
- A warning is printed if there is no PKGNAME matching for a PKGPATH in the
  .index file.
- Condensed the code for printing to another package's .broken file in case
  of failure. (Added a variable pkg_brokenfile.)

diffstat:

 mk/bulk/bsd.bulk-pkg.mk |  24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

diffs (51 lines):

diff -r 8ae2549960ad -r ae23f6100d48 mk/bulk/bsd.bulk-pkg.mk
--- a/mk/bulk/bsd.bulk-pkg.mk   Fri Nov 11 10:50:14 2005 +0000
+++ b/mk/bulk/bsd.bulk-pkg.mk   Fri Nov 11 13:17:58 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.bulk-pkg.mk,v 1.95 2005/11/11 10:40:41 rillig Exp $
+#      $NetBSD: bsd.bulk-pkg.mk,v 1.96 2005/11/11 13:17:58 rillig Exp $
 
 #
 # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf%NetBSD.org@localhost>
@@ -427,28 +427,32 @@
                                tmp=`${SED} -n -e "/^${_ESCPKGPATH} / s;^[^:]*:[ ]*;;p" ${SUPPORTSFILE}` ; \
                                if test -n "$$tmp" ; then \
                                        for pkgdir in $$tmp ; do \
+                                               pkg_brokenfile=${PKGSRCDIR:Q}"/$$pkgdir/"${BROKENFILE:Q}; \
                                                pkgname=`${AWK} '$$1 == "'"$$pkgdir"'" { print $$2; }' ${INDEXFILE}`; \
-                                               if [ -z "$$pkgname" ]; then pkgname=unknown ; fi ; \
+                                               case $$pkgname in \
+                                               "")     pkgname="unknown"; \
+                                                       ${BULK_MSG} "WARNING: unknown pkgname in $$pkgdir.";; \
+                                               esac; \
                                                ${BULK_MSG} "marking package that requires ${PKGNAME} as broken: $$pkgname ($$pkgdir)";\
                                                pkgerr='-1'; pkgignore=''; pkgskip=''; \
                                                if [ "${USE_BULK_BROKEN_CHECK}" = 'yes' ]; then \
                                                        pkgignore=`(cd ${PKGSRCDIR}/$$pkgdir && ${MAKE} show-var VARNAME=PKG_FAIL_REASON)`; \
                                                        pkgskip=`(cd ${PKGSRCDIR}/$$pkgdir && ${MAKE} show-var VARNAME=PKG_SKIP_REASON)`; \
                                                fi; \
-                                               if [ ! -z "$${pkgignore}$${pkgskip}" -a ! -f ${PKGSRCDIR}/$$pkgdir/${BROKENFILE} ]; then \
-                                                        ${BULK_MSG} "$$pkgname ($$pkgdir) may not be packaged because:" >> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
-                                                        ${BULK_MSG} "$$pkgignore" >> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
-                                                        ${BULK_MSG} "$$pkgskip" >> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
+                                               if [ ! -z "$${pkgignore}$${pkgskip}" -a ! -f "$${pkg_brokenfile}" ]; then \
+                                                       { ${BULK_MSG} "$$pkgname ($$pkgdir) may not be packaged because:"; \
+                                                         ${BULK_MSG} "$$pkgignore"; \
+                                                         ${BULK_MSG} "$$pkgskip"; \
+                                                       } >> "${pkg_brokenfile}"; \
                                                        if [ "${USE_BULK_BROKEN_CHECK}" != 'yes' ] || [ -z "`(cd ${PKGSRCDIR}/$$pkgdir && ${MAKE} show-var VARNAME=BROKEN)`" ]; then \
                                                                pkgerr="0"; \
                                                        else \
                                                                pkgerr="1"; \
                                                        fi; \
                                                fi; \
-                                               ${BULK_MSG} "$$pkgname ($$pkgdir) is broken because it depends upon ${PKGNAME} (${PKGPATH}) which is broken." \
-                                                       >> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
-                                               ${ECHO_MSG} "Please view the <a href=\"../../${PKGPATH}/${BROKENFILE}\">build log for ${PKGNAME}</a>.<br />" \
-                                                       >> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE};\
+                                               { ${BULK_MSG} "$$pkgname ($$pkgdir) is broken because it depends upon ${PKGNAME} (${PKGPATH}) which is broken."; \
+                                                 ${ECHO} "Please view the <a href=\"../../${PKGPATH}/${BROKENFILE}\">build log for ${PKGNAME}</a>.<br />"; \
+                                               } >> ${PKGSRCDIR}/$$pkgdir/${BROKENFILE}; \
                                                nbrokenby=`expr $$nbrokenby + 1`;\
                                                if ${GREP} -q " $$pkgdir/${BROKENFILE}" ${PKGSRCDIR}/${BROKENFILE} ; then :; else \
                                                        ${ECHO} " $$pkgerr $$pkgdir/${BROKENFILE} 0 " >> ${PKGSRCDIR}/${BROKENFILE} ;\



Home | Main Index | Thread Index | Old Index