pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/bulk Fix checking of up to date binary packages. T...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6ef5ac6fd327
branches:  trunk
changeset: 487344:6ef5ac6fd327
user:      tv <tv%pkgsrc.org@localhost>
date:      Wed Jan 12 22:51:54 2005 +0000

description:
Fix checking of up to date binary packages.  The problem with DEPENDS
containing constructs of the form

    {perl>=5.8.3nb1,perl-thread>=5.8.3nb1}

is that a Bourne shell "for" interprets this as two separate items in the
list, nuking the {}s.  The above will never succeed and thus always cause
Perl-dependent packages to be rebuilt unconditionally.

Just adding more \s isn't enough -- the parsing of the depends list has to
be moved out of the "for" clause.  So, echo them one per line and use "read"
to pull them in without allowing the shell to peek at those characters.

diffstat:

 mk/bulk/bsd.bulk-pkg.mk |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 9046591c2ff4 -r 6ef5ac6fd327 mk/bulk/bsd.bulk-pkg.mk
--- a/mk/bulk/bsd.bulk-pkg.mk   Wed Jan 12 22:50:20 2005 +0000
+++ b/mk/bulk/bsd.bulk-pkg.mk   Wed Jan 12 22:51:54 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.bulk-pkg.mk,v 1.67 2005/01/11 18:44:10 tv Exp $
+#      $NetBSD: bsd.bulk-pkg.mk,v 1.68 2005/01/12 22:51:54 tv Exp $
 
 #
 # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf%NetBSD.org@localhost>
@@ -207,8 +207,8 @@
        fi ; \
        if [ "$$uptodate" = "1" ]; then \
                ${SHCOMMENT} "Check required binary packages" ; \
-               deps=${DEPENDS:C/:.*//:Q} ; \
-               for dep in $$deps ; do \
+               (${DEPENDS:C/:.*$//:@d@${ECHO} ${d:Q};@} ${TRUE}) | \
+               while read dep; do \
                        ${SHCOMMENT} "check against the binary pkg that pkg_add would pick, too:" ; \
                        ${SHCOMMENT} "(Only one should be returned here, really...)" ; \
                        pkg=`${PKG_ADMIN} lsbest "${PACKAGES}/All/$$dep"` ; \



Home | Main Index | Thread Index | Old Index