Mon Mar 31 11:41:09 2008 UTC ()
Separate 'make clean' from 'make package', so that clean is not
skipped with -r.  DISTNAME++.  Fixes PR pkg/38283.

Reviewed and tested by tnn@.


(gdt)
diff -r1.17 -r1.18 pkgsrc/pkgtools/pkg_rolling-replace/Makefile
diff -r1.17 -r1.18 pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh

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

--- pkgsrc/pkgtools/pkg_rolling-replace/Makefile 2008/02/17 10:47:47 1.17
+++ pkgsrc/pkgtools/pkg_rolling-replace/Makefile 2008/03/31 11:41:09 1.18
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.17 2008/02/17 10:47:47 apb Exp $ 1# $NetBSD: Makefile,v 1.18 2008/03/31 11:41:09 gdt Exp $
2 2
3DISTNAME= pkg_rolling-replace-0.14 3DISTNAME= pkg_rolling-replace-0.15
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
15 15
16USE_TOOLS+= patch 16USE_TOOLS+= patch

cvs diff -r1.17 -r1.18 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 2008/02/17 10:47:47 1.17
+++ pkgsrc/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh 2008/03/31 11:41:09 1.18
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# $NetBSD: pkg_rolling-replace.sh,v 1.17 2008/02/17 10:47:47 apb Exp $ 3# $NetBSD: pkg_rolling-replace.sh,v 1.18 2008/03/31 11:41:09 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
@@ -389,36 +389,42 @@ while [ -n "$REPLACE_TODO" ]; do @@ -389,36 +389,42 @@ while [ -n "$REPLACE_TODO" ]; do
389 echo "${OPI} Would run: $cmd" 389 echo "${OPI} Would run: $cmd"
390 else 390 else
391 eval "$cmd" 391 eval "$cmd"
392 [ -z "$fail" ] || abort "'make replace' failed for package $pkg." 392 [ -z "$fail" ] || abort "'make replace' failed for package $pkg."
393 fi 393 fi
394 if [ -z "$opt_n" ]; then 394 if [ -z "$opt_n" ]; then
395 [ -z "$(${PKG_INFO} -Q unsafe_depends_strict $pkg)" ] || \ 395 [ -z "$(${PKG_INFO} -Q unsafe_depends_strict $pkg)" ] || \
396 abort "package $pkg still has unsafe_depends_strict." 396 abort "package $pkg still has unsafe_depends_strict."
397 [ -z "$(${PKG_INFO} -Q unsafe_depends $pkg)" ] || \ 397 [ -z "$(${PKG_INFO} -Q unsafe_depends $pkg)" ] || \
398 abort "package $pkg still has unsafe_depends." 398 abort "package $pkg still has unsafe_depends."
399 [ -z "$(${PKG_INFO} -Q rebuild $pkg)" ] || \ 399 [ -z "$(${PKG_INFO} -Q rebuild $pkg)" ] || \
400 abort "package $pkg is still requested to be rebuilt." 400 abort "package $pkg is still requested to be rebuilt."
401 fi 401 fi
 402 # If -r not given, make a binary package.
402 if [ -z "$opt_r" ]; then 403 if [ -z "$opt_r" ]; then
403 echo "${OPI} Packaging $(${PKG_INFO} -e $pkg)" 404 echo "${OPI} Packaging $(${PKG_INFO} -e $pkg)"
404 cmd="${MAKE} package && ${MAKE} clean || fail=1" 405 cmd="${MAKE} package || fail=1"
405 if [ -n "$opt_n" ]; then 406 if [ -n "$opt_n" ]; then
406 echo "${OPI} Would run: $cmd" 407 echo "${OPI} Would run: $cmd"
407 else 408 else
408 eval "$cmd" 409 eval "$cmd"
409 [ -z "$fail" ] || abort "'make package' failed for package $pkg." 410 [ -z "$fail" ] || abort "'make package' failed for package $pkg."
410 fi 411 fi
411 fi 412 fi
 413 # Clean
 414 if [ -z "$opt_n" ]; then
 415 ${MAKE} clean || abort "'make clean' failed for package $pkg."
 416 fi
 417
412 sleep 1 418 sleep 1
413 419
414 # remove just-replaced package from all *_TODO lists 420 # remove just-replaced package from all *_TODO lists
415 MISMATCH_TODO=$(exclude $pkg --from $MISMATCH_TODO) 421 MISMATCH_TODO=$(exclude $pkg --from $MISMATCH_TODO)
416 REBUILD_TODO=$(exclude $pkg --from $REBUILD_TODO) 422 REBUILD_TODO=$(exclude $pkg --from $REBUILD_TODO)
417 UNSAFE_TODO=$(exclude $pkg --from $UNSAFE_TODO) 423 UNSAFE_TODO=$(exclude $pkg --from $UNSAFE_TODO)
418 424
419 echo "${OPI} Re-checking for unsafe installed packages (${UNSAFE_VAR}=YES)" 425 echo "${OPI} Re-checking for unsafe installed packages (${UNSAFE_VAR}=YES)"
420 if [ -n "$opt_n" ]; then 426 if [ -n "$opt_n" ]; then
421 # With -n, the replace didn't happen, and thus the packages that would 427 # With -n, the replace didn't happen, and thus the packages that would
422 # have been marked unsafe_depends=YES were not. Add the set that 428 # have been marked unsafe_depends=YES were not. Add the set that
423 # would have been marked so we can watch what pkg_rolling-replace 429 # would have been marked so we can watch what pkg_rolling-replace
424 # would have done (approximately). 430 # would have done (approximately).