pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Update pkg_chk to 1.62:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c5935ea4ca6d
branches:  trunk
changeset: 499822:c5935ea4ca6d
user:      abs <abs%pkgsrc.org@localhost>
date:      Tue Sep 27 17:13:03 2005 +0000

description:
Update pkg_chk to 1.62:
    + Implement defining tag groups in pkgchk.conf. For example
      "mailserver = tll gta tycoon jeeves iris"
    + If the first tag on a line starts with a '-', there is now an
      implicit '*' before it
    + -B no longer implies -i

diffstat:

 doc/CHANGES                       |   3 +-
 pkgtools/pkg_chk/Makefile         |   4 +-
 pkgtools/pkg_chk/files/pkg_chk.8  |  50 +++++++++++++++++++++++++++++---------
 pkgtools/pkg_chk/files/pkg_chk.sh |  32 ++++++++++++++++++------
 4 files changed, 66 insertions(+), 23 deletions(-)

diffs (198 lines):

diff -r e41d17bd19f5 -r c5935ea4ca6d doc/CHANGES
--- a/doc/CHANGES       Tue Sep 27 16:38:11 2005 +0000
+++ b/doc/CHANGES       Tue Sep 27 17:13:03 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.11228 2005/09/27 16:38:39 abs Exp $
+$NetBSD: CHANGES,v 1.11229 2005/09/27 17:13:38 abs Exp $
 
 Changes to the packages collection and infrastructure in 2005:
 
@@ -4148,3 +4148,4 @@
        Updated editors/abiword to 2.2.10 [adam 2005-09-27]
        Updated editors/abiword-plugins to 2.2.10 [adam 2005-09-27]
        Updated devel/cpuflags to 0.94 [abs 2005-09-27]
+       Updated pkgtools/pkg_chk to 1.62 [abs 2005-09-27]
diff -r e41d17bd19f5 -r c5935ea4ca6d pkgtools/pkg_chk/Makefile
--- a/pkgtools/pkg_chk/Makefile Tue Sep 27 16:38:11 2005 +0000
+++ b/pkgtools/pkg_chk/Makefile Tue Sep 27 17:13:03 2005 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.19 2005/09/11 10:39:03 abs Exp $
+# $NetBSD: Makefile,v 1.20 2005/09/27 17:13:03 abs Exp $
 
-DISTNAME=      pkg_chk-1.61
+DISTNAME=      pkg_chk-1.62
 CATEGORIES=    pkgtools
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r e41d17bd19f5 -r c5935ea4ca6d pkgtools/pkg_chk/files/pkg_chk.8
--- a/pkgtools/pkg_chk/files/pkg_chk.8  Tue Sep 27 16:38:11 2005 +0000
+++ b/pkgtools/pkg_chk/files/pkg_chk.8  Tue Sep 27 17:13:03 2005 +0000
@@ -1,9 +1,9 @@
-.\"    $NetBSD: pkg_chk.8,v 1.11 2005/06/01 11:38:45 wiz Exp $
+.\"    $NetBSD: pkg_chk.8,v 1.12 2005/09/27 17:13:03 abs Exp $
 .\"
 .\" Copyright (c) 2001 by David Brownlee (abs%NetBSD.org@localhost)
 .\" Absolutely no warranty.
 .\"
-.Dd June 1, 2005
+.Dd September 27, 2005
 .Dt PKG_CHK 1
 .Sh NAME
 .Nm pkg_chk
@@ -28,7 +28,7 @@
 .Nm
 will skip dependent packages to reduce unnecessary rebuilding.
 .Pp
-.Sy Options
+.Ss Options
 .Bl -tag -width xxxxxxxx
 .It Fl a
 Automatically add any missing packages.
@@ -160,12 +160,29 @@
 and all packages checked.
 .El
 .Sh FILE FORMAT
-Each non comment line in
+Anything after a '#' on a line is considered a comment.
+
+Each line in
 .Pa pkgchk.conf
-should contain a package
-directory (such as sysutils/skill) followed by an optional list of
-tags.
-Tags are checked against the current machine's set:
+can either define a new tag or a package directory 
+(such as sysutils/skill), in each case followed by a list of tags.
+.Ss New tag groups
+Lines that define a new tag can be used to group tags to avoid
+repeating the same set of tags for multiple packages.
+For example:
+
+.Dl mailserver      \= tll gta tycoon jeeves iris
+
+would cause the mailserver tag to be set for any of the listed hosts.
+Note that the tags after the
+.Sq =
+are parsed with the same set of tag
+evaluation rules as those after package definitions (see later).
+.Ss Package definition lines
+Package directory lines are used to determine which packages are to be
+installed, checking the tags against the current defined set.
+.Ss Tag evaulation
+Tags on package directory are checked against the current machine's set:
 .Bl -bullet
 .It
 If a matched tag starts with a hyphen
@@ -177,11 +194,11 @@
 A line without any tags matches all machines.
 .It
 An asterisk
-.Em *
+.Sq *
 matches any tag.
 .It
 If a tag starts with an
-.Em /
+.Sq /
 then it is checked for as a readable filename.
 .It
 Tags cannot contain a hyphen
@@ -299,9 +316,18 @@
 .Pa pkgchk.conf
 file:
 .Bd -literal
-# Must install before others
+
+mailserver      = tll gta tycoon jeeves iris
+
+# Install before others
 devel/cpuflags
-pkgtools/xpkgwedge              x11
+pkgtools/pkg_chk
+
+# Mail related
+mail/exim                       *
+mail/spamassassin               mailserver
+mail/cyrus-imapd                mailserver
+mail/procmail                  mailserver bobhost
 
 shells/standalone-tcsh          *
 wm/pwm                          /etc/X11/XF86Config
diff -r e41d17bd19f5 -r c5935ea4ca6d pkgtools/pkg_chk/files/pkg_chk.sh
--- a/pkgtools/pkg_chk/files/pkg_chk.sh Tue Sep 27 16:38:11 2005 +0000
+++ b/pkgtools/pkg_chk/files/pkg_chk.sh Tue Sep 27 17:13:03 2005 +0000
@@ -1,6 +1,6 @@
 #!@SH@ -e
 #
-# $Id: pkg_chk.sh,v 1.19 2005/09/11 10:39:03 abs Exp $
+# $Id: pkg_chk.sh,v 1.20 2005/09/27 17:13:03 abs Exp $
 #
 # TODO: Make -g check dependencies and tsort
 # TODO: Variation of -g which only lists top level packages
@@ -250,7 +250,7 @@
            fi
            for dep in $DEPLIST ; do
                if [ ! -f $PACKAGES/$dep.tgz ] ; then
-                   fatal_maybe " ** $dep.tgz - binary package dependency missing"
+                   fatal_maybe " ** $dep.tgz - dependency missing for $pkg"
                    break 2
                fi
                PAIRLIST="${PAIRLIST}$dep.tgz $pkg.tgz\n"
@@ -340,10 +340,23 @@
     {
     sub("#.*", "");
     if (skip[$1])
-       { next; }
+       next;
     need = 0;
-    for (f = 1 ; f<=NF ; ++f) {                        # For each word on the line
+    if ($0 ~ /=/) {
+       split($0, tmp, "[ \t]*=");
+       taggroup = tmp[1];
+       sub("[ \t]*=", "=");
+       }
+    else
+       {
+       taggroup = ""
+       if (NF == 1)                    # If only one arg, we want pkg
+           need = 1;
+       }
+    for (f = 2 ; f<=NF ; ++f) {                # For each word on the line
        if (sub("^-", "", $f)) {        # If it begins with a '-'
+               if (f == 2)             # If first entry '-', assume '*'
+                   { need = 1; }
                if (and_expr_with_dict($f, taglist))
                        next;           # If it is true, discard
        } else {
@@ -351,8 +364,11 @@
                        need = 1;       # If it is true, note needed
        }
     }
-    if (NF == 1 || need)
-       { print $1 }
+    if (need)
+       if (taggroup)
+           taglist[taggroup] = 1
+       else
+           print $1;
     }
     ' < $CONF
     )
@@ -496,7 +512,7 @@
     fi
     echo 'Usage: pkg_chk [opts]
        -a      Add all missing packages (implies -c)
-       -B      Check the "Build version" of packages (implies -i)
+       -B      Check the "Build version" of packages
        -b      Install binary packages
        -C conf Use pkgchk.conf file 'conf'
        -c      Check installed packages against pkgchk.conf
@@ -543,7 +559,7 @@
 while [ $# != 0 ]; do
     case "$1" in
        -a )    opt_a=1 ; opt_c=1 ;;
-       -B )    opt_B=1 ; opt_i=1 ;;
+       -B )    opt_B=1 ;;
        -b )    opt_b=1 ;;
        -C )    opt_C="$2" ; shift;;
        -c )    opt_c=1 ;;



Home | Main Index | Thread Index | Old Index