summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorsno <sno@pkgsrc.org>2010-02-01 19:06:42 +0000
committersno <sno@pkgsrc.org>2010-02-01 19:06:42 +0000
commitb78b7d956670afd35db92615661eb8398a923563 (patch)
tree8268e3c0402cc77e6a9a9308948ac17740748bf8 /pkgtools
parente6d3bac01836d436b0e723bdd284410fa69e6160 (diff)
downloadpkgsrc-b78b7d956670afd35db92615661eb8398a923563.tar.gz
Updating pkgtools/pkg_rolling-replace/ from 0.19nb1 to 0.20
Improving the variable passing to make by allowing any, not just MAKE_JOBS and USE_DESTDIR.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_rolling-replace/Makefile6
-rw-r--r--pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.841
-rwxr-xr-xpkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh43
3 files changed, 28 insertions, 62 deletions
diff --git a/pkgtools/pkg_rolling-replace/Makefile b/pkgtools/pkg_rolling-replace/Makefile
index 3d4fc5792e2..fdc1b25d893 100644
--- a/pkgtools/pkg_rolling-replace/Makefile
+++ b/pkgtools/pkg_rolling-replace/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.27 2010/02/01 10:28:45 sno Exp $
+# $NetBSD: Makefile,v 1.28 2010/02/01 19:06:42 sno Exp $
-DISTNAME= pkg_rolling-replace-0.19
+DISTNAME= pkg_rolling-replace-0.20
CATEGORIES= pkgtools
-PKGREVISION= 1
+#PKGREVISION= 1
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 ef28a1dc2de..6967659c654 100644
--- a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8
+++ b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_rolling-replace.8,v 1.18 2010/02/01 12:25:07 wiz Exp $
+.\" $NetBSD: pkg_rolling-replace.8,v 1.19 2010/02/01 19:06:43 sno Exp $
.Dd February 1, 2010
.Dt PKG_ROLLING-REPLACE 8
.Os
@@ -8,8 +8,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl Fhknrsuv
-.Op Fl D Ar bool
-.Op Fl j Ar jobs
+.Op Fl D Ar VARIABLE=VALUE
.Op Fl L Ar path
.Op Fl X Ar pkgs
.Op Fl x Ar pkgs
@@ -44,6 +43,11 @@ in the resulting topological order.
The dependency graph and topological sort are re-calculated after each
.Dq make replace ,
in case it causes additional packages to be marked unsafe.
+.Nm
+will pass
+.Dq IN_PKG_ROLLING_REPLACE=1
+to make, so users can set flags depending on interactive usage and
+batch-replace in their @MAKECONF@.
.Pp
The user can mark additional packages to be rebuilt by setting the
.Dq rebuild=YES
@@ -66,21 +70,10 @@ assuming the pkgsrc tree is more recent than the currently installed
packages.)
.Ss Options
.Bl -tag -width xxxxxxxx
-.It Fl D Ar bool
-Sets
-.Dq USE_DESTDIR
-to the given boolean value
-.Ar bool
-.Po Dv YES No or Dv NO Pc .
-The default value is
-.Dq NO
-to ensure the same behaviour for pkgsrc developers when the act as users
-and update their system.
-To disable the default behaviour and fall back to pkgsrc defaults, use
-.Dq OFF
-as
-.Ar bool
-parameter.
+.It Fl D Ar VARIABLE=VALUE
+Passes VARIABLE=VALUE to each make call.
+.Dq -D
+can be specified more than once to pass several variables to make.
.It Fl F
Just fetches the sources of all mismatched packages required to be updated
(and it's dependencies).
@@ -92,12 +85,6 @@ Warning: This could (potential will) rebuild package depending
on the failed package, anyway.
This may cause a broken tree.
Use with caution!
-.It Fl j Ar jobs
-Enables a pkgsrc tunable
-.Pq Dv MAKE_JOBS= Ns Aq n
-to allow parallel build while
-compiling a package.
-It's unset by default.
.It Fl L Ar path
Logs each build (each command output from the commands which are run for
packages) to given path.
@@ -218,6 +205,11 @@ To mark all packages that compiled against X11 as needing rebuild
cd /var/db/pkg \*[Am]\*[Am] grep "blddep x11-links" */* | cut -d/ -f1 | \\
sort -u | xargs pkg_admin set rebuild=YES
.Ed
+.Pp
+To compile all packages heavily parallel, use
+.Bd -literal -offset indent
+pkg_rolling-replace -D MAKE_JOBS=8
+.Ed
.Sh AUTHORS
.An -nosplit
.An Nick Goffee
@@ -234,7 +226,6 @@ were added by
.Aq tnn@NetBSD.org .
The options
.Fl k ,
-.Fl j ,
.Fl D ,
.Fl F
and
diff --git a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh
index 2713b7bbb6b..b7e17ab9080 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.24 2010/02/01 10:28:45 sno Exp $
+# $NetBSD: pkg_rolling-replace.sh,v 1.25 2010/02/01 19:06:43 sno Exp $
#<license>
# Copyright (c) 2006 BBN Technologies Corp. All rights reserved.
#
@@ -109,9 +109,8 @@ usage()
-s Replace even if the ABIs are still compatible ("strict")
-u Update outdated packages
-v Verbose
- -D <bool> set USE_DESTDIR=bool (default: NO)
+ -D VAR=VAL Passes given variables and values to make
-L <path> Log to path (<path>/pkgdir/pkg)
- -j <jobs> set MAKE_JOBS=jobs for building update
-X <pkg> exclude <pkg> from being rebuilt
-x <pkg> exclude <pkg> from outdated check
@@ -312,9 +311,10 @@ todo()
##
EXCLUDE=
-DESTDIR_OVERRIDE="NO"
+MAKE_VAR="IN_PKG_ROLLING_REPLACE=1"
+MAKE_VAR_SEP=" "
-args=$(getopt FhknursvD:j:x:X:L: $*)
+args=$(getopt FhknursvD:x:X:L: $*)
if [ $? -ne 0 ]; then
opt_h=1
fi
@@ -329,8 +329,7 @@ while [ $# -gt 0 ]; do
-s) opt_s=1 ;;
-u) opt_u=1 ;;
-v) opt_v=1 ;;
- -D) DESTDIR_OVERRIDE="$2"; shift ;;
- -j) MAKE_JOBS_OVERRIDE="$2"; shift ;;
+ -D) MAKE_VAR="${MAKE_VAR}${MAKE_VAR_SEP}$2"; MAKE_VAR_SEP=" "; shift ;;
-x) EXCLUDE="$EXCLUDE $(echo $2 | sed 's/,/ /g')" ; shift ;;
-X) REALLYEXCLUDE="$REALLYEXCLUDE $(echo $2 | sed 's/,/ /g')" ; shift ;;
-L) LOGPATH="$2"; shift ;;
@@ -343,38 +342,14 @@ if [ -n "$opt_h" ]; then
usage
fi
-BUILD_REPLACE_TUNE_SEP=""
-
-if [ -n "${DESTDIR_OVERRIDE}" ]; then
- case "${DESTDIR_OVERRIDE}" in
- [yY][eE][sS]|[nN][oO])
- BUILD_REPLACE_TUNE="USE_DESTDIR=${DESTDIR_OVERRIDE}"
- BUILD_REPLACE_TUNE_SEP=" "
- ;;
- [oO][fF][fF])
- # Turn built-in default off
- ;;
- *)
- usage
- ;;
- esac
-fi
-
-if [ -n "${MAKE_JOBS_OVERRIDE}" ]; then
- MAKE_JOBS_VERIFY=`expr ${MAKE_JOBS_OVERRIDE} + 0`
- if [ ${MAKE_JOBS_OVERRIDE} -eq ${MAKE_JOBS_VERIFY} ]; then
- BUILD_REPLACE_TUNE="${BUILD_REPLACE_TUNE}${BUILD_REPLACE_TUNE_SEP}MAKE_JOBS=${MAKE_JOBS_VERIFY}"
- else
- usage
- fi
-fi
-
if [ -n "$opt_s" ]; then
UNSAFE_VAR=unsafe_depends_strict
else
UNSAFE_VAR=unsafe_depends
fi
+MAKE="${MAKE}${MAKE_VAR_SEP}${MAKE_VAR}"
+
SUCCESSED=""
SUCCESSEDSEP=""
FAILED=""
@@ -514,7 +489,7 @@ while [ -n "$REPLACE_TODO" ]; do
[ -n "$opt_k" ] || abort "'make clean' failed for package $pkg."
fi
fi
- cmd="${MAKE} ${BUILD_REPLACE_TUNE} replace || fail=1" # XXX OLDNAME= support? xmlrpc-c -> xmlrpc-c-ss
+ cmd="${MAKE} replace || fail=1" # XXX OLDNAME= support? xmlrpc-c -> xmlrpc-c-ss
else
echo "${OPI} Fetching $pkgname"
cmd="${MAKE} fetch depends-fetch || fail=1"