Commit Graph

73 Commits

Author SHA1 Message Date
Kris Kennaway
7f6bf1d8ce * Add explicit conflict-checking to the package tools. Packages can
register a list of other packages with which they conflict (via the
  -C option to pkg_create), and they will refuse to install (unless -f is
  specified) if one of the listed packages is already present.

* Update documentation for the new feature as well as fleshing out some
  existing documentation.

* Bump PKG_INSTALL_VERSION so this feature can be tested for.

Submitted by:   Sergey Matveychuk <sem@ciam.ru>
PR:             bin/47145
MFC after:      2 weeks
2003-04-17 09:56:05 +00:00
Maxim Sobolev
76b27d2150 When installing package from a local file assume that all subsequent
autoinstalled dependencies will have the same extension, not just
".tbz".

Pointy hat to:	obrien
X-MFC after:	-1 day
2002-09-03 06:59:33 +00:00
David E. O'Brien
1ab94a83c2 Find remaining hardcoded gzip bits and change to bzip2 bits.
Mark with XXX so someone that cares about being able to handle either
bziped or gziped packages knows where the remaining nits are.
2002-08-25 01:00:16 +00:00
Maxim Sobolev
dd3a3dfc3b - Make use of DEPOROGINs (if there are any) when installing package;
- fix few bogosities here and there;
- move some common routines into the library.

MFC after:	2 weeks
2002-05-14 21:42:37 +00:00
Murray Stokely
1bb336ef80 DTRT for packages read from STDIN:
$ cat pkg.tgz | pkg_add -

The above command line will fail on -CURRENT or -STABLE, and
therefore, so will sysinstall if you try to install additional
packages through the network (FTP) from a multiuser system.  Because
of the different environment during installation (wrt the playpen),
this bug does not manifest itself during initial installs, and users
may install packages from the network just fine at that time.

This bug was fixed in OpenBSD 4 years ago.

----------------------------
revision 1.4
date: 1998/04/07 05:56:13;  author: marc;  state: Exp;  lines: +13 -8
fix package input from standard input -- the program tried to process
stdin twice.  Note: it assumes stdin is a compressed tar file.
----------------------------

PR:		conf/36606
Obtained from:	OpenBSD
MFC after:	2 weeks
2002-04-02 12:47:10 +00:00
David E. O'Brien
0d8875ff46 Fix SCM ID's. 2002-04-01 09:39:07 +00:00
Maxim Sobolev
d100deb8cc WARNS=2 cleanup.
Tested on:	i386, alpha
MFC after:	2 weeks
2001-10-10 06:58:42 +00:00
Maxim Sobolev
4bbe1f1cd4 - Allow package archive to be created from a locally installed package. This
allows for an easy way to backup old version of port prior to installing
  a new one;
- silence compiler warnings by killing some unused variables and adding
  all includes necessary.

MFC after:	2 weeks
2001-10-08 17:01:35 +00:00
Maxim Sobolev
89a0be2e4f Remove duplicate umask(2) call.
PR:             dusty/7998
Submitted by:   Stefan Eggers <seggers@semyam.dinoco.de>
MFC after:	2 weeks
2001-08-15 14:22:01 +00:00
David E. O'Brien
0dd1c79320 Reduce private "lesser known" function redirection to improve clarity.
Approved by:	jkh
2001-08-13 04:18:30 +00:00
Maxim Sobolev
3d02d34c75 Cosmetics: replace dozen instances of "(tmp = getenv(PKG_DBDIR) ? tmp : DEF_LOG_DIR)"
with macro.

MFC after:	1 month
2001-08-02 13:13:06 +00:00
Maxim Sobolev
2d800f2bd9 Usability tweak:
Use '' quotes instead of `' to delimit names of files and packages in
  warning and error messages, because it is easier to cut-n-paste name in
  question that way (single click) without confusing the shell. And yes,
  I know that it is less eye-candy...

MFC after:	1 month
2001-08-02 12:38:29 +00:00
Jordan K. Hubbard
11fed5e2e0 Properly quote recursive pkg_add operations so that filenames with
spaces or special characters in them won't barf.
2001-06-11 23:27:42 +00:00
Maxim Sobolev
7f7ace8fb2 Style policy: reformat multiline comments to conform to style(9). 2001-05-17 10:12:45 +00:00
Maxim Sobolev
248cf5a573 Fix a bug arised from the ')' in the wrong place when calling printf()-like
varargs function, which lead to one of the arguments was left out. This resulted
in failure when inwoking mtree, warning message "mtree returned a non-zero
status - continuing" and probably is the reason for zillion mtree errors on
bento.
2001-01-15 09:45:16 +00:00
David E. O'Brien
1a37aa566b Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
Satoshi Asami
a9758dac1a Redirect stdout from mtree to /dev/null; we don't really need to know
the list of directories being created when we install a package.
2000-01-03 22:59:27 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Bill Fumerola
0845a96cd0 -Wall fixes. Ambigious if/elses, uninitialized values, missing headers,
missing prototypes, and empty format strings.
1999-08-11 20:55:42 +00:00
Jordan K. Hubbard
0440e20b71 Make it possible to have separate install scripts as well as have
an on-delete script.

Submitted by:	Rajesh Vaidheeswarran <rv@fore.com>
1998-12-16 13:59:31 +00:00
Jordan K. Hubbard
375ca45770 correct usage of cleanup() everywhere - this became bogus when the warnx/errx
stuff was added and nobody seems to have noticed. :)
Noticed by:	Josh MacDonald <jmacd@paris.CS.Berkeley.EDU>
1998-09-11 07:26:58 +00:00
Jordan K. Hubbard
62203a9ce5 Fail as documented when a dependency cannot be found
PR:		7318
Submitted by:	djv@bedford.net
1998-09-08 03:02:45 +00:00
Jordan K. Hubbard
47d8228368 Fix recursive package add problem (for on-disk package files) I introduced
with the change in semantics to make_playpen().  Now package dependencies
more than 2 levels deep should work again.  Pass the hat.
1998-08-27 14:59:55 +00:00
Eivind Eklund
4dc6689c09 Avoid race-conditions on playpen delete. 1998-07-17 14:56:31 +00:00
Jordan K. Hubbard
79af7eafa8 Eliminate the idea of nested "playpens" entirely - it just obfuscated
the code and, in at least one case, made it more dangerous to no gain.
1998-02-16 17:16:51 +00:00
Jordan K. Hubbard
8b1643d2c6 I must have been smoking crack when I made this change. Using sh -c
in a vsystem() call is just a ludicrous way of calling sh -c "sh -c ..."
Whoops!  I don't know my own bloody code here!
1998-01-21 06:08:35 +00:00
Jordan K. Hubbard
73dfa4e8d6 MF22: fix to install script handling. 1998-01-17 12:26:19 +00:00
Jordan K. Hubbard
07eb524cb0 Don't assume install script is directly runnable - use sh -c. 1998-01-08 11:27:06 +00:00
Jordan K. Hubbard
940d89a9d5 - 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)
 - document $PKG_PATH
 - use -v on pkg_add for dependent packages

Submitted by:	hubertf@NetBSD.ORG
Obtained from:	NetBSD
1997-10-18 05:54:17 +00:00
Jordan K. Hubbard
570f313ee4 Don't return from cleanup() - if it's removed the playpen then very
bad things will happen if we return to unsuspecting code.
Noted to my great dismay by:	Tim Vanderhoek <hoek@hwcn.org>
1997-10-13 15:03:55 +00:00
Philippe Charnier
6fed414929 Use err(3). Cosmetics in usage string and man page. 1997-10-08 07:48:21 +00:00
Jordan K. Hubbard
94d1d55871 Add support for @option preserve - moves existing files out of the way
before replacing them (using pkgname to make this hopefully unique).
Delete also moves them back, if they exist, resulting in a package
which can be "backed out" with reasonable safety.
1997-06-29 10:41:49 +00:00
Peter Wemm
476602a9d0 Revert $FreeBSD$ to $Id$ 1997-02-22 16:15:28 +00:00
Jordan K. Hubbard
2df00d4c64 Fix a bogon with playpen size calculation for pkg of "-". It's amazing
this ever worked, actually.
1997-02-15 14:17:28 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Jordan K. Hubbard
a1fcb52813 Correct a problem which broke +DISPLAY file handling. 1997-01-13 10:14:26 +00:00
Jordan K. Hubbard
82d4f7288d Fix PR#1557 - chained package dependencies using URLs didn't work. 1996-10-14 19:41:44 +00:00
Jordan K. Hubbard
21c7f0d4d7 Make -force work for pkg_add. 1996-07-31 21:52:33 +00:00
Jordan K. Hubbard
a9ef0b2904 Make pkg_install understand and use libftpio instead of its own
copies of the ftp support routines.  Also some cosmetic and minor
bug fixes I've been meaning to incorporate for awhile.
1996-06-20 18:33:55 +00:00
Jordan K. Hubbard
916485f4df fix PR#599
Submitted-By: jdp
1996-06-03 04:40:43 +00:00
Jordan K. Hubbard
1c3f12fd44 Fix a couple of miscellaneous bugs and make pkg_add also support reading
from stdin.
1996-03-12 06:12:43 +00:00
Jordan K. Hubbard
0ad65298ab Bring my pkg_install improvements forward from 2.1. 1995-11-12 04:55:40 +00:00
Jordan K. Hubbard
58a00a4f4c Fix the `pkg_add relative to .' bug. Thank you, Ville!
Submitted by:	Ville Eerola <ville@vlsi.fi>
1995-10-31 20:30:18 +00:00
Jordan K. Hubbard
36b7319742 Bring forward my changes from 2.1 1995-10-25 15:38:37 +00:00
Jordan K. Hubbard
3122afe4bd Some fixes to make this "TMPDIR agile".
Submitted by:	jmacd + some of my own fixes.
1995-08-17 00:36:06 +00:00
Jordan K. Hubbard
5da01a55fc Make "out of space in ${PKG_TMPDIR}" handling a bit more robust.
Print the right thing, do the right thing.  Back to you, Satoshi!
1995-08-06 03:21:04 +00:00
Jordan K. Hubbard
d8003c2a59 o Fix PR# bin/643 - always set "where_to" properly.
o Nuke dependence on libftp - it's about to die!
1995-07-30 09:11:20 +00:00
Rodney W. Grimes
d3628763db Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
Rodney W. Grimes
709e8f9ae1 Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
Jordan K. Hubbard
2283d8e502 Use mtree -U instead of -u and put back error check. Thanks Rod! 1995-04-28 04:16:30 +00:00