Mon Apr 30 13:59:39 2012 UTC ()
Use " for PKGNAME_REQUIRED, so that ${pkg} is expanded.

Resolves at least some issues with finding the right pyNN-foo, when
replacing packages that don't match PYTHON_VERSION_DEFAULT.

(This was a stray change in my tree not committed for a while, but
it's been working ok.)

Now 0.24.1.


(gdt)
diff -r1.32 -r1.33 pkgsrc/pkgtools/pkg_rolling-replace/Makefile
diff -r1.31 -r1.32 pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh

cvs diff -r1.32 -r1.33 pkgsrc/pkgtools/pkg_rolling-replace/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_rolling-replace/Makefile 2011/03/22 04:04:58 1.32
+++ pkgsrc/pkgtools/pkg_rolling-replace/Makefile 2012/04/30 13:59:38 1.33
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.32 2011/03/22 04:04:58 obache Exp $ 1# $NetBSD: Makefile,v 1.33 2012/04/30 13:59:38 gdt Exp $
2 2
3DISTNAME= pkg_rolling-replace-0.24 3DISTNAME= pkg_rolling-replace-0.24.1
4CATEGORIES= pkgtools 4CATEGORIES= pkgtools
5MASTER_SITES= # empty 5MASTER_SITES= # empty
6DISTFILES= # empty 6DISTFILES= # empty
7 7
8MAINTAINER= ngoffee@bbn.com 8MAINTAINER= ngoffee@bbn.com
9COMMENT= Replace/upgrade packages in-place 9COMMENT= Replace/upgrade packages in-place
10 10
11DEPENDS+= pkg_chk>=1.76:../../pkgtools/pkg_chk 11DEPENDS+= pkg_chk>=1.76:../../pkgtools/pkg_chk
12DEPENDS+= pkg_tarup>=1.6.6:../../pkgtools/pkg_tarup 12DEPENDS+= pkg_tarup>=1.6.6:../../pkgtools/pkg_tarup
13 13
14PKG_INSTALLATION_TYPES= overwrite pkgviews 14PKG_INSTALLATION_TYPES= overwrite pkgviews
15PKG_DESTDIR_SUPPORT= user-destdir 15PKG_DESTDIR_SUPPORT= user-destdir
16 16

cvs diff -r1.31 -r1.32 pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh 2011/03/22 04:04:58 1.31
+++ pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh 2012/04/30 13:59:39 1.32
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# $NetBSD: pkg_rolling-replace.sh,v 1.31 2011/03/22 04:04:58 obache Exp $ 3# $NetBSD: pkg_rolling-replace.sh,v 1.32 2012/04/30 13:59:39 gdt Exp $
4#<license> 4#<license>
5# Copyright (c) 2006 BBN Technologies Corp. All rights reserved. 5# Copyright (c) 2006 BBN Technologies Corp. All rights reserved.
6# 6#
7# Redistribution and use in source and binary forms, with or without 7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions 8# modification, are permitted provided that the following conditions
9# are met: 9# are met:
10# 1. Redistributions of source code must retain the above copyright 10# 1. Redistributions of source code must retain the above copyright
11# notice, this list of conditions and the following disclaimer. 11# notice, this list of conditions and the following disclaimer.
12# 2. Redistributions in binary form must reproduce the above copyright 12# 2. Redistributions in binary form must reproduce the above copyright
13# notice, this list of conditions and the following disclaimer in the 13# notice, this list of conditions and the following disclaimer in the
14# documentation and/or other materials provided with the distribution. 14# documentation and/or other materials provided with the distribution.
15# 3. Neither the name of BBN Technologies nor the names of its contributors 15# 3. Neither the name of BBN Technologies nor the names of its contributors
16# may be used to endorse or promote products derived from this software 16# may be used to endorse or promote products derived from this software
@@ -443,27 +443,27 @@ while [ -n "$REPLACE_TODO" ]; do @@ -443,27 +443,27 @@ while [ -n "$REPLACE_TODO" ]; do
443 # filter out packages that aren't already installed and marked for 443 # filter out packages that aren't already installed and marked for
444 # replacement. This is safe, since uninstalled depends will be 444 # replacement. This is safe, since uninstalled depends will be
445 # pulled in automatically by 'make replace'; but in rare cases it 445 # pulled in automatically by 'make replace'; but in rare cases it
446 # might be non-optimal, leading to a duplicate rebuild that we 446 # might be non-optimal, leading to a duplicate rebuild that we
447 # would have avoided had we selected the uninstalled package in 447 # would have avoided had we selected the uninstalled package in
448 # tsorted order and run 'make install' on it. This seems like 448 # tsorted order and run 'make install' on it. This seems like
449 # such a rare case that the added complexity isn't worth it. 449 # such a rare case that the added complexity isn't worth it.
450 450
451 # Set PKGNAME_REQD to give underlying make processes a chance to 451 # Set PKGNAME_REQD to give underlying make processes a chance to
452 # set options derived from the package name. For example, 452 # set options derived from the package name. For example,
453 # the appropriate version of Python can be derived from the 453 # the appropriate version of Python can be derived from the
454 # package name (so, when building py25-foo, use python-2.5, 454 # package name (so, when building py25-foo, use python-2.5,
455 # not python-2.6). 455 # not python-2.6).
456 MAKE_SET_VARS='PKGNAME_REQD=${pkg}-*' 456 MAKE_SET_VARS="PKGNAME_REQD=${pkg}-*"
457 457
458 if ! is_member $pkg $DEPENDS_CHECKED; then 458 if ! is_member $pkg $DEPENDS_CHECKED; then
459 echo "${OPI} Checking if $pkg has new depends..." 459 echo "${OPI} Checking if $pkg has new depends..."
460 OLD_DEPENDS=$(${PKG_INFO} -Nq $pkg | sed 's/-[0-9][^-]*$//') 460 OLD_DEPENDS=$(${PKG_INFO} -Nq $pkg | sed 's/-[0-9][^-]*$//')
461 NEW_DEPENDS= 461 NEW_DEPENDS=
462 cd "$PKGSRCDIR/$pkgdir" 462 cd "$PKGSRCDIR/$pkgdir"
463 bdeps=$(@SETENV@ ${MAKE_SET_VARS} ${MAKE} show-depends VARNAME=BUILD_DEPENDS) 463 bdeps=$(@SETENV@ ${MAKE_SET_VARS} ${MAKE} show-depends VARNAME=BUILD_DEPENDS)
464 rdeps=$(@SETENV@ ${MAKE_SET_VARS} ${MAKE} show-depends) 464 rdeps=$(@SETENV@ ${MAKE_SET_VARS} ${MAKE} show-depends)
465 for depver in $bdeps $rdeps; do 465 for depver in $bdeps $rdeps; do
466 dep=$(echo $depver | sed -e 's/[:[].*$/0/' -e 's/[<>]=/-/' \ 466 dep=$(echo $depver | sed -e 's/[:[].*$/0/' -e 's/[<>]=/-/' \
467 -e 's/-[0-9][^-]*$//') 467 -e 's/-[0-9][^-]*$//')
468 if ! is_member $dep $OLD_DEPENDS $NEW_DEPENDS; then 468 if ! is_member $dep $OLD_DEPENDS $NEW_DEPENDS; then
469 NEW_DEPENDS="$NEW_DEPENDS $dep" 469 NEW_DEPENDS="$NEW_DEPENDS $dep"