Commit Graph

117 Commits

Author SHA1 Message Date
snj 8561540c0d Avoid comma abuse, remove a redundant word, and add a missing period. 2004-08-23 19:45:36 +00:00
cube 0d6cfa8af6 Provide a correct description of -R flag, as suggested by Jim Bernard in
PR 26698.
2004-08-23 19:41:05 +00:00
he c388a506cb Move the local array declaration of flist[] to the variable declaration
section, so that this compiles with gcc 2.95.3 as well.  Fixes build
problem for vax.
2004-08-18 19:10:15 +00:00
wiz e682d869e8 Bump date for previous. 2004-08-13 13:45:53 +00:00
wiz bf78254603 Sort options, add -K to usage. 2004-08-13 13:45:46 +00:00
agc 938f9f0f4f 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, which completely violated the POLS.

Bump version for this and previous pkg_admin modification.
2004-08-13 13:34:42 +00:00
hubertf 207fff285e pkg_info will not DTRT when applied to a binary package that doesn't
have all the files from ALL_FNAMES -- meta pkgs don't have +MTREE-files,
and as such it's impossible to retrieve _any_ information on them.
The fix is to only extract those +-files that are needed (as determined
by the command line options).

Problem noted by gavan@, code reviewed by grant@ and gavan@.
2004-08-07 01:55:06 +00:00
jlam 7b5bb00500 Bump date of manpage after addition of -Q flag to pkg_info(1). 2004-05-08 21:05:02 +00:00
jlam 04d5477295 Fix up definition of SHOW_BI_VAR, the prototype for show_var(), and the
usage string for pkg_info(1).  Also bump the version to 20040508.  From
pkg/25494 by FUKAUMI Naoki.
2004-05-07 21:38:57 +00:00
jlam 19baba8fb8 Add a new flag -Q (for "query") to pkg_info(1) to query the build
information for the definitions of specific variables that were saved
from build time, e.g.

	$ pkg_info -Q PKGPATH glib
	devel/glib
	$ pkg_info -Q PROVIDES glib
	/usr/pkg/lib/libglib.so.13
	/usr/pkg/lib/libgmodule.so.13
	/usr/pkg/lib/libgthread.so.13

Bump the version number of pkg_install(1) to 20040507.
2004-05-07 16:40:30 +00:00
itojun 1e803d1e8b missing period at the end of sentence 2004-04-19 18:43:26 +00:00
reed ef78b0e16e Some package names are extra long, like xscreensaver-gnome-4.13
and gdk-pixbuf-gnome-0.22.0nb1, so make sure that lines don't wrap.
Instead of having maxline based on MAXNAMESIZE, have it be based
on the length of the package name if longer than MAXNAMESIZE.
(This was discussed on tech-pkg list in November, 2003.)
2004-04-01 02:37:24 +00:00
wiz eca6d46226 Check pkgdb_open for correct return value.
From Peter Postma in PR 24863.
2004-03-22 11:42:51 +00:00
wiz b00ba831b1 Fix typo; new sentence, new line;
drop trailing spaces; add comma in enumeration.
2004-01-06 16:22:06 +00:00
hubertf 26d5e2165c Rework a bit to describe the pkg wildcards in their own
section, etc.
2004-01-06 16:15:06 +00:00
hubertf df32174c19 pkg_info(1) now also shows post-install message by default, if present 2004-01-06 15:48:47 +00:00
grant dd46f97f58 use the --use-compress-program argument to tar and do away with
the file descriptor handling mess in lib/file.c.

also use --fast-read where applicable.

result of pkg_info -B on 1.5ghz pentium4, linux:

			before		after
mozilla-1.4nb1.tgz	1.96sec		0.04sec
mozilla-1.4nb1.tbz	18.66sec	0.21sec

866mhz pentium3, NetBSD:

			before		after
mozilla-1.4nb1.tgz	2.22sec		0.07sec
mozilla-1.4nb1.tbz	16.29sec	0.34sec

-rw-r--r--    1 grant    users    13816195 Dec 20 13:59 mozilla-1.4nb1.tbz
-rw-r--r--    1 grant    users    15814227 Dec 20 13:58 mozilla-1.4nb1.tgz

XXX fetches over ftp/http still read the whole file.
2003-12-20 03:31:56 +00:00
wiz 0b46b8198f Fix typo, reported by Soren Jacobsen in PR 23666. 2003-12-06 08:25:39 +00:00
wiz 7e60425a84 Get rid of lots of system(3) (partly via vsystem) calls.
Previous version reviewed by agc.
Closes PR 20518.
2003-09-23 09:36:04 +00:00
jlam f310627cee Fix a bug I accidentally introduced in rev. 1.48 where a pkg_dbdir could no
longer be a symlink to a directory.
2003-09-10 17:28:59 +00:00
jlam bfb9e5680c Allow the package entries in the pkgdbdir to be either directories or
symlinks to directories.  This gives the user more rope, but lets those
who know what they're doing to do what they want.
2003-09-08 22:11:12 +00:00
wiz 255fb463e6 Bump date for previous. 2003-09-08 08:57:56 +00:00
jlam 1a174cde55 Merge src/usr.sbin/pkg_install on the pkgviews branch into the HEAD by
running:

        cd src/usr.sbin/pkg_install
        cvs update -Pd -A
        cvs update -Pd -j pkgviews-base -j pkgviews
2003-09-02 07:34:47 +00:00
itojun 49a751869e use bounded string op as much as possible 2003-07-14 06:17:54 +00:00
agc 7b2c1a6c22 Firstly, let's give credit where credit is due - the idea came from uwe.
Add the ability to pkg_info(1) and pkg_delete(1) to take a directory
name for the name of the package, so that shell-completion can help
when finding out information or deleting packages.
2003-06-19 08:54:29 +00:00
agc 2efa359891 When displaying full pathnames of the package contents (pkg_info -L pkg),
don't add a '/' between the prefix and the name if the prefix is "/".
This avoids annoying annoying double slash filenames when the prefix is "/".
2003-06-05 17:58:05 +00:00
agc 582cc64a31 Set the program name via setprogname(3). 2003-06-05 13:15:43 +00:00
seb 3273d1bc8b Consistently check findmatchingname() return value for error condition.
Among other this fixes 'pkg_info -e whateverpkg' exit status when
/var/db/pkg is missing: it is now 1 and not 0.
2003-03-24 21:44:45 +00:00
agc 2c442ad8d2 Introduce a pkgdb_dump() function, which dumps the cache file of
(filename, package) pairs.

Modify calling functions to use pkgdb_dump() directly, rather than
sequences of
	pkgdb_open
	{ pkgdb_iter, pkgdb_retrieve }
	pkgdb_close
calls.

Remove the now unnecessary pkgdb_iter function.
2003-03-15 20:49:25 +00:00
agc 17a35e2e99 Introduce the notion of "preserving" an installed package.
A preserved package may not be deleted by pkg_delete(1) (unless the -f
option is given), and the preserved capability will be carried into
any binary package. pkg_add(1) will also keep the preserved capability
if it was present in the binary package.

The "preserve" capability can be given to a package by using the
PKG_PRESERVE definition in a package Makefile in pkgsrc.

Ride on the recently-bumped lib/version.h for new functionality.
2003-01-10 11:55:44 +00:00
agc 9d61d2fff1 Add an enumerated type which is used in pkgdb_open() to specify
read-only or read-write mode.

Modify the return value of pkgdb_open() to have a more logical boolean
value.
2003-01-05 21:49:51 +00:00
agc 1b535c4ef0 Use EXIT_FAILURE, rather than hardcoding a value of '1' in err(3) and
errx(3).

Plug a memory leak by modifying the signature of
_pkgdb_getPKGDB_FILE() to take a buffer and its size, and fill in that
buffer and return it.
2003-01-05 21:27:20 +00:00
agc 03ce8889fa In addition to the existing "rc" modifier for a package version, add
support for "alpha" and "beta" versions, which sort before "rc".  Move
to table-based modifier recognition.
2002-11-14 09:40:23 +00:00
wiz 5e977f5ead Ispell. Begin new sentences on a new line. 2002-09-26 01:41:51 +00:00
uebayasi 6a49247a32 Sprinkle .Xrs to packages(7). 2002-09-24 03:18:00 +00:00
hubertf c2c6f0bc61 Don't warn about PKG_PATH being set when -e is given 2002-08-04 19:43:08 +00:00
yamt c819f95798 show_file: don't append '\n' if fopen failed. 2002-07-20 04:59:47 +00:00
yamt c4ca16e864 show_file: add an extra '\n' unless file ended with '\n'. 2002-07-19 19:18:26 +00:00
yamt 5eb02a32ce - remove handling of PKG_ADD_BASE.
- don't search current directory if PKG_PATH is set.
- don't prefer local directories.
- constify and cleanup.
discussed on tech-pkg.
2002-07-19 19:04:33 +00:00
yamt 80a776becb constify and make WARNS=2 clean. 2002-06-10 09:14:26 +00:00
yamt 56268cdf57 constify. 2002-06-09 14:14:49 +00:00
yamt 51111fe65d - make last arg of findmatchingname void*.
- move some duplicated functions into lib/.
2002-06-09 13:23:44 +00:00
yamt f214a6095e avoid a magic constant. 2002-06-09 03:32:45 +00:00
agc b66bb2992d Output @blddep directives properly when displaying PLISTs. 2002-03-05 14:18:07 +00:00
ross 2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +00:00
wiz bc145df2ee Use .Nx, replace empty line with .Pp. 2002-01-19 02:01:35 +00:00
agc cfa115fedf Explain a bit more fully the collating sequence which pkg_info(1) uses when
comparing package versions strings.
2002-01-10 10:46:28 +00:00
yamt 7bc6654ad8 disable unnecessary warning when PKG_PATH isn't set. 2001-08-21 18:38:40 +00:00
hubertf 194031e9be Don't do FTP stuff when operating on all pkgs
Adresses PR 13397 by Greg A. Woods <woods@weird.com>
2001-08-19 23:33:35 +00:00
agc d069ffa789 Add a -n switch to show the packages "needed" by a package (i.e. the
packages which are depended upon).

Provided in PR 13071 by woods@planix.com (Greg A. Woods), the addition
to the synopsis by myself, pedant-in-chief.
2001-08-13 20:08:58 +00:00