Commit Graph

171 Commits

Author SHA1 Message Date
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
tron 343ac4c964 Remove support for absolutes pathnames completely. This can't work with
binary packages like we support them now.
1999-05-30 16:08:23 +00:00
christos 3024caeb08 Don't prepend directories if the plist files are absolute. 1999-05-29 20:44:20 +00:00
tron 1fceefc0ce Fix wrong error handling in case "/var/db/pkg" needs to be created.
Patch suppled by Roland Dowdeswell in PR pkg/7566.
1999-05-12 20:43:49 +00:00
garbled d1407362ba More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:43:46 +00:00
hubertf 04417da166 Replace static array of packages given to pkg_perform() with linear
list, using chopss' list functions (moved to lib/lpkg.c and
lib/lib.h).

Properly handle wildcards in arguments to "pkg_info", "pkg_delete" and
"pkg_admin check".

Some other minor cleanups.
1999-03-22 05:02:39 +00:00
tron 137c04ccf1 Fix string handling bugs introduced by last patch. 1999-03-12 17:32:20 +00:00
agc 530dddb95a Define TAR_CMD and TAR_FULLPATHNAME, and use them in preference to
hardcoded strings "tar" and "/usr/bin/tar". This allows the package
tools to use GNU tar with a different name (it's often installed as
gtar), and from a directory other than /usr/bin.
1999-03-09 11:10:39 +00:00
mycroft d77575d3c8 Clean up SYNOPSIS formatting. 1999-03-07 11:58:22 +00:00
agc 21fa5d1385 Cosmetic but annoying - no need to append a newline character in warnx()
string - it's done by warnx() itself.
1999-03-02 10:32:23 +00:00
hubertf 4ab7063639 If any other version of this package in stalled, stop. Document this. :) 1999-02-17 12:33:15 +00:00
hubertf e22dd1f460 Allow @exec to be the first (non-comment) thing in a PLIST file
IF there is no %d/%D/%f/%F in it.
1999-02-01 02:00:42 +00:00
hubertf f9e71e406c Add code for pkgdb. 1999-01-19 17:01:56 +00:00
hubertf ba73896f0c Fix some bugs discovered tonight when installing on a fresh 1.3.2
machine:
 - create /var/db/pkg if not there
 - fix wrong handling of findmatchingname() return code, resulting
   in missing /var/db/pkg dir being interpreted as match found
 - only move +BUILD_VERSION and +BUILD_INFO files if they're
   actually present (old pkgs don't have them!)
1998-11-07 23:16:50 +00:00
agc 3fdf3a6fae Modify pkg_create to recognise Build Information and Version files, when
creating packages, and modify pkg_add to copy the files when a binary
package is added. This preserves the fine-grained version information in
a binary package, and also the options with which the binary package was
built.
1998-10-26 17:39:20 +00:00
hubertf ee768386ba s/freebsd/netbsd/, pointed out by Heiko Rupp 1998-10-26 11:35:00 +00:00
agc 959d0a0cde + Remove obsolete and unused string functions.
+ Fix a bug introduced when the package name comparison routines were moved -
alternate matching now completes and works properly.
+ Add -R argument to pkg_create, which re-orders any directories in the
generated PLIST into reverse alphabetic order.
+ Add -l argument to pkg_create, which checks that any symbolic links in
the package are relative-to-$PREFIX pathnames, rather than full pathnames.
+ General cleanup elsewhere.
1998-10-12 12:03:24 +00:00
agc 9daf7cc9b2 More cleanup - various bits of KNF.
Use another table when parsing PLIST files - makes this much more extensible.
1998-10-09 18:27:31 +00:00
agc 16ae233008 Some minor KNF.
Lots more to be done.
1998-10-09 11:16:57 +00:00
agc 70c6765099 Eliminate all use of sprintf(3), and replace it with snprintf(3).
Bounds check the @exec and @unexec commands when they are constructed.
1998-10-08 12:57:58 +00:00
hubertf 4cc256a5d1 fix some egcs warnings 1998-10-04 01:48:15 +00:00
hubertf 0151583b9c Teach our tools about dependencies containing wildcards. 1998-10-03 16:24:07 +00:00
hubertf 4c0a9c52a7 In an ideal world, make_playpen() and leave_playpen() would maintain
a stack of directories, we'll do with a save/restore_dirs cludge for
now. => Fixes the bug I mentioned yesterday that shows when one pkg
installs another (depending) pkg via FTP.

Fixed another bug with extract-in-place when the destination dir is
already there.
1998-10-01 21:16:26 +00:00
tron 63ef9847d5 Fix broken package dependence handling mentioned by Brook Milligan on
"tech-pkg@netbsd.org".
1998-09-08 21:54:01 +00:00
hubertf e6c468e777 Make really sure to only nuke LogDir when it's been set. Fixes problem
described in PR 5308, code was contributed by Eivind Eklund <eivind@yes.no>.
1998-08-28 00:35:51 +00:00
hubertf 90c872591e Allow symlinks to directories instead of pure directories in several
places (/usr/pkg, /var/db/pkg, ...). Closes PR 6009 by Jim Bernard
<jimjbernard@ox.mines.edu>.
1998-08-27 23:37:35 +00:00
hubertf 2fb1caee16 Pass prefix for depending pkgs. 1998-08-25 01:16:03 +00:00
hubertf d54f140300 Remove some trailing (extra) "."s. 1998-08-25 00:54:08 +00:00
hubertf 1285035fe7 Don't exit cleanup() functions if not called from signal handler - this
will show error messages before aborting.
Patch supplied by Jim Bernard <jbernard@ox.mines.edu> in PR 6010, cleanup()
in delete/perform.c prepared to be used as signal handler by me.
1998-08-25 00:12:16 +00:00
hubertf 89f14c0f4e Prevent args of pkg_info -e from expansion (in case wildcard matching is requested) 1998-07-12 14:05:51 +00:00
hubertf 7a033bd0d4 Extend "pkg_info -e" to allow pkg-globbing, and allow using it. 1998-07-09 17:49:51 +00:00
tron 1ea9bb436f When adding a binary package from a locale file "pkg_add" fails now if
a dependence can't be resolved unless "-f" is used, fixes PR pkg/5625
by Jeremy Cooper.
1998-07-05 21:15:55 +00:00
frueauf dd2f801595 Add support for CONFLICTS entry, implement -C switch for pkg_create
and document that new feature.
1998-06-05 11:22:19 +00:00
jeremy 52a7423256 Documented how the require and install scripts interact with the installation
process more clearly.
1998-05-28 02:30:39 +00:00
agc 47f6bce353 Add a check (from FreeBSD) so that the removal of the temporary dir
takes place only once, if pkg_add is interrupted, and exit after the
cleanup is done.
1998-05-06 15:05:29 +00:00
frueauf 6326329eba Don't use "+CONTENTS" direct, use CONTENTS_FNAME instead. 1998-04-20 08:27:45 +00:00
perry 34a98169f0 macroize BSD, NetBSD, FreeBSD and misc cleanup 1998-02-06 05:54:12 +00:00
hubertf fdbf4d9eec Quote filenames handed off to tar, chmod, chown. (Fixes possible security
problem discovered while looking at pkgsrc/audio/tracker).
1998-01-19 00:24:03 +00:00
hubertf fa829ce599 Document $PKG_PATH and $PKG_DBDIR 1997-11-10 00:29:21 +00:00
mrg ca2afdd453 fix compile warnings on the alpha. 1997-10-19 09:39:35 +00:00
lukem 031fee8254 use strchr/strrchr/memset/memmove instead of index/rindex/bzero/bcopy 1997-10-18 11:05:34 +00:00
lukem 05941d095a WARNSify, cleanup Makefiles 1997-10-17 14:53:18 +00:00
lukem e94356b174 fix make -j race condition building lib/ , use ../Makefile.inc for BINDIR 1997-10-17 12:03:36 +00:00
hubertf ca6157bdca - document $PKG_PATH
- use -v on pkg_add for dependent packages (forgot on last commit)
 - most important: do string-magic on the right variable when trying
   to find dependent packages on the local disk (i.e. package given as
   filename, not URL)
1997-10-16 00:55:01 +00:00
hubertf 508ee08a34 Second part of intrgration of FreeBSD pkg_install as of 971013.
This patch adds @option preserve and handling for -s (SrcDir)
option.
1997-10-16 00:50:20 +00:00
hubertf d0245e3952 First cut on importing pkg_install as of FreeBSD 971013:
- warn()/err() instead of whinge()/barf()
 - Update RCS Id strings
 - Update manpages (mostly)
1997-10-16 00:31:32 +00:00
hubertf e10ebcabe2 pass the "-v"-switch on pkg_add to any pkg_add-calls
made for dependent packages
1997-10-11 22:25:16 +00:00
agc cafa757ff8 Use malloc and free in extract.c, not alloca.
Minor mods to English in pkg_info.1
Add a mandatory argument to Synopsis section of pkg_create.1
1997-06-09 15:24:32 +00:00
agc 153272e388 Add NetBSD Ids
Un-munge pkg_install/lib/Makefile which I'd overwritten on libftpio commit.
Make it compile on NetBSD.
Install pkg_* programs in /usr/sbin

XXX agc - Still to do XXX
Cleanup call to mktemp (for a tmp dir) in pkg_install/lib/pen.c
Create ftperr.c in the correct directory.
1997-06-05 12:59:18 +00:00
agc 5d4508e153 Initial import of FreeBSD packaging tool. 1997-06-05 08:54:23 +00:00