summaryrefslogtreecommitdiff
path: root/pkgtools/pkg_chk
diff options
context:
space:
mode:
authormartin <martin@pkgsrc.org>2018-11-25 20:17:26 +0000
committermartin <martin@pkgsrc.org>2018-11-25 20:17:26 +0000
commit76b588aec1b9e88d940567c85f7633d5632ef519 (patch)
tree230c41cd8043978433ef1ba60d8cf3ae437f5130 /pkgtools/pkg_chk
parent6b5e98e17bc9efcfb1c645be7e300c6abeb94761 (diff)
downloadpkgsrc-76b588aec1b9e88d940567c85f7633d5632ef519.tar.gz
Add a -d option to avoid cleaning after building from source - for debuging
purposes or to speed up builds when the full WORKOBJDIR can be blown away later much more efficently. Bump version. OK: abs@
Diffstat (limited to 'pkgtools/pkg_chk')
-rw-r--r--pkgtools/pkg_chk/Makefile4
-rw-r--r--pkgtools/pkg_chk/files/pkg_chk.88
-rwxr-xr-xpkgtools/pkg_chk/files/pkg_chk.sh9
3 files changed, 13 insertions, 8 deletions
diff --git a/pkgtools/pkg_chk/Makefile b/pkgtools/pkg_chk/Makefile
index e6df44363a7..64f22385829 100644
--- a/pkgtools/pkg_chk/Makefile
+++ b/pkgtools/pkg_chk/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.88 2018/10/08 10:35:15 abs Exp $
+# $NetBSD: Makefile,v 1.89 2018/11/25 20:17:26 martin Exp $
-PKGNAME= pkg_chk-2.0.10
+PKGNAME= pkg_chk-2.0.11
CATEGORIES= pkgtools
OWNER= abs@NetBSD.org
diff --git a/pkgtools/pkg_chk/files/pkg_chk.8 b/pkgtools/pkg_chk/files/pkg_chk.8
index fc0287ca3b4..4e509660e5e 100644
--- a/pkgtools/pkg_chk/files/pkg_chk.8
+++ b/pkgtools/pkg_chk/files/pkg_chk.8
@@ -1,16 +1,16 @@
-.\" $NetBSD: pkg_chk.8,v 1.30 2014/04/21 21:32:26 abs Exp $
+.\" $NetBSD: pkg_chk.8,v 1.31 2018/11/25 20:17:26 martin Exp $
.\"
.\" Copyright (c) 2001 by David Brownlee (abs@NetBSD.org)
.\" Absolutely no warranty.
.\"
-.Dd May 2, 2008
+.Dd November 25, 2018
.Dt PKG_CHK 8
.Sh NAME
.Nm pkg_chk
.Nd check, and optionally update, installed packages
.Sh SYNOPSIS
.Nm
-.Op Fl aBbcfhiklNnpqrsuv
+.Op Fl aBbcdfhiklNnpqrsuv
.Op Fl C Ar conf
.Op Fl D Ar tags
.Op Fl L Ar file
@@ -61,6 +61,8 @@ Add the comma separated list of tags to those checked when parsing
.Pa pkgchk.conf .
Also includes
.Ev PKGCHK_TAGS .
+.It Fl d
+do not clean the build directories after updating packages from source.
.It Fl f
Fetch all missing/mismatched packages found.
Can be used with
diff --git a/pkgtools/pkg_chk/files/pkg_chk.sh b/pkgtools/pkg_chk/files/pkg_chk.sh
index 31ed87e68e1..6e86be00339 100755
--- a/pkgtools/pkg_chk/files/pkg_chk.sh
+++ b/pkgtools/pkg_chk/files/pkg_chk.sh
@@ -1,6 +1,6 @@
#!@SH@ -e
#
-# $Id: pkg_chk.sh,v 1.74 2018/10/08 10:35:15 abs Exp $
+# $Id: pkg_chk.sh,v 1.75 2018/11/25 20:17:26 martin Exp $
#
# TODO: Make -g check dependencies and tsort
# TODO: Make -g list user-installed packages first, followed by commented
@@ -35,6 +35,7 @@
PATH=${PATH}:/usr/sbin:/usr/bin
SUMMARY_FILES="pkg_summary.bz2 pkg_summary.gz pkg_summary.txt"
+DO_CLEAN="CLEANDEPENDS=yes"
bin_pkg_info2pkgdb()
{
@@ -665,7 +666,7 @@ pkg_install()
unset PKG_PATH
fi
elif [ -n "$opt_s" ]; then
- run_cmd "cd $PKGSRCDIR/$PKGDIR && ${MAKE} update CLEANDEPENDS=yes"
+ run_cmd "cd $PKGSRCDIR/$PKGDIR && ${MAKE} update ${DO_CLEAN}"
fi
if [ -z "$opt_n" -a -z "$opt_q" -a ! -d $PKG_DBDIR/$PKGNAME ];then
@@ -758,6 +759,7 @@ usage()
-b Use binary packages
-C conf Use pkgchk.conf file 'conf'
-D tags Comma separated list of additional pkgchk.conf tags to set
+ -d do not clean the pkg build dirs
-f Perform a 'make fetch' for all required packages
-g Generate an initial pkgchk.conf file
-h This help
@@ -803,7 +805,7 @@ verbose_var()
}
original_argv="$@" # just used for verbose output
-while getopts BC:D:L:P:U:abcfghiklNnpqrsuv ch; do
+while getopts BC:D:L:P:U:abcdfghiklNnpqrsuv ch; do
case "$ch" in
a ) opt_a=1 ;;
B ) opt_B=1 ;;
@@ -811,6 +813,7 @@ while getopts BC:D:L:P:U:abcfghiklNnpqrsuv ch; do
C ) opt_C="$OPTARG" ;;
c ) opt_a=1 ; opt_q=1 ; echo "** -c deprecated - use -a -q" 1>&2 ;;
D ) opt_D="$OPTARG" ;;
+ d ) DO_CLEAN="NOCLEAN=yes" ;;
f ) opt_f=1 ;;
g ) opt_g=1 ;;
h ) opt_h=1 ;;