Commit Graph

266 Commits

Author SHA1 Message Date
hubertf 6890588691 If a package is already installed, this is *not* a fatal error. Do not
report error code 1, as this will abort installing pkgs if a dependency is
already found installed under certain conditions.
2001-03-28 12:46:01 +00:00
tron d059ac0ad9 Use "tar" included in latest Zoularis under SunOS. 2001-03-23 14:06:16 +00:00
hubertf 35be797120 Set return code != 0 if the given pkg (file) cannot be found.
E.g. try "pkg_add foo ; echo $?". This hits is in bulk builds.
2001-03-22 13:41:35 +00:00
wiz 47acaa6b2d Update path in example to a more recent package. Noted by zuntum. 2001-03-20 19:43:36 +00:00
hubertf 648fa44a28 Add -u switch to pkg_add to do a very rudimentare form of pkg upgrading:
When invoked with 'pkg_add -u ...', and the package to be installed is
found already being installed, the old (installed) package is removed
with pkg_delete, and the new one is installed.

A very crude handling of dependencies is done (by moving the +REQUIRED_BY
file aside before pkg_delete, and back into place after the new pkg is
installed).

This needs a lot more work to TRT, but it's a first start.
2001-03-18 03:20:28 +00:00
hubertf ee1019de50 Update description a bit - inspired by Jeremy C. Reed <reed@reedmedia.net>
from tech-pkg.
2001-03-13 18:25:30 +00:00
wiz 63f7d31eeb Fix -r: Show REQ/+REQUIRE file for a package, if existing. Fixes pkg/12210.
Patch by Hubert Feyrer.
Note: REQ support has been taken out of bsd.pkg.mk in v1.628; since
pkg_create still supports it, we should support it in pkg_info too,
though.
2001-03-10 18:41:45 +00:00
wiz c62849a451 Minor cleanup, no functional change. Patch by Hubert Feyrer. 2001-03-10 13:18:09 +00:00
wiz a456915f39 Bump version to 20010307 (yesterday's bugfix, and a 1.4 build fix). 2001-03-07 10:04:33 +00:00
wiz 2bf9002908 This header file needs no __RCSID. 2001-03-07 09:44:40 +00:00
wiz f2496b9080 Test matching entries in /var/db/pkg on if they are directories.
Fixes pkg/12073 by Dan McMahill.
2001-03-06 10:30:54 +00:00
wiz e0fc1c5416 Fix typos in comments 2001-03-06 10:29:11 +00:00
wiz 45678a8082 version.o depends on version.h. 2001-03-05 18:24:58 +00:00
wiz 429d019073 Don't allow NULL version packages to match. Patch by hubertf.
Bump version to 20010306.
2001-03-05 18:12:49 +00:00
wiz 2ba98ef9a1 Add -V option to all pkgtools, which reports the version of the pkgtools.
Document it. While there, fix the ordering of the option descriptions in
some man pages. Set version to 20010305.
2001-03-05 16:53:12 +00:00
wiz fcf23e4f53 Using strcmp with NULL pointers is a bad idea. Fixes pkg/11647. 2001-03-05 16:48:35 +00:00
wiz 6c81e9b559 Fix command line for tar in the case that the file to be handled doesn't
end in 'z' or 'Z'.
2001-03-05 16:46:23 +00:00
hubertf 4b8c25f151 Prevent some minor descriptor leaks. 2001-03-04 18:16:42 +00:00
hubertf 55a4568c92 Make usage message match that of other pkg_* programs:
* user lowercase "usage"
 * do not use __progname/getprogname() to make this build on old systems
   (the pkg_install pkg is intended to run on 1.4 and maybe 1.3 too...)
2001-02-21 13:12:47 +00:00
cgd 25bdbb661e convert to use getprogname() 2001-02-19 23:22:40 +00:00
jdolecek c7121de1da use getcwd() instead of getwd() - mainly to avoid link warning, this
particular usage is safe
2001-01-10 22:53:22 +00:00
lukem 443a19e035 convert to using .WAIT 2001-01-09 03:13:39 +00:00
enami 270db080e9 Use PRINTOBJDIR. 2001-01-07 08:00:54 +00:00
hubertf f4f6931307 Alphabetize options. 2001-01-07 01:39:20 +00:00
lukem c2aa46e7c2 use %ll_ instead of the less standard %q_ 2001-01-05 03:27:26 +00:00
hubertf 6e6337b43d * findmatchingname():
When the bzip-pkg handling was introduced, a dewey pattern (foo>1) may get
   a character-class-pattern attached (.t[bg]z), and the code was not prepared
   to match that. I've special-cased handling of character-class pkg suffixes
   for ".t[bg]z", and when scanning a dir in findmatchingname() now both the
   'first' part of the pattern (e.g. "foo>1") and the suffix (e.g. ".t[bg]z")
   must match the file, hence the two pmatch() calls.

 * findbestmatchingname_fn():
   Caught a case where ".t[bg]z" was not properly handled. Must do the same
   suffix-processing again here!

Fixes PR 11856 by Dan McMahill <mcmahill@mit.edu>
2001-01-01 22:07:35 +00:00
hubertf 3d76df0ee0 Strip not only .tgz but also .tbz etc. (missed from last commit) 2000-12-13 03:49:56 +00:00
hubertf 5382dffae7 * Accept ".tbz" as an alternative pkg suffix to ".tbz" for pkg_add and
pkg_info
 * In pkg_create, compress with bzip2 if a .tbz suffix is given
 * Fix pkg_info to work via ftp, either via URL specified on command line
   or via one made up from PKG_PATH (if set)

XXX ALWAYS tacks on ".t[bg]z", NOT ".t[gb]z" !!!
2000-12-13 03:17:53 +00:00
hubertf 4b8a7a0e49 Fix pkg_info w/ URLs (*sigh*) 2000-11-30 10:09:15 +00:00
mycroft 9ff73e166a Oops; the increment needs to be in check1pkg() for the case where the user
specifies a list.
2000-11-28 05:23:35 +00:00
mycroft 23451da968 pkgcnt was incremented twice during a `check'... 2000-11-28 05:21:57 +00:00
hubertf fc8a285aa2 Fix timeout in expect():
The FTP coprocess formerly wrote the output of the "get | tar vxf -" pipe
to stderr, which resulted in no output to the feedback pipe (stdout), and
thus the timeout was not updated for any line printed by the "tar" process.
This was now changed to also feed back the chars to the expect() routine,
updating the timeout handler. The "also" part is implemented by passing
the output through "tee /dev/stderr".

At least NetBSD and Solaris have this, so no problem there.

Thanks to Frank van der Linden for helping me to debug this.
2000-11-28 01:16:01 +00:00
hubertf ec58d85250 Don't mkdir("/usr/tmp") in a desperate try to get some space.
If it's there, use it. If it's not there - bad luck.

Pointed out by Simon Burge <simonb@wasabisystems.com>.
2000-11-26 03:12:01 +00:00
wiz 18c121ba47 ispell 2000-11-12 15:32:57 +00:00
lukem 279552d3db fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
  e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
  using `.Nm ""' if there's stuff following, or for the 2nd and so on
  occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
2000-11-07 06:43:24 +00:00
hubertf efeb1d1e82 Don't swallow '%' in file/directory names.
Patch submitted in PR 11352 by Brook Milligan <brook@biology.nmsu.edu>
2000-10-31 23:47:05 +00:00
hubertf 4f394222d2 Pull in /etc/mk.conf unconditionally, not only on SunOS.
Discussed with Alistair Crooks.
2000-10-27 11:49:23 +00:00
hubertf 931aadfd80 s/bsd/BSD/ 2000-10-25 15:55:44 +00:00
mycroft f5abf3cd7a Introduce some caching. 2000-10-21 00:55:23 +00:00
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