Commit Graph

227 Commits

Author SHA1 Message Date
is d8302e2d73 More format string cleanups by sommerfeld. 2000-10-11 20:23:46 +00:00
hubertf bf24eb4e3f Check if $PKG_PATH is set AND contains something useful. Stops
pkg_info from spewing.
2000-10-11 11:09:20 +00:00
hubertf 5f69d95c26 Check right variable to see if it's a URL (pkg -> cp) 2000-10-11 11:08:04 +00:00
hubertf b31af88872 fix indentation 2000-10-11 11:01:41 +00:00
hubertf 589e705b57 Remove unneeded header <db.h>. 2000-10-09 19:11:58 +00:00
hubertf 6cc0c78181 Remove unneeded header <sys/syslimits.h> 2000-10-09 19:06:08 +00:00
hubertf f5b925151e Allow SRCS, LDADD to be set on the command line, and still add the files. 2000-10-09 17:03:20 +00:00
hubertf 32166d4f75 Only pull in <vis.h> when debugging expect(), i.e. EXPECT_DEBUG is set. 2000-10-09 14:35:27 +00:00
ad 5b09090e8e insure -> ensure 2000-10-05 12:35:33 +00:00
hubertf 037fd8a74e Make even more silent, only spit out stuff if -v is given.
Found during a post-install of a fresh machine:
1. setenv PKG_PATH ftp://smaug.fh-regensburg.de/pub/NetBSD/arch/i386ELF/All
2. pkg_add tcsh ssh XF86Config
3. Run XF86Config
4. pkg_add kde
5. Be done.

We should do this from /etc/rc.local on first boot... :-)
2000-10-04 16:01:50 +00:00
hubertf 0a2663ad0b Not every FTP server says nicely "Goodbye".
If they used some other string, pkg_add would hang forever.
The result of testing things only against one FTP server...
2000-10-01 20:34:30 +00:00
hubertf 197ee08b13 Don't replace the pkg version with -[0-9] on pkg alternates ("{foo-x,bar-y}")
as this will remove things like trailing '}' etc. and doesn't work in general.

As mentioned in the already-existing comment, doing TRT here would mean to
partly expand the pattern, then replace the versions on alternatives.
Unless our pkg pattern parser gets these hooks, cowardly step back.
2000-10-01 12:23:21 +00:00
jwise f9c3dbedef Silly as it may be, update the #! line in this script to match the pkgsrc
wish install.

After the freeze, I'll pkgsrc this script -- it's kind of cute.
2000-09-14 18:00:44 +00:00
hubertf b09f22f48f When downloading and extracting a file (in ftp:
'get pkg.tgz "| cd /var/tmp/inst ; gunzip | tar -x -f -"'), handle
two cases better:

1. Timing out ftp connections: Make sure the hanging pipeline gets a ^C
   (SIGINT), and wait until the ftp prompt is available again. Else we
   may nuke away tar's working dir, and it may be displeased.
2. One of the commands from the pipeline exiting: caught via SIGCHLD;
   for this signal to be delivered, a empty handler is needed)

Adresses PR 10925 by Greg A. Woods <woods@planix.com>
2000-09-01 04:42:57 +00:00
hubertf 80c46f750e * Code cleanup
* Add a comment in one appropriate place
 * Indent properly
2000-09-01 04:36:20 +00:00
hubertf c06c5a0348 Add some (commented out) debug flags 2000-09-01 04:34:03 +00:00
hubertf d332db18be Make pkg_add & friends print the files they push through tar(1) to
stderr, thus making them visible. (tar's stdout goes somewhere else)
2000-08-29 03:56:56 +00:00
hubertf 14dbdb5745 * Make a few functions public so this code can be used by other programs
* Comment a workaround for a certain lukem ftp behaviour
 * Fix a bug where a invalid initial dir was not caught early enough
2000-08-28 21:35:14 +00:00
hubertf 0186d67219 Hide "trying PKG_PATH ..." message, only print on -v 2000-08-28 15:39:35 +00:00
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