Commit Graph

208 Commits

Author SHA1 Message Date
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
dmcmahill 43301f1fee Fix a buffer overrun bug. The TOOBIG macro had some hard coded constants
which needed to be set at compile time but weren't (to handle the case where
TAR_CMD was set to something other than "tar", eg "gtar".  In addition to
the constants being wrong, the wrong directory name was being examined for
its string length.

Add a few comments to hopefully avoid having this problem come back.
2000-07-24 20:09:15 +00:00
hubertf c0f021878e handle NULL pen variable more gracefully in find_play_pen() 2000-07-24 02:54:22 +00:00
hubertf 0379a1727a remove/hide some debugging code 2000-07-06 16:06:36 +00:00
hubertf 7ca7a7f658 Only calculate MD5 checksum for plain files.
As a side effect, fixes handlink of links to dirs.
2000-07-05 20:18:16 +00:00
hubertf 2b35b3d322 * Move comment around a bit
* Document some return code
2000-07-05 20:17:04 +00:00
msaitoh f6f00e2615 remove extra period in SEE ALL section 2000-07-05 15:45:28 +00:00
hubertf 65162fd077 be sure to set pkgdbp to NULL after closing the db. 2000-06-19 13:28:06 +00:00
hubertf f9aaf0a4e5 Allocate space & copy a string returned by a function that'll clobber it on
next call.
2000-06-19 00:55:11 +00:00
hubertf 74056630be remove stale debugging code 2000-06-18 01:31:23 +00:00
hubertf e5b91ee82e * shuffle variable names in findbestmatchingname_fn() around
a bit, to make them more descriptive
 * in findbestmatchingname_fn, fix a bug where a null pointer wasn't
   caught (I wonder why we didn't actually hit that case...)
 * Bugfix in findbestmatchingname_fn: when comparing, strip off any
   trailing ".tgz", as this will give wrong results. "1.9.8.tgz" was
   found to be greater than "1.9.8.1".
2000-06-18 01:29:30 +00:00
hubertf 7aed2e5cfb use /var/tmp consistently. (XXX need to re-visit if we ever
put pkg_add on a install floppy)
2000-06-18 01:29:17 +00:00
tron 1b5dabcf75 Update prototype for "extract_plist()". 2000-06-17 11:30:49 +00:00
sjg 7bd1e30c61 extract_plist() should inform caller when it aborts extract 2000-06-16 23:49:17 +00:00
sjg cc95d19ae1 avoid possible overflow of exit status 2000-06-16 23:48:23 +00:00
hubertf 2b57637552 ftp(1)'s "ls" now lists files/dirs plus attributes (much like "dir" did
before). Use "nlist" to still get filenames only.
Needed to expand wildcards.
2000-06-08 00:26:48 +00:00
hubertf 29efdd4919 save another call to allocate space on the stack for something that's
definitely going to end up there.
2000-06-07 03:17:10 +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 0948b6f2cb pkg_delete -r was done by Chris Hopps (I used the same code do implement
pkg_delete -R on that later on).
2000-05-16 16:38:15 +00:00
hubertf 7f040da3cd Don't remove any INSTALL scripts. Just in case someone needs them later
(e.g. to tar up the pkg again, and install it elsewhere).
2000-05-16 15:59:16 +00:00
hubertf 5cb5e5143c Don't read +CONTENTS files if not needed. 2000-05-15 23:14:42 +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 d06e2d8e2e Add "lsall" and "lsbest" commands to pkg_admin, to find all/best
package matching a certain pattern. Examples:

            yui# cd /usr/pkgsrc/packages/i386ELF/All/
            yui# ls unzip*
            unzip-5.40.tgz  unzip-5.41.tgz
            yui# pkg_admin lsall 'unzip*'
            unzip-5.40.tgz
            unzip-5.41.tgz
            yui# pkg_admin lsall 'unzip>=5.40'
            unzip-5.40.tgz
            unzip-5.41.tgz
            yui# pkg_admin lsall 'unzip>=5.41'
            unzip-5.41.tgz
            yui# pkg_admin lsbest 'unzip>=5.40'
            unzip-5.41.tgz
            yui# pkg_admin lsall /usr/pkgsrc/packages/i386ELF/All/'{mit,unproven}-pthread*'
            /usr/pkgsrc/packages/i386ELF/All/mit-pthreads-1.60b6.tgz

This adds a shell/user-interface to pkg-patterns, which are a superset
of sh/csh patterns and can't be expanded by any shell.
2000-05-08 22:48:42 +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
mycroft 411fdd599d Fix obvious typo in previous commit. This could not possibly compile. 2000-04-30 07:57:45 +00:00
hubertf c669928eeb Print appropriate warning if the directory of a @dirrm is not present
at all.

Pointed out & fix reviewed by Thomas Klausner.
2000-04-29 22:39:58 +00:00
hubertf d071991a9a Don't abort during quick depends pre-scan when -f is used 2000-04-01 23:31:39 +00:00
hubertf f996345ebf Improve the last change.
Handling all kinds of wildcards properly would be hard, though it should
handle some cases better now. Esp. ones with '-' in the pkg(!) name, and/or
ones with dewer relational versions. I.e. the teTeX-share>1.97 case should
work now.
2000-04-01 22:12:45 +00:00
augustss 93336646e4 Make this compile again. 2000-04-01 14:54:51 +00:00
hubertf 404096ac77 In the "quick depends pre-check" don't only try to replace anything
after a "-" with the "more liberal pattern", but also anything after
any pkg wildcard.

That way if someone has teTeX-share-1.0 installed and pkg_adds
teTeX-1.0.7 (which wants teTeX-share>1.0.2), it will be caught.

XXX This "quick depends pre-check" would be nice to be done in
    bsd.pkg.mk as well
2000-03-31 22:12:56 +00:00
hubertf 0c2cdb98d9 * in pkg_add, before the "install dependencies" loop, check ALL
dependencies if they _can_ be installed. I.e. if a package wants
   version X installed, but version Y is already installed, pkg_adding
   that required pkg will blow up later (probably some pkg_add recursions
   down, given what we keep in the depends list). Now, it stopps right
   away:

        noon# pkg_add /usr/pkgsrc/packages/i386ELF/All/xdaemon-1.0.tgz
        pkg_add: pkg `xteddy-1.*' required, but `xteddy-2.0.1' found installed.
        Please resolve this conflict!

   The idea of this is from Thomas Klausner, further inputs from Alistair
   Crooks.

 * allow pkg names without versions given to "pkg_admin check"
 * Use sizeof() instead of hardcoding the buffers' size in some places
2000-03-19 17:24:27 +00:00
soren 89c5a767f8 Fix doubled 'the's. 2000-03-13 22:55:05 +00:00
hubertf 495734ff62 - Bump timeout in select() to 10 minutes
- Make sure ftp_cmd() properly passes down an error value (-1) when
   appropriate.
2000-02-27 02:35:28 +00:00
hubertf 93b37b7f07 adjust copyright 2000-02-22 01:24:26 +00:00
abs ce9e985266 Special case 'nb<X>' suffix in deweycmp() - this allows NetBSD specific
changes to packages to have a unique version, and still work with deweycmp().
2000-02-07 11:26:26 +00:00
hubertf 422fde1de4 init buffer differently 2000-02-04 03:45:48 +00:00
hubertf b932078a68 remove clutter left after switching to mkstemp 2000-02-02 14:54:50 +00:00
hubertf 4b164aae49 Use mkstemp instead of mkstemp. 2000-02-02 14:42:53 +00:00
hubertf 45d0c80c1d add copyright and (more important!) _RCS_ID() 2000-02-02 14:09:40 +00:00
agc cf6ad33088 Set the environment variables to have zero-length strings on Solaris. 2000-02-01 10:46:55 +00:00
agc 2a29f83468 Fix a typo.
Make a start at linting this.
2000-01-31 13:39:08 +00:00
agc 69acf6de93 Fix for Solaris: don't try to call unsetenv(). 2000-01-31 13:33:19 +00:00
hubertf 938c6a8b17 be a bit more liberal WRT slow servers 2000-01-26 02:12:14 +00:00
hubertf 549295852e -current's gcc seems to be a bit picky about using pointer-differences as
args to the "*" of a printf "%*.*s" pattern. Add some casts to int.
(At least on NetBSD, ptrdiff_t is typedef'ed to int anyways)
2000-01-25 17:21:07 +00:00
hubertf 4a961a7fc3 some code cleanup 2000-01-25 12:09:19 +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 d46e75859c Reverse wording for -R. Per PR 9141 by Jim Bernard <jbernard@ox.mines.edu> 2000-01-17 00:48:52 +00:00
hubertf bbb733f849 mention -Ss in usage 2000-01-10 14:53:56 +00:00
hubertf be120f8f41 Also move the +SIZE files into place, if a pkg comes with some. 2000-01-09 17:21:53 +00:00
hubertf 873c34bf5e Some changes from David Maxwell <david@fundy.ca>:
- make it clear that a URL or full path can be given on the command line
 - explain where depending pkgs are expected to live
2000-01-04 22:39:28 +00:00