Commit Graph

427 Commits

Author SHA1 Message Date
salo
d6a8052848 netbsd.org->NetBSD.org 2003-07-25 12:14:10 +00:00
itojun
49a751869e use bounded string op as much as possible 2003-07-14 06:17:54 +00:00
itojun
041bd7648a use bounded string op as much as possible 2003-07-14 06:00:44 +00:00
wiz
88c9d9d14b Fix typo. 2003-07-04 12:17:32 +00:00
wiz
16562717af Quote % characters in macro lines. 2003-06-26 10:09:05 +00:00
hubertf
33ec91dbc6 deleting as non-root works fine, so don't insist on running as root 2003-06-25 23:12:42 +00:00
tacha
7a3ec6c576 Call tgetent only when TERM environment is set. 2003-06-23 16:46:57 +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
706a03ef9c Make the "-f" switch to pkg_delete(1) into a counter. Require two "-f"
switches to delete a package that has been preserved. Document this
change.
2003-06-12 13:50:38 +00:00
agc
bc4c2ec6be Avoid one more annoying duplicated slash when prefix is "/" in pkg_create(1),
and one in the db cache file, which was causing pkg_info -F to produce the
wrong results with a prefix of "/".
2003-06-12 13:29:32 +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
wiz
d75f1336b3 Uppercase URL. 2003-05-14 14:30:59 +00:00
seb
2eb61ac136 pkg_add fix:
When doing quick pre-check if any conflicting dependencies are installed
and a dependency is not found installed do not try to search for a wildcarded
(-[0-9]* suffix) package if the dependency was already wildcarded.

This prevent something like 'p5-Net-DNS-0.33' reported as an already
installed version of 'p5-Net-[0-9]*' as a dependency.
Before this fix 'p5-Net-[0-[0-9]*' would have been incorrectly searched for.

Reviewed by hubertf@.

Bump PKGTOOLS_VERSION to 20030423.
2003-04-23 10:02:23 +00:00
hubertf
4af963d89d Rename "upgrade" variable to "Replace" (etc.) as that is what it's really
for. Assorted text updates.
2003-04-22 01:17:03 +00:00
grant
6bc4824cf3 crank PKGTOOLS_VERSION for pkg_admin getcwd() fix. 2003-04-17 13:38:02 +00:00
grant
5cea86225d don't pass NULL as the 2nd arg to getcwd(), ala lib/path.c.
fixes 'pkg_admin lsall' and 'pkg_admin lsbest' on Solaris and probably
other platforms where getcwd() doesn't allocate a buffer when the 2nd
arg is NULL.

ok'd by simonb@
2003-04-17 13:32:21 +00:00
grant
6dbbe09cdf in delete_package(), always warn if there is a checksum mismatch,
improve text.
2003-04-14 23:42:21 +00:00
grant
680230355c improve a message 2003-04-11 19:57:06 +00:00
grant
b862bb2e33 bump version for last. 2003-04-11 14:16:45 +00:00
grant
c839e381ae fix comment, thanks simon. 2003-04-10 23:38:16 +00:00
grant
a8bd964bf8 min_free: Return size in a uint64_t since off_t isn't 64 bits on
all operating systems.
2003-04-10 23:31:26 +00:00
grant
dc7d730383 allow bzip2 support to work on earlier systems where tar has no -j
option, including NetBSD 1.5 and 1.6. noted by wiz.

also handle tar.gz, tar.bz2 and .tar filenames, and bomb with a useful
error if we don't know to handle a file.
2003-04-10 16:25:25 +00:00
grant
ef79ced85d improve error when there's not enough space to unpack in PKG_TMPDIR. 2003-04-10 16:12:38 +00:00
grant
4253e0d3e1 pass -j to tar to read bzip2 binary pkgs.
bump PKGTOOLS_VERSION to 20030410.
2003-04-10 05:08:55 +00:00
hubertf
25f2d6e581 Bump to "20030325" after today's changes from seb and me 2003-03-24 23:33:44 +00:00
seb
f34edd6ece Pkg_add fix: if an install script is present move it into LogDir
(PKG_DBDIR/PKGNAME).  Address PR pkg/20856 and part of PRs pkg/20852,
pkg/20853 and pkg/20854 by FUKAUMI Naoki <naoki at fukaumi dot
org>.

Note: with this change pkg_tarup can now produce reusable binary
packages from installed packages when they depend on an install
script.
2003-03-24 22:13:54 +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
hubertf
6b5ef93cc3 Implement remaining TODO item in pkg upgrade (pkg_add -u):
* Upgrade step 1/4: Check if the new version is ok with all pkgs
 * (from +REQUIRED_BY) that require this pkg

Inspired by bsd.pkg.mk's upgrade(?) target.
2003-03-24 13:47:13 +00:00
hubertf
89b4984304 Catch one more place that could result in Current not being set properly
(and thus in the execution of "rm -fr /") if ^C is pressed at the wrong time.

See also PR 19436.
2003-03-15 20:54:25 +00:00
agc
9d52ce445c Bump version string for pkgdb_dump changes. 2003-03-15 20:50:13 +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
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
abs
e6dc31f0dc Crank PKGTOOLS_VERSION to 20030202 for last_file fix 2003-02-02 20:54:17 +00:00
abs
fd83215c8b Allow '%D' to be used when no last_file available. Fixes binary package
installation of gnome-dirs.
2003-02-02 12:59:53 +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
51ace543e3 Order the getopt(3) options alphabetically. 2003-01-10 10:55:25 +00:00
agc
295b90edfd order the getopt options alphabetically. 2003-01-10 10:43:50 +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
60c7c151cc In pkgdb_remove(), use the return value from (*db->del), rather than
explicitly setting and checking errno.

Do some CSE in pkgdb_iter().

Use the db access functions in the proper manner.
2003-01-06 10:03: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
thorpej
61456e3f52 Avoid conflict with reserved identifier "exp". 2002-12-06 15:15:29 +00:00
grant
0a51ab8aee replace use of alloca() with the more portable malloc()/free(). 2002-11-29 08:31:06 +00:00
taca
445a837973 Add 'p' option to TARX_CMD's argument for preserving file mode.
This fixes the problem that pkg_add(1) drops setuid/setgid bit.

This problem occurs on pax(1) based tar environment.
pkgtools/pkg_install should be fixed, too.
2002-11-28 23:52:31 +00:00
agc
64f5916734 Don't use special-case code for the '_' modifier, just add it to the
modifier table.  Fixes a problem pointed out by Rene Hexel.
2002-11-26 14:46:45 +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
agc
ab7e447f08 Bump version number after adding "alpha" and "beta" version modifier
recognition.
2002-11-14 11:57:15 +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
grant
f437cb0639 s/anyways/anyway/ 2002-11-05 07:34:31 +00:00