summaryrefslogtreecommitdiff
path: root/pkgtools/pkg_rolling-replace
diff options
context:
space:
mode:
authorapb <apb@pkgsrc.org>2008-02-17 10:47:47 +0000
committerapb <apb@pkgsrc.org>2008-02-17 10:47:47 +0000
commit7a43c660cf43c5dc4eb8d3038ea217494e7ccded (patch)
treea335a3892a272dbd2fdfd58cddfcaeba021862ea /pkgtools/pkg_rolling-replace
parentb2685e09a01a069b0266608a5ff54e8306e43ecf (diff)
downloadpkgsrc-7a43c660cf43c5dc4eb8d3038ea217494e7ccded.tar.gz
Bump version to pkg_rolling-replace-0.14:
* Clarify that the -x option takes package base names, not full package names. * Clarify that the -x option excluded packages only from the outdated check, not from being rebuilt for any any other reason. * Add a -X option that excludes a package from being rebuilt for any reason. (I have had this as a private patch for a long time, and never run pkg_rolling-replace without "-X openoffice2", because openoffice requires so much time and disk space to build.)
Diffstat (limited to 'pkgtools/pkg_rolling-replace')
-rw-r--r--pkgtools/pkg_rolling-replace/Makefile4
-rw-r--r--pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.825
-rwxr-xr-xpkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh12
3 files changed, 30 insertions, 11 deletions
diff --git a/pkgtools/pkg_rolling-replace/Makefile b/pkgtools/pkg_rolling-replace/Makefile
index e69839de1dc..8cd3966bc0b 100644
--- a/pkgtools/pkg_rolling-replace/Makefile
+++ b/pkgtools/pkg_rolling-replace/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.16 2008/01/11 13:29:37 gdt Exp $
+# $NetBSD: Makefile,v 1.17 2008/02/17 10:47:47 apb Exp $
-DISTNAME= pkg_rolling-replace-0.13
+DISTNAME= pkg_rolling-replace-0.14
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8 b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8
index bd71f7647e1..d4d5cdf93de 100644
--- a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8
+++ b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8
@@ -1,5 +1,5 @@
-.\" $NetBSD: pkg_rolling-replace.8,v 1.8 2007/08/08 22:00:40 wiz Exp $
-.Dd August 8, 2007
+.\" $NetBSD: pkg_rolling-replace.8,v 1.9 2008/02/17 10:47:47 apb Exp $
+.Dd February 17, 2008
.Dt PKG_ROLLING-REPLACE 8
.Os
.Sh NAME
@@ -9,6 +9,7 @@
.Nm
.Op Fl hnrsuv
.Op Fl x Ar pkgs
+.Op Fl X Ar pkgs
.Sh DESCRIPTION
.Nm
runs
@@ -91,10 +92,24 @@ to check for outdated packages, and replace those too.
.It Fl v
Verbose output.
.It Fl x Ar pkgs
-Exclude the comma-separated list of packages from the update check
-when
+Exclude the comma-separated list of package base names
+from the check for outdated packages.
+This has no effect if the
.Fl u
-is given (does not exclude unsafe or rebuild-requested packages).
+flag is not given,
+and does not prevent packages from being rebuilt for any other reason
+(such as being a dependency of another package that is also rebuilt,
+or having any of the
+.Xr pkg_admin 8
+.Dq unsafe_depends ,
+.Dq unsafe_depends_strict ,
+or
+.Dq rebuild
+variables set to
+.Dq YES ) .
+.It Fl X Ar pkgs
+Exclude the comma-separated list of package base names
+from being rebuilt for any reason.
.El
.Sh ENVIRONMENT
.Nm
diff --git a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh
index 7fa3ce28232..40db40a38ea 100755
--- a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh
+++ b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# $NetBSD: pkg_rolling-replace.sh,v 1.16 2008/01/11 13:29:37 gdt Exp $
+# $NetBSD: pkg_rolling-replace.sh,v 1.17 2008/02/17 10:47:47 apb Exp $
#<license>
# Copyright (c) 2006 BBN Technologies Corp. All rights reserved.
#
@@ -82,9 +82,10 @@ usage()
-n Don't actually do make replace
-r Just replace, don't create binary packages
-s Replace even if the ABIs are still compatible ("strict")
- -u Update mismatched packages
+ -u Update outdated packages
-v Verbose
- -x <pkg> exclude <pkg> from update check
+ -x <pkg> exclude <pkg> from outdated check
+ -X <pkg> exclude <pkg> from being rebuilt
pkg_rolling-replace does 'make replace' on one package at a time,
tsorting the packages being replaced according to their
@@ -252,7 +253,7 @@ abort()
EXCLUDE=
-args=$(getopt hnursvx: $*)
+args=$(getopt hnursvx:X: $*)
if [ $? -ne 0 ]; then
opt_h=1
fi
@@ -266,6 +267,7 @@ while [ $# -gt 0 ]; do
-u) opt_u=1 ;;
-v) opt_v=1 ;;
-x) EXCLUDE="$EXCLUDE $(echo $2 | sed 's/,/ /g')" ; shift ;;
+ -X) REALLYEXCLUDE="$REALLYEXCLUDE $(echo $2 | sed 's/,/ /g')" ; shift ;;
--) shift; break ;;
esac
shift
@@ -312,6 +314,7 @@ verbose "${OPC} UNSAFE_TODO=[$(echo $UNSAFE_TODO)]"
vsleep 2
REPLACE_TODO=$(uniqify $MISMATCH_TODO $REBUILD_TODO $UNSAFE_TODO)
+REPLACE_TODO=$(exclude $REALLYEXCLUDE --from $REPLACE_TODO)
depgraph_built=0
while [ -n "$REPLACE_TODO" ]; do
@@ -433,6 +436,7 @@ while [ -n "$REPLACE_TODO" ]; do
vsleep 4
REPLACE_TODO=$(uniqify $MISMATCH_TODO $REBUILD_TODO $UNSAFE_TODO)
+ REPLACE_TODO=$(exclude $REALLYEXCLUDE --from $REPLACE_TODO)
depgraph_built=0
done