Commit Graph

437 Commits

Author SHA1 Message Date
wiz c9af3bba1c Drop trailing space. 2003-09-02 07:42:08 +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
tron ce691fb888 Replace calls to vsystem() by calls to fexec(). 2003-09-01 17:43:23 +00:00
tron f48c4e3753 Fix error in memory handling. 2003-08-25 10:52:23 +00:00
tron a58c832dd6 Replace calls to vsystem() by calls to fexec() or fcexec(). 2003-08-25 10:35:28 +00:00
tron c28355d067 Add a new library function fcexec() which allows to run a command after
changing the current directory.
2003-08-25 10:23:41 +00:00
tron 43b89589d9 Use "rm -fr" consistently. 2003-08-25 10:23:06 +00:00
tron 2f1b656bac Replace a few calls to vsystem() with calls to fexec() to speed up
operations.
2003-08-24 21:11:37 +00:00
tron 777ed45553 Add a new utility function which use vfork(2) and exec(2) directly instead
of system(3) to run an external program.
2003-08-24 21:10:47 +00:00
grant 3319bc243a we already print "creating package ..." in pkg_perform(), no need to
say it twice :)
2003-08-10 12:27:08 +00:00
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