| @@ -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" |