pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc Update pkgtools/pkg_install to 20040813 (latest releas...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/60181248f843
branches:  trunk
changeset: 479688:60181248f843
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Fri Aug 20 20:09:53 2004 +0000

description:
Update pkgtools/pkg_install to 20040813 (latest release from the HEAD
branch of src).  Changes from version 20040730 include:

Modify pkg_info so that it will only print information on uninstalled
binary packages in the current working directory if -. is given on
the command line. If no -. is given, pkg_info will look for its
information in the ${PKG_DBDIR}.  This addresses a long-held gripe on
the part of a number of people, including myself (agc), which completely
violated the POLS.

Add a -q switch to pkg_admin, which allows it to work in a quiet
manner.  Fixes the change request in PR 26583, but in a different
manner, preserving existing behaviour and making the new behaviour
dependent upon a command line option.

diffstat:

 doc/CHANGES                                     |   3 +-
 pkgtools/pkg_install/files/add/extract.c        |   4 +-
 pkgtools/pkg_install/files/admin/main.c         |  34 ++++++++++++++++------
 pkgtools/pkg_install/files/admin/pkg_admin.1    |  12 ++++++--
 pkgtools/pkg_install/files/admin/pkg_admin.cat1 |  20 ++++++++-----
 pkgtools/pkg_install/files/bpm/bpm.sh.in        |   2 +-
 pkgtools/pkg_install/files/info/info.h          |   3 +-
 pkgtools/pkg_install/files/info/main.c          |  13 ++++++--
 pkgtools/pkg_install/files/info/perform.c       |  37 +++++++++++++++++++++---
 pkgtools/pkg_install/files/info/pkg_info.1      |   8 +++--
 pkgtools/pkg_install/files/info/pkg_info.cat1   |   7 +++-
 pkgtools/pkg_install/files/lib/ftpio.c          |   4 +-
 pkgtools/pkg_install/files/lib/pen.c            |   4 +-
 pkgtools/pkg_install/files/lib/pkgdb.c          |   4 +-
 pkgtools/pkg_install/files/lib/version.h        |   4 +-
 pkgtools/pkg_install/files/view/linkfarm.sh.in  |   2 +-
 pkgtools/pkg_install/files/view/pkg_view.sh.in  |   2 +-
 17 files changed, 114 insertions(+), 49 deletions(-)

diffs (truncated from 545 to 300 lines):

diff -r 95974318f239 -r 60181248f843 doc/CHANGES
--- a/doc/CHANGES       Fri Aug 20 17:32:50 2004 +0000
+++ b/doc/CHANGES       Fri Aug 20 20:09:53 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.6956 2004/08/20 11:48:59 salo Exp $
+$NetBSD: CHANGES,v 1.6957 2004/08/20 20:11:31 jlam Exp $
 
 Changes to the packages collection and infrastructure in 2004:
 
@@ -3923,3 +3923,4 @@
        Updated bozohttpd to 20040808 [mrg 2004-08-20]
        Updated ircII to 20040820 [mrg 2004-08-20]
        Updated ifile to 1.3.4 [salo 2004-08-20]
+       Updated pkg_install to 20040813 [jlam 2004-08-20]
diff -r 95974318f239 -r 60181248f843 pkgtools/pkg_install/files/add/extract.c
--- a/pkgtools/pkg_install/files/add/extract.c  Fri Aug 20 17:32:50 2004 +0000
+++ b/pkgtools/pkg_install/files/add/extract.c  Fri Aug 20 20:09:53 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extract.c,v 1.8 2004/08/06 16:57:03 jlam Exp $ */
+/*     $NetBSD: extract.c,v 1.9 2004/08/20 20:09:53 jlam Exp $ */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -11,7 +11,7 @@
 #if 0
 static const char *rcsid = "FreeBSD - Id: extract.c,v 1.17 1997/10/08 07:45:35 charnier Exp";
 #else
-__RCSID("$NetBSD: extract.c,v 1.8 2004/08/06 16:57:03 jlam Exp $");
+__RCSID("$NetBSD: extract.c,v 1.9 2004/08/20 20:09:53 jlam Exp $");
 #endif
 #endif
 
diff -r 95974318f239 -r 60181248f843 pkgtools/pkg_install/files/admin/main.c
--- a/pkgtools/pkg_install/files/admin/main.c   Fri Aug 20 17:32:50 2004 +0000
+++ b/pkgtools/pkg_install/files/admin/main.c   Fri Aug 20 20:09:53 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.15 2004/08/06 16:57:03 jlam Exp $   */
+/*     $NetBSD: main.c,v 1.16 2004/08/20 20:09:53 jlam Exp $   */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -8,7 +8,7 @@
 #include <sys/cdefs.h>
 #endif
 #ifndef lint
-__RCSID("$NetBSD: main.c,v 1.15 2004/08/06 16:57:03 jlam Exp $");
+__RCSID("$NetBSD: main.c,v 1.16 2004/08/20 20:09:53 jlam Exp $");
 #endif
 
 /*
@@ -73,18 +73,20 @@
 
 #define DEFAULT_SFX    ".t[bg]z"       /* default suffix for ls{all,best} */
 
-static const char Options[] = "K:SVbd:s:";
+static const char Options[] = "K:SVbd:qs:";
 
 int     filecnt;
 int     pkgcnt;
 
+static int     quiet;
+
 static int checkpattern_fn(const char *, void *);
 
 /* print usage message and exit */
 static void 
 usage(const char *prog)
 {
-       (void) fprintf(stderr, "usage: %s [-b] [-d lsdir] [-V] [-s sfx] command args ...\n"
+       (void) fprintf(stderr, "usage: %s [-bqSV] [-d lsdir] [-K pkg_dbdir] [-s sfx] command args ...\n"
            "Where 'commands' and 'args' are:\n"
            " rebuild                     - rebuild pkgdb from +CONTENTS files\n"
            " check [pkg ...]             - check md5 checksum of installed files\n"
@@ -345,7 +347,9 @@
 #ifdef PKGDB_DEBUG
                printf("%s\n", de->d_name);
 #else
-               printf(".");
+               if (!quiet) {
+                       printf(".");
+               }
 #endif
 
                filecnt += add1pkg(de->d_name);
@@ -387,7 +391,9 @@
                chdir(de->d_name);
 
                check1pkg(de->d_name);
-               printf(".");
+               if (!quiet) {
+                       printf(".");
+               }
 
                chdir("..");
        }
@@ -411,7 +417,9 @@
                err(EXIT_FAILURE, "Cannot chdir to %s/%s", _pkgdb_getPKGDB_DIR(), pkg);
 
        check1pkg(pkg);
-       printf(".");
+       if (!quiet) {
+               printf(".");
+       }
 
        chdir("..");
 
@@ -473,6 +481,10 @@
                        lsdirp = lsdir;
                        break;
 
+               case 'q':
+                       quiet = 1;
+                       break;
+
                case 's':
                        (void) strlcpy(sfx, optarg, sizeof(sfx));
                        use_default_sfx = FALSE;
@@ -554,7 +566,9 @@
                                                }
                                        } else {
                                                check1pkg(*argv);
-                                               printf(".");
+                                               if (!quiet) {
+                                                       printf(".");
+                                               }
 
                                                chdir("..");
                                        }
@@ -570,7 +584,9 @@
                } else {
                        checkall();
                }
-               printf("Done.\n");
+               if (!quiet) {
+                       printf("Done.\n");
+               }
 
        } else if (strcasecmp(argv[0], "lsall") == 0) {
                int saved_wd;
diff -r 95974318f239 -r 60181248f843 pkgtools/pkg_install/files/admin/pkg_admin.1
--- a/pkgtools/pkg_install/files/admin/pkg_admin.1      Fri Aug 20 17:32:50 2004 +0000
+++ b/pkgtools/pkg_install/files/admin/pkg_admin.1      Fri Aug 20 20:09:53 2004 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: pkg_admin.1,v 1.7 2004/03/30 15:28:08 tv Exp $
+.\"    $NetBSD: pkg_admin.1,v 1.8 2004/08/20 20:09:53 jlam Exp $
 .\"
 .\" Copyright (c) 1999-2002 Hubert Feyrer.  All rights reserved.
 .\"
@@ -28,7 +28,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 26, 2004
+.Dd August 13, 2004
 .Dt PKG_ADMIN 1
 .Os
 .Sh NAME
@@ -36,7 +36,7 @@
 .Nd perform various administrative tasks to the pkg system
 .Sh SYNOPSIS
 .Nm
-.Op Fl bSV
+.Op Fl bqSV
 .Nb -words
 .Op Fl d Ar lsdir
 .Bk -words
@@ -74,6 +74,12 @@
 .Ev PKG_DBDIR
 if it's set, otherwise it defaults to
 .Pa /var/db/pkg .
+.It Fl q
+Perform checks in a quiet manner.
+In normal operation,
+.Nm
+prints a '.' to standard output to indicate progress.
+This option suppresses this progress indicator.
 .It Fl S
 Set the shell glob pattern for package suffixes when matching package
 names for
diff -r 95974318f239 -r 60181248f843 pkgtools/pkg_install/files/admin/pkg_admin.cat1
--- a/pkgtools/pkg_install/files/admin/pkg_admin.cat1   Fri Aug 20 17:32:50 2004 +0000
+++ b/pkgtools/pkg_install/files/admin/pkg_admin.cat1   Fri Aug 20 20:09:53 2004 +0000
@@ -1,11 +1,11 @@
-PKG_ADMIN(1)            NetBSD General Commands Manual            PKG_ADMIN(1)
+PKG_ADMIN(1)                NetBSD Reference Manual               PKG_ADMIN(1)
 
 NNAAMMEE
      ppkkgg__aaddmmiinn - perform various administrative tasks to the pkg system
 
 SSYYNNOOPPSSIISS
-     ppkkgg__aaddmmiinn [--bbSSVV] [--dd _l_s_d_i_r] [--KK _p_k_g___d_b_d_i_r] [--ss _s_f_x___p_a_t_t_e_r_n] _c_o_m_m_a_n_d [args
-               ...]
+     ppkkgg__aaddmmiinn [--bbqqSSVV] [--dd _l_s_d_i_r] [--KK _p_k_g___d_b_d_i_r] [--ss _s_f_x___p_a_t_t_e_r_n] _c_o_m_m_a_n_d
+               [args ...]
 
 DDEESSCCRRIIPPTTIIOONN
      This command performs various administrative tasks around the NetBSD
@@ -27,11 +27,15 @@
              from the value of the environment variable PKG_DBDIR if it's set,
              otherwise it defaults to _/_v_a_r_/_d_b_/_p_k_g.
 
-     --SS      Set the shell glob pattern for package suffices when matching
+     --qq      Perform checks in a quiet manner.  In normal operation, ppkkgg__aaddmmiinn
+             prints a '.' to standard output to indicate progress.  This op-
+             tion suppresses this progress indicator.
+
+     --SS      Set the shell glob pattern for package suffixes when matching
              package names for llssaallll and llssbbeesstt to be the null suffix.
 
      --ss _s_f_x___p_a_t_t_e_r_n
-             Set the shell glob pattern for package suffices when matching
+             Set the shell glob pattern for package suffixes when matching
              package names for llssaallll and llssbbeesstt.  The default pattern is
              ".t[bg]z".
 
@@ -50,8 +54,8 @@
              the packages installed on the local machine against the checksum
              which was recorded in the +CONTENTS files at package installation
              time.  Symbolic links also have their integrity checked against
-             the recorded value at package installation time.  If no addi-
-             tional argument is given, the files of all installed packages are
+             the recorded value at package installation time.  If no addition-
+             al argument is given, the files of all installed packages are
              checked, else only the named packages will be checked (wildcards
              can be used here, see pkg_info(1)).
 
@@ -137,4 +141,4 @@
 AAUUTTHHOORRSS
      The ppkkgg__aaddmmiinn command was written by Hubert Feyrer.
 
-NetBSD 1.6                     January 26, 2004                     NetBSD 1.6
+NetBSD 1.6.2                    August 13, 2004                              3
diff -r 95974318f239 -r 60181248f843 pkgtools/pkg_install/files/bpm/bpm.sh.in
--- a/pkgtools/pkg_install/files/bpm/bpm.sh.in  Fri Aug 20 17:32:50 2004 +0000
+++ b/pkgtools/pkg_install/files/bpm/bpm.sh.in  Fri Aug 20 20:09:53 2004 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# $NetBSD: bpm.sh.in,v 1.1 2004/08/06 16:57:03 jlam Exp $
+# $NetBSD: bpm.sh.in,v 1.2 2004/08/20 20:09:53 jlam Exp $
 #
 # Copyright (c) 2003 Alistair G. Crooks.  All rights reserved.
 #
diff -r 95974318f239 -r 60181248f843 pkgtools/pkg_install/files/info/info.h
--- a/pkgtools/pkg_install/files/info/info.h    Fri Aug 20 17:32:50 2004 +0000
+++ b/pkgtools/pkg_install/files/info/info.h    Fri Aug 20 20:09:53 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: info.h,v 1.5 2004/05/08 14:51:23 jlam Exp $ */
+/* $NetBSD: info.h,v 1.6 2004/08/20 20:09:53 jlam Exp $ */
 
 /* from FreeBSD Id: info.h,v 1.10 1997/02/22 16:09:40 peter Exp */
 
@@ -64,6 +64,7 @@
 extern char *CheckPkg;
 extern size_t termwidth;
 extern lpkg_head_t pkgs;
+extern int usedot;
 
 extern void show_file(char *, char *);
 extern void show_var(const char *, const char *);
diff -r 95974318f239 -r 60181248f843 pkgtools/pkg_install/files/info/main.c
--- a/pkgtools/pkg_install/files/info/main.c    Fri Aug 20 17:32:50 2004 +0000
+++ b/pkgtools/pkg_install/files/info/main.c    Fri Aug 20 20:09:53 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.10 2004/05/08 14:51:23 jlam Exp $   */
+/*     $NetBSD: main.c,v 1.11 2004/08/20 20:09:53 jlam Exp $   */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -11,7 +11,7 @@
 #if 0
 static char *rcsid = "from FreeBSD Id: main.c,v 1.14 1997/10/08 07:47:26 charnier Exp";
 #else
-__RCSID("$NetBSD: main.c,v 1.10 2004/05/08 14:51:23 jlam Exp $");
+__RCSID("$NetBSD: main.c,v 1.11 2004/08/20 20:09:53 jlam Exp $");
 #endif
 #endif
 
@@ -50,7 +50,7 @@
 #include "lib.h"
 #include "info.h"
 
-static const char Options[] = "aBbcDde:fFhIiK:kLl:mNnpQ:qRrsSvV";
+static const char Options[] = ".aBbcDde:fFhIiK:kLl:mNnpQ:qRrsSvV";
 
 int     Flags = 0;
 Boolean AllInstalled = FALSE;
@@ -63,12 +63,13 @@
 char   *CheckPkg = NULL;
 size_t  termwidth = 0;
 lpkg_head_t pkgs;
+int    usedot;
 
 static void
 usage(void)
 {
        fprintf(stderr, "%s\n%s\n%s\n%s\n",
-           "usage: pkg_info [-BbcDdFfIikLmNnpqRrSsVvh] [-e package] [-l prefix]",
+           "usage: pkg_info [-.BbcDdFfhIikLmNnpqRrSsVv] [-e package] [-K pkg_dbdir] [-l prefix]",
            "                pkg-name [pkg-name ...]",



Home | Main Index | Thread Index | Old Index