Commit Graph

69 Commits

Author SHA1 Message Date
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 51ace543e3 Order the getopt(3) options alphabetically. 2003-01-10 10:55:25 +00:00
agc 82e88920e0 Add a pkgdb_remove_pkg() function and use it in pkg_delete(1).
Bump lib/version.h due to added functionality.
2003-01-10 10:17:21 +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
jschauma d571e4f803 Do not abort incomplete deletion if the cwd was removed. Instead, warn,
stay in no-longer existing dir and continue with removal of db-files;
otherwise, the packages contents would be removed, but the package not
uninstalled.  Pointed out by Grant in PR pkg/18384.  OK'd by hubertf.
2002-11-23 22:31:18 +00:00
christos 590fa669c8 - eliminate the hard-coding of pathnames in the default install.
- all command executions now use the path [execvp/execlp/system].
- normalize the macro names as <COMMAND>_CMD.
- in some OS's full pathnames for commands can still be provided, but this
  is not the default.

This was needed to fix -DTAR_FULLPATHNAME="/usr/bin/tar"
2002-10-17 03:31:33 +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
grant eda9e509bb sweep of errx/warnx, remove unnecessary trailing \n 2002-07-20 08:40:16 +00:00
yamt 80a776becb constify and make WARNS=2 clean. 2002-06-10 09:14:26 +00:00
yamt 51111fe65d - make last arg of findmatchingname void*.
- move some duplicated functions into lib/.
2002-06-09 13:23:44 +00:00
hubertf 99e2919b43 Improved error reporting: when a pkg pattern is given, and
/var/db/pkg does not exist (e.g. on a new system), say do!
2002-03-12 22:36:26 +00:00
drochner d3d59b3e4f print the package name on deletion errors 2002-02-15 12:42:34 +00:00
ross 2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +00:00
wiz df220a8153 Paragraph markup improvements, use Xr in one place. 2002-02-02 01:32:25 +00:00
agc c7f73c3331 "it's" is short for "it is".
The possessive pronoun is "its".
2001-10-04 19:44:48 +00:00
wiz e46d80027f Close some memory leaks.
Reported (incl. patch) by YAMAMOTO Takashi in pkg/12830.
2001-07-16 13:50:41 +00:00
wiz d422b80ea9 Uppercase Dt argument. 2001-06-05 11:58:55 +00:00
wiz 71c4cdb33c Fix date, and whitespace fixes. 2001-04-09 12:48:09 +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 4b8c25f151 Prevent some minor descriptor leaks. 2001-03-04 18:16:42 +00:00
hubertf f4f6931307 Alphabetize options. 2001-01-07 01:39:20 +00:00
lukem 279552d3db fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
  e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
  using `.Nm ""' if there's stuff following, or for the 2nd and so on
  occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
2000-11-07 06:43:24 +00:00
hubertf 8102826629 Keep *roff from eating things.
Noted in PR 10687 by NAKAJIMA Yoshihiro <nakayosh@kcn.ne.jp>
2000-07-26 15:18:09 +00:00
msaitoh f6f00e2615 remove extra period in SEE ALL section 2000-07-05 15:45:28 +00:00
hubertf 6fa913c454 Don't use asprintf() which isn't available on NetBSD 1.3.2. 2000-06-07 02:10:28 +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 b471b566f8 In require_delete(), actually use the expanded wildcard passed in via
@pkgdep.

Fixes PR 10056 by Dan McMahill <mcmahill@mtl.mit.edu>
2000-05-07 00:33:28 +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 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 1f6247c83d Add some sanity checks on what pkgdb_retrieve() returns.
Noted by D'Arcy J.M. Cain <darcy@druid.druid.net> on current-users.
1999-09-24 14:39:44 +00:00
hubertf d29beeb5df Remove the LogDir (/var/db/pkg/foo-x.y) _after_ we've run the DEINSTALL
script a second time (else there's nothing left to run ;).

Noticed by Jim Wise.
1999-09-09 01:36:30 +00:00
hubertf 8ee940971e Bring closer to /usr/share/misc/style with the aid of indent(1). 1999-08-24 00:48:37 +00:00
agc b62dac7b36 Provide full pathnames for chgrp(1), chown(1) and chmod(1), passing
them down from Makefile.inc on an OS-specific basis.  Fixes PR 8250
from Wiz <wiz@danbala.ifoer.tuwien.ac.at>.
1999-08-23 10:34:53 +00:00
hubertf 3fb135484d Call deinstall-script after files are removed:
deinstall <pkg-name> POST-DEINSTALL

(PKGTOOLS_REQD not bumped, as nothing in pkgsrc uses this so far)
1999-08-21 02:21:13 +00:00
hubertf c94d3e89cb Allow specifying a package name without a version.
If no (installed) package is found with the given name, "-[0-9]*" is
appended, and the search retried. Withs with any options to pkg_delete
and (esp.) pkg_info:

	pkg_info kde
	pkg_info -e emacs
	pkg_info -qL xlock
	pkg_delete -v emacs
1999-08-19 19:37:20 +00:00
garbled d1407362ba More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:43:46 +00:00
abs 7960b91475 Ignore files in /var/db/pkg (hint 'pkg_info pkgdb.byfile.db') 1999-03-22 06:04:16 +00:00
hubertf 04417da166 Replace static array of packages given to pkg_perform() with linear
list, using chopss' list functions (moved to lib/lpkg.c and
lib/lib.h).

Properly handle wildcards in arguments to "pkg_info", "pkg_delete" and
"pkg_admin check".

Some other minor cleanups.
1999-03-22 05:02:39 +00:00
abs 0dee719066 Fix '-f'. 1999-03-22 03:24:04 +00:00
hubertf 2b8601f04f be more cautious about preserving cwd 1999-03-20 00:29:19 +00:00
agc 4a5e3913cb Include <fcntl.h>, so that the definitions for O_* are defined. 1999-03-09 10:01:12 +00:00
hubertf e23d146ee6 TAILQ_FIRST and TAILQ_NEXT are not available on NetBSD 1.3 and 1.3.1,
define them for now.
Also fix a (unjustified) "variable may be used uninitialized" warning.
1999-03-09 02:20:49 +00:00
hubertf 4db56769f5 Add -R flag (similar to -r but the other way 'round) 1999-03-08 00:20:21 +00:00
mycroft d77575d3c8 Clean up SYNOPSIS formatting. 1999-03-07 11:58:22 +00:00
hubertf 5909aead8e Back out last fix to remove knowledge about LogDir from require_delete(),
because it wasn't in LogDir when it was enterred. :-/

XXX A better fix to this would be to put this save-and-restore-CWD back
in and also add it to recurse_require_find() and require_find(), but
this is too much action for nothing now.
1999-03-03 20:12:06 +00:00
hubertf fe7b9b969f Add -O option to only delete things from the pkgdb, and do not touch
anything else of the package or it's files. To be used on "make reinstall"
by the buildsystem (quite exclusively).
1999-03-03 17:29:58 +00:00
hubertf c9234a4571 - Put no assumptions into require_delete() on where the old CWD was
- Fix check for circular dependency
 - Most importantly: DO NOT remove the package if something depends
   on it, and -r isn't given!!!!! Without this change, pkg_delete was
   happily nuking away any package even if it had some dependencies.
1999-03-02 02:31:23 +00:00
agc fc1bcfe208 Quieten braindead gcc 2.8.1 unused warning. 1999-03-01 12:11:42 +00:00