pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/bulk This patch addresses three problems:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e9a79dbd6d3a
branches:  trunk
changeset: 462725:e9a79dbd6d3a
user:      hubertf <hubertf%pkgsrc.org@localhost>
date:      Fri Oct 10 21:45:55 2003 +0000

description:
This patch addresses three problems:

1) When checking if any of the required binary pkgs is newer, it's
   not good to look into the (already existing) binary pkg, as that
   might be unchanged. Instead, look at the DEPENDS.

   In the context of the recent jpeg changes, the gd package itself was
   not changed, but the DEPENDS were (via buildlink files). Now looking
   into the existing gd binary pkg still said it wanted jpeg-6b instead
   of the now-wanted jpeg>=6b, which was only available via the DEPENDS.

   That's the first chunk of the patch below.

2) While debugging this, I found that the change in rev. 1.48 was
   wrong, as can be seen throughout the last bulk build, search for errors
   like:

        find: "/usr/cvs.local/pkgsrc/packages/i386/All/gd-2.0.15.tgz": No such file or directory

   As the whole operation is really on two files (as assured by "pkg_admin
   lsbest" for pkg and REFS by definition), the quotes can be ommitted.

   Why this wasn't caught when that change was tested is beyond me - maybe
   different sh(1) behaviour? (The error happened on 1.6.1_STABLE, see
   e.g. http://smaug.fh-regensburg.de/~feyrer/ftp/pub/NetBSD/pkgstat-i386/last/www/p5-Template-Toolkit/.broken.yui.html).

   Anyways, that's addressed in the second part of the patch below, too.

3) Use ${FIND} while there.

diffstat:

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

diffs (29 lines):

diff -r cb59a5bfd83c -r e9a79dbd6d3a mk/bulk/bsd.bulk-pkg.mk
--- a/mk/bulk/bsd.bulk-pkg.mk   Fri Oct 10 16:31:08 2003 +0000
+++ b/mk/bulk/bsd.bulk-pkg.mk   Fri Oct 10 21:45:55 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.bulk-pkg.mk,v 1.49 2003/09/02 07:00:04 jlam Exp $
+#      $NetBSD: bsd.bulk-pkg.mk,v 1.50 2003/10/10 21:45:55 hubertf Exp $
 
 #
 # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf%netbsd.org@localhost>
@@ -160,9 +160,7 @@
        fi ; \
        if [ "$$uptodate" = "1" ]; then \
                ${SHCOMMENT} "Check required binary packages" ; \
-               deps=`${PKG_INFO} -qf ${REF} \
-                     | ${GREP} '^@pkgdep' \
-                     | ${SED} 's,@pkgdep.,,g'`; \
+               deps=${DEPENDS:C/:.*//:Q} ; \
                for dep in $$deps ; do \
                        ${SHCOMMENT} "check against the binary pkg that pkg_add would pick, too:" ; \
                        ${SHCOMMENT} "(Only one should be returned here, really...)" ; \
@@ -170,7 +168,7 @@
                        if [ -z "$$pkg" ]; then \
                                ${ECHO_MSG} >&2 "BULK> Required binary package $$dep does not exist, rebuilding... " ; \
                                uptodate=0 ; \
-                       elif [ -n "$$(find \"$$pkg\" -prune -newer \"${REF}\")" ]; then \
+                       elif [ -n "$$(${FIND} $$pkg -prune -newer ${REF})" ]; then \
                                ${ECHO_MSG} >&2 "BULK> Required binary package $$dep (`basename $$pkg`) is newer, rebuilding... " ; \
                                uptodate=0 ; \
                        else \



Home | Main Index | Thread Index | Old Index