Commit Graph

99 Commits

Author SHA1 Message Date
wiz 64662a0528 Fix `pkg_add -u' for packages without dependencies.
Patch by Hubert Feyrer.
Addresses pkg/13536.
2001-07-24 14:45:16 +00:00
wiz a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
wiz d422b80ea9 Uppercase Dt argument. 2001-06-05 11:58:55 +00:00
agc 95a52b2709 Add -I argument to pkg_create so that the real prefix can be specified
for the @src and @cwd PLIST directives.

Bump version number.
2001-05-21 09:17:28 +00:00
hubertf 965773e0ca Check for return value of getenv() before handing it to strdup().
Fixes a bug in last commit when PKG_ADD was not set.
2001-04-21 01:38:14 +00:00
dmcmahill b80446717f Allow PKG_PATH (or part of that) to contain a local directory, and
still let "pkg_add foo" work:

        setenv PKG_PATH /usr/upkgsrc/packages/All
        pkg_add -v kde2

Depending pkgs will be pulled in as usual.

If PKG_PATH contains a mixture of local paths and ftp://-URLs, the local
paths will be searched first.

Patch provided by Hubert.
2001-04-19 12:31:59 +00:00
itojun 939a343de8 have EXAMPLES section. 2001-04-10 01:39:44 +00:00
wiz 0037cd4f1b Whitespace fixes. 2001-04-09 12:46:47 +00:00
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
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 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
hubertf f4f6931307 Alphabetize options. 2001-01-07 01:39:20 +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
is d8302e2d73 More format string cleanups by sommerfeld. 2000-10-11 20:23:46 +00:00
hubertf b31af88872 fix indentation 2000-10-11 11:01:41 +00:00
ad 5b09090e8e insure -> ensure 2000-10-05 12:35:33 +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
hubertf 80c46f750e * Code cleanup
* Add a comment in one appropriate place
 * Indent properly
2000-09-01 04:36:20 +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
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 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 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
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 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
hubertf d11f27480e Not without my handbag. (Forgot this in last commit) 1999-12-01 15:15:29 +00:00
hubertf 402f80b9da - Comment code
- Minor re-indenting
 - Fix printing of @ignore in pkg_info (did this ever work?)
 - Fix installing of local wildcard dependencies (unused in main system)
 - Fix deleting of packages that depend on wildcard dependencies
   (fexist() is not enough there :-)
1999-12-01 14:51:50 +00:00
kristerw 2220c68654 Typos (from OpenBSD) 1999-11-18 19:02:31 +00:00
abs 9c1ad975e8 Check return value from realpath() to avoid a NULL pointer being passed to
alloc_lpkg(). Avoids coredump if current directory is invalid.
1999-11-10 18:51:47 +00:00
proff e09818f9fd Apply Force (-f) recursively 1999-10-04 17:16:59 +00:00
hubertf 8ee940971e Bring closer to /usr/share/misc/style with the aid of indent(1). 1999-08-24 00:48:37 +00:00
hubertf c39c4fc075 Hide test for URLlength()>0 behind a macro (IS_URL()). 1999-08-23 15:17:03 +00:00
agc b62dac7b36 Provide full pathnames for chgrp(1), chown(1) and chmod(1), passing
them down from Makefile.inc on an OS-specific basis.  Fixes PR 8250
from Wiz <wiz@danbala.ifoer.tuwien.ac.at>.
1999-08-23 10:34:53 +00:00
agc 358f97854c Pass BINDIR down via Makefile.inc, rather than hardcoding /usr/sbin -
useful for systems where /usr/sbin is not the directory of choice.
1999-08-19 14:37:36 +00:00
agc d5c5c423a3 Consolidate URL handling into a table of valid leading strings for
URLs, and an access function (URLlength) - saves having various
hardcoded strings all over the place. Delete isURL, and use URLlength
in its place. Also use URLlength when parsing a filename for host
and filename part.
1999-08-19 14:12:34 +00:00
agc 72077b961b Clean up minor nits in C code. 1999-08-19 13:29:59 +00:00
tron 4ea05d6101 Add two missing "(void)" casts. 1999-08-19 07:18:38 +00:00
tron dffe3016d3 Modify conflict check to avoid matching packages with the same name prefix
(e.g. "teTeX" and "teTeX-share"). Patch is based on a suggestion by
Hubert Feyrer, fixes PR pkg/8219.
1999-08-19 07:17:35 +00:00
hubertf ef0989e5e0 Document PKG_TMPDIR 1999-07-02 19:05:45 +00:00
cgd bb8cb1198b Add support for fetching packages from HTTP URLs. Since 'ftp' is already
invoked for (FTP) URLs, this was just a matter of recognizing HTTP URLs
in the places where FTP URLs were recognized (and updating a comment and
the manual page).
1999-06-15 06:32:00 +00:00