Commit Graph

97 Commits

Author SHA1 Message Date
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
wiz
9552f78610 Whitespace, and remove unnecessary "" after .Nm. 2001-04-09 12:48:37 +00:00
wiz
63f7d31eeb Fix -r: Show REQ/+REQUIRE file for a package, if existing. Fixes pkg/12210.
Patch by Hubert Feyrer.
Note: REQ support has been taken out of bsd.pkg.mk in v1.628; since
pkg_create still supports it, we should support it in pkg_info too,
though.
2001-03-10 18:41:45 +00:00
wiz
c62849a451 Minor cleanup, no functional change. Patch by Hubert Feyrer. 2001-03-10 13:18:09 +00:00
wiz
f2496b9080 Test matching entries in /var/db/pkg on if they are directories.
Fixes pkg/12073 by Dan McMahill.
2001-03-06 10:30:54 +00:00
wiz
2ba98ef9a1 Add -V option to all pkgtools, which reports the version of the pkgtools.
Document it. While there, fix the ordering of the option descriptions in
some man pages. Set version to 20010305.
2001-03-05 16:53:12 +00:00
hubertf
5382dffae7 * Accept ".tbz" as an alternative pkg suffix to ".tbz" for pkg_add and
pkg_info
 * In pkg_create, compress with bzip2 if a .tbz suffix is given
 * Fix pkg_info to work via ftp, either via URL specified on command line
   or via one made up from PKG_PATH (if set)

XXX ALWAYS tacks on ".t[bg]z", NOT ".t[gb]z" !!!
2000-12-13 03:17:53 +00:00
hubertf
4b8a7a0e49 Fix pkg_info w/ URLs (*sigh*) 2000-11-30 10:09:15 +00:00
hubertf
5f69d95c26 Check right variable to see if it's a URL (pkg -> cp) 2000-10-11 11:08:04 +00:00
msaitoh
f6f00e2615 remove extra period in SEE ALL section 2000-07-05 15:45:28 +00:00
hubertf
f9aaf0a4e5 Allocate space & copy a string returned by a function that'll clobber it on
next call.
2000-06-19 00:55:11 +00:00
hubertf
29efdd4919 save another call to allocate space on the stack for something that's
definitely going to end up there.
2000-06-07 03:17:10 +00:00
hubertf
5cb5e5143c Don't read +CONTENTS files if not needed. 2000-05-15 23:14:42 +00:00
hubertf
8b8a982165 When expanding wildcards given on the command line, don't include
files (from /var/db/pkg). Only directories can contain pkgs.

Fixed PR 10083 by Dan McMahill <mcmahill@mtl.mit.edu>
2000-05-11 14:13:13 +00:00
hubertf
93b37b7f07 adjust copyright 2000-02-22 01:24:26 +00:00
hubertf
9d0c5bb4ee FTP wildcard depends code, initial commit.
Modulo some code cleanup, this gives NetBSD full wildcard support not
only in pkgsrc, but esp. for binary packages installed from local disk
and via FTP. For more information, see:

	http://www.feyrer.de/NetBSD/wildcards.html
2000-01-19 23:28:28 +00:00
hubertf
d46e75859c Reverse wording for -R. Per PR 9141 by Jim Bernard <jbernard@ox.mines.edu> 2000-01-17 00:48:52 +00:00
hubertf
bbb733f849 mention -Ss in usage 2000-01-10 14:53:56 +00:00
hubertf
402f80b9da - Comment code
- Minor re-indenting
 - Fix printing of @ignore in pkg_info (did this ever work?)
 - Fix installing of local wildcard dependencies (unused in main system)
 - Fix deleting of packages that depend on wildcard dependencies
   (fexist() is not enough there :-)
1999-12-01 14:51:50 +00:00
hubertf
ecf89794f5 Put support for @src back in.
For users who use private packages that use it. (Hi Bill!)
1999-11-29 20:09:54 +00:00
hubertf
406791739c Add code to include the size of a package into both the
installed version and binary packages. The size can be queried then
via pkg_info:

        xfeyrer @ noon% pkg_info -s xv
        Information for xv-3.10apl1:

        Size of this package in bytes: 4670692


        xfeyrer @ noon% pkg_info -S xv
        Information for xv-3.10apl1:

        Size in bytes including required pkgs: 14610165

While doing work on the size code, support for the @src directive was
removed (formerly enabled with the pkg_create -s switch, but unused in
our pkg system).  The new pkg_info -s and -S switches were tested on
installed, local (file) and remote (ftp) packages.

In bsd.pkg.mk, take special care for pkg_* versions that do not have
the pkg_create -s and -S switches and do not record size information
there.
1999-11-29 19:48:44 +00:00