Commit Graph

244 Commits

Author SHA1 Message Date
grant d5f2632867 minor style nit 2003-10-06 00:44:15 +00:00
wiz c87a7072e8 Replace strnncpy calls with strlcpy calls. Remove strnncpy.
Ok'ed by agc and hubertf. Verified working with editors/mule package.
2003-10-04 00:50:34 +00:00
wiz e2b595e0ce Indent, and remove some #if 0-ed code. 2003-10-03 19:55:34 +00:00
wiz 297eaf11ad Bump version to 20031003 for added HTTP support. 2003-10-03 15:41:03 +00:00
wiz 38e730c27c Add HTTP support.
Thanks to dillo@ for extensive review and jmmv@ for testing.
Remaining bugs are, of course, mine.

Closes PR 10006.
2003-10-03 15:40:27 +00:00
wiz fb41fcc067 Make compile with STANDALONE defined. 2003-09-25 22:31:35 +00:00
wiz c605c0c28e s/lukemftp/nbftp/, fix two typos. 2003-09-25 22:14:16 +00:00
christos b3601bdfc6 reset values when malloc fails. 2003-09-23 15:07:43 +00:00
wiz 2095b365b2 Avoid shadowing err. 2003-09-23 14:55:01 +00:00
wiz f220a7df77 Add prototype for remove_files. 2003-09-23 14:54:53 +00:00
wiz 161f3f684b Remove last vsystem caller and vsystem() itself. 2003-09-23 14:23:53 +00:00
agc 342644fea5 Add <sys/wait.h> so that we have a prototype for waitpid(3). 2003-09-23 14:18:01 +00:00
wiz acbbe02c81 Add some free()s in error cases. 2003-09-23 09:47:20 +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
grant 889c15684e bump PKGTOOLS_VERSION for identification purposes (despite the lack of
any functional change).
2003-09-23 07:10:53 +00:00
grant fd9dca3d28 don't assume mtree is in BINDIR, allow it to be overridden by
MTREE_CMD.
2003-09-23 06:19:45 +00:00
agc 4fe63c7eb9 Let pkg_admin(1) have a -S argument - some vendors' xargs(1) don't pass
a null ("") argument properly (hi, Sun), so make -S a synonym for -s "".

Don't dump core if no command is given to pkg_admin(1).

Print usage message to stderr, not stdout, and use the program name by
which it was invoked.

Bump pkg_install version to 20030918.
2003-09-18 09:56:20 +00:00
agc 54f9bdba40 Remove the names of arguments from function prototypes. 2003-09-17 13:27:42 +00:00
jlam 505c7e361d Update pkg_install to 20030914. Changes from version 20030913 are
ensuring that recursive pkg_delete'ing works by using the correct
pkg_dbdir to find packages.  This fixes recursive deleting if the
-K flag is passed to pkg_delete(1), and the named dbdir differs from
the default dbdir (/var/db/pkg).
2003-09-14 04:58:30 +00:00
jlam 2277c35f52 Update pkg_install to 20030913. Changes from version 20020912 are quieting
the file removal when deleting linkfarms if the expected file doesn't
exist.  Since the symlink isn't there, the mission is already accomplished,
so why bother with the warning?
2003-09-13 09:20:26 +00:00
jlam 1732738842 Update pkg_install to version 20030912. Changes from 200230907 are
adding two new options to pkg_admin(1) to simply using this utility to
list the bare package names that match patterns when looking in PKG_DBDIR:

      -b      Print only the basenames when matching package names for
              lsall and lsbest.

      -d lsdir
              Set lsdir as the path to the directory in which to find
              matching package names for lsall and lsbest.
2003-09-13 05:48:50 +00:00
jlam 7297f559c5 Inverted a test by mistake. 2003-09-09 08:22:39 +00:00
jlam 154a25e9c8 Output the name of the pkgdb file from which we are removing entries
instead of just "pkgdb".
2003-09-08 22:19:25 +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
jlam 0d7b7e0f8f Bump version to 20030907. Changes from previous version include:
* Teaching pkg_add(1) to be smarter about how to add a depoted packge.

    * "pkg_delete foo" only deletes foo if it's a unique package.

    * Teach pkg_admin(1) two new commands "add" and "delete" for working
      with pkgdb.byfile.db.

    * pkg_view(1) uses the new pkg_admin(1) commands to keep the
      pkgdb.byfile.db files consistent in each view.
2003-09-08 07:13:29 +00:00
jlam 140fe23a05 strlen(pkgname) only returns the number of characters preceding the NUL,
but the size of the data field in the pkgdb.byfile.db file is the length of
the string plus 1 for the NUL.  Fix this check so that removing all of the
files belonging to pkgname from pkgdb.byfile.db works again.
2003-09-08 06:41:23 +00:00
jlam 5fc555d16b Correct the documentation of the return values for pkgdb_open() and
pkgdb_remove_pkg().
2003-09-08 05:34:35 +00:00
jlam 8b2d4b4f3c Bump version to 20020824 after allowing users to use more than the default
view.
2003-09-03 12:52:30 +00:00
jlam b3a911d206 Remove parts that were there just to allow this to compile on NetBSD ~1.3.
We have this in pkgsrc and bootstrap-pkgsrc for those systems.
2003-09-03 12:44:01 +00:00
jlam 0430171011 Check the return from read on the file descriptor for the ftp process: if
we don't get anything, then it's an error.  From cb@netbsd.org in private
email.
2003-09-03 07:33:37 +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 f48c4e3753 Fix error in memory handling. 2003-08-25 10:52:23 +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
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
tacha 7a3ec6c576 Call tgetent only when TERM environment is set. 2003-06-23 16:46:57 +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 6dbbe09cdf in delete_package(), always warn if there is a checksum mismatch,
improve text.
2003-04-14 23:42:21 +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 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