Commit Graph

256 Commits

Author SHA1 Message Date
jlam 0c45ef07f3 Don't warn and abort if a package with the same ${PKGBASE} already exists
if we're installed a depoted package.
2004-01-14 23:32:36 +00:00
grant 99871d087e use ${MACHINE_ARCH} instead of what uname() puts into utsname.machine.
the former represents the CPU architecture, which is what is recorded
in binary packages.

also allow the OS name to be overridden, as pkgsrc doesn't always use
the value of utsname.sysname.

bump version to 20030113.
2004-01-13 08:30:34 +00:00
hubertf 81887c8837 update for -D being default now for pkg_info 2004-01-06 15:51:44 +00:00
hubertf d7b7063649 In the "quick depends pre-scan", first print all bad matching depends,
then exit (instead printing one conflicting pkg/version on each run).
2004-01-04 01:47:35 +00:00
agc 2bd28cbd5e Add a simple text menu-based binary package manager, bpm(1).
bpm uses ftp(1) and pkg_add(1) to allow a menu-based addition of
binary packages from a URL.  It first displays a list of categories,
and, within categories, binary packages, which can be added to the
local system simply by choosing them from a menu.

If no valid categories are found, a warning message will be displayed
(it is usually caused by people running NetBSD-current, and there are
rarely binary packages provided for such a fast-moving target, and the
"-r release" command-line switch to bpm(1) should be used).

Bump the pkg_install version number for this.
2003-12-21 11:31:46 +00:00
grant 16fffca4df avoid uninitialized variable. noted by wiz. 2003-12-20 10:09:20 +00:00
grant fc04f37975 crank version. 2003-12-20 03:41:31 +00:00
grant dd46f97f58 use the --use-compress-program argument to tar and do away with
the file descriptor handling mess in lib/file.c.

also use --fast-read where applicable.

result of pkg_info -B on 1.5ghz pentium4, linux:

			before		after
mozilla-1.4nb1.tgz	1.96sec		0.04sec
mozilla-1.4nb1.tbz	18.66sec	0.21sec

866mhz pentium3, NetBSD:

			before		after
mozilla-1.4nb1.tgz	2.22sec		0.07sec
mozilla-1.4nb1.tbz	16.29sec	0.34sec

-rw-r--r--    1 grant    users    13816195 Dec 20 13:59 mozilla-1.4nb1.tbz
-rw-r--r--    1 grant    users    15814227 Dec 20 13:58 mozilla-1.4nb1.tgz

XXX fetches over ftp/http still read the whole file.
2003-12-20 03:31:56 +00:00
grant 683625bd0a suppress a diagnostic message unless -v is used. 2003-12-20 02:37:49 +00:00
grant 70ba7aa408 check the OS, architecture and version of a package against the host
and spit out a warning if any of them differ. bail if the OS or arch
differ. installation can be forced with -f.

sanity checked by simonb. fixes PR pkg/18966 from mrg.
2003-12-20 00:47:18 +00:00
wiz e0cae3a80b Bump version for wait-for-child fix. 2003-11-21 22:05:06 +00:00
wiz 4e536677a2 Wait for decompress child before continuing.
Closes PR 23526 by Ron Roskens.
2003-11-21 22:04:32 +00:00
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