NetBSD Problem Report #26583
Received: (qmail 20033 invoked by uid 605); 7 Aug 2004 16:38:16 -0000
Message-Id: <E1BtTke-0001s2-00@wwid.roland-illig.de>
Date: Sat, 07 Aug 2004 18:08:56 +0200
From: Roland Illig <roland.illig@gmx.de>
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: Roland Illig <roland.illig@gmx.de>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: "pkg_admin check" should be less verbose<synopsis of the problem (one line)>
X-Send-Pr-Version: 3.113.1
X-GNATS-Notify:
>Number: 26583
>Category: pkg
>Synopsis: "pkg_admin check" should be less verbose
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: agc
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Aug 07 16:39:00 +0000 2004
>Closed-Date: Fri Aug 13 13:35:51 +0000 2004
>Last-Modified: Fri Aug 20 20:12:01 +0000 2004
>Originator: Roland Illig
>Release:
>Organization:
>Environment:
System: Linux wwid 2.4.22-1-k7 #5 Sat Oct 4 14:11:12 EST 2003 i686 GNU/Linux
Architecture: i686
>Description:
"pkg_admin check" outputs lots of dots when processing the installed
packages. I find this looks ugly. :)
>How-To-Repeat:
$ pkg_admin check
>Fix:
--- pkgtools/pkg_install/files/admin/main.c 6 Aug 2004 16:57:03 -0000 1.15
+++ pkgtools/pkg_install/files/admin/main.c 7 Aug 2004 16:02:09 -0000
@@ -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:s:v";
int filecnt;
int pkgcnt;
+static int verbose_flag = FALSE;
+
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 [-b] [-d lsdir] [-V] [-v] [-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 (verbose_flag) {
+ printf(".");
+ }
#endif
filecnt += add1pkg(de->d_name);
@@ -387,7 +391,9 @@
chdir(de->d_name);
check1pkg(de->d_name);
- printf(".");
+ if (verbose_flag) {
+ printf(".");
+ }
chdir("..");
}
@@ -395,7 +401,9 @@
pkgdb_close();
- printf("\n");
+ if (verbose_flag) {
+ printf("\n");
+ }
printf("Checked %d file%s from %d package%s.\n",
filecnt, (filecnt == 1) ? "" : "s",
pkgcnt, (pkgcnt == 1) ? "" : "s");
@@ -411,7 +419,9 @@
err(EXIT_FAILURE, "Cannot chdir to %s/%s", _pkgdb_getPKGDB_DIR(), pkg);
check1pkg(pkg);
- printf(".");
+ if (verbose_flag) {
+ printf(".");
+ }
chdir("..");
@@ -478,6 +488,10 @@
use_default_sfx = FALSE;
break;
+ case 'v':
+ verbose_flag = TRUE;
+ break;
+
default:
usage(prog);
/* NOTREACHED */
@@ -554,7 +568,9 @@
}
} else {
check1pkg(*argv);
- printf(".");
+ if (verbose_flag) {
+ printf(".");
+ }
chdir("..");
}
@@ -563,14 +579,18 @@
argv++;
}
- printf("\n");
+ if (verbose_flag) {
+ printf("\n");
+ }
printf("Checked %d file%s from %d package%s.\n",
filecnt, (filecnt == 1) ? "" : "s",
pkgcnt, (pkgcnt == 1) ? "" : "s");
} else {
checkall();
}
- printf("Done.\n");
+ if (verbose_flag) {
+ printf("Done.\n");
+ }
} else if (strcasecmp(argv[0], "lsall") == 0) {
int saved_wd;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->agc
Responsible-Changed-By: cube
Responsible-Changed-When: Wed Aug 11 14:33:25 UTC 2004
Responsible-Changed-Why:
agc will handle it.
From: "Alistair G. Crooks" <agc@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/26583 CVS commit: src/usr.sbin/pkg_install/admin
Date: Fri, 13 Aug 2004 13:28:46 +0000 (UTC)
Module Name: src
Committed By: agc
Date: Fri Aug 13 13:28:46 UTC 2004
Modified Files:
src/usr.sbin/pkg_install/admin: main.c pkg_admin.1
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -r1.44 -r1.45 src/usr.sbin/pkg_install/admin/main.c
cvs rdiff -r1.30 -r1.31 src/usr.sbin/pkg_install/admin/pkg_admin.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: agc
State-Changed-When: Fri Aug 13 13:35:14 UTC 2004
State-Changed-Why:
agc added some code to address this change-request, but in a different
way from the suggestion in the PR.
From: "Johnny C. Lam" <jlam@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/26583 CVS commit: pkgsrc/pkgtools/pkg_install/files
Date: Fri, 20 Aug 2004 20:09:54 +0000 (UTC)
Module Name: pkgsrc
Committed By: jlam
Date: Fri Aug 20 20:09:53 UTC 2004
Modified Files:
pkgsrc/pkgtools/pkg_install/files/add: extract.c
pkgsrc/pkgtools/pkg_install/files/admin: main.c pkg_admin.1
pkg_admin.cat1
pkgsrc/pkgtools/pkg_install/files/bpm: bpm.sh.in
pkgsrc/pkgtools/pkg_install/files/info: info.h main.c perform.c
pkg_info.1 pkg_info.cat1
pkgsrc/pkgtools/pkg_install/files/lib: ftpio.c pen.c pkgdb.c version.h
pkgsrc/pkgtools/pkg_install/files/view: linkfarm.sh.in pkg_view.sh.in
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -r1.8 -r1.9 pkgsrc/pkgtools/pkg_install/files/add/extract.c
cvs rdiff -r1.15 -r1.16 pkgsrc/pkgtools/pkg_install/files/admin/main.c
cvs rdiff -r1.7 -r1.8 pkgsrc/pkgtools/pkg_install/files/admin/pkg_admin.1
cvs rdiff -r1.6 -r1.7 pkgsrc/pkgtools/pkg_install/files/admin/pkg_admin.cat1
cvs rdiff -r1.1 -r1.2 pkgsrc/pkgtools/pkg_install/files/bpm/bpm.sh.in
cvs rdiff -r1.5 -r1.6 pkgsrc/pkgtools/pkg_install/files/info/info.h
cvs rdiff -r1.10 -r1.11 pkgsrc/pkgtools/pkg_install/files/info/main.c \
pkgsrc/pkgtools/pkg_install/files/info/pkg_info.1
cvs rdiff -r1.15 -r1.16 pkgsrc/pkgtools/pkg_install/files/info/perform.c
cvs rdiff -r1.8 -r1.9 pkgsrc/pkgtools/pkg_install/files/info/pkg_info.cat1
cvs rdiff -r1.9 -r1.10 pkgsrc/pkgtools/pkg_install/files/lib/ftpio.c
cvs rdiff -r1.14 -r1.15 pkgsrc/pkgtools/pkg_install/files/lib/pen.c
cvs rdiff -r1.20 -r1.21 pkgsrc/pkgtools/pkg_install/files/lib/pkgdb.c
cvs rdiff -r1.32 -r1.33 pkgsrc/pkgtools/pkg_install/files/lib/version.h
cvs rdiff -r1.3 -r1.4 pkgsrc/pkgtools/pkg_install/files/view/linkfarm.sh.in
cvs rdiff -r1.5 -r1.6 pkgsrc/pkgtools/pkg_install/files/view/pkg_view.sh.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Johnny C. Lam" <jlam@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/26583 CVS commit: pkgsrc/doc
Date: Fri, 20 Aug 2004 20:11:31 +0000 (UTC)
Module Name: pkgsrc
Committed By: jlam
Date: Fri Aug 20 20:11:31 UTC 2004
Modified Files:
pkgsrc/doc: CHANGES
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -r1.6956 -r1.6957 pkgsrc/doc/CHANGES
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.