History log of /freebsd-10.3-release/usr.sbin/pkg_install/lib/pen.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 296373 04-Mar-2016 marius

- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.3.
- Update default pkg(8) configuration to use the quarterly branch.

Approved by: re (implicit)

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 228990 30-Dec-2011 uqs

Spelling fixes for usr.sbin/


# 222035 17-May-2011 flz

Backout libinstall.a -> libpkg commit.

Discussed with: erwin, brooks, bapt


# 206043 01-Apr-2010 flz

Various fixes.

- Replace hardcoded INDEX version. [1]
- Fix a buffer overlap. [2]
- Remove empty package when fetching fails and -K is used. [3]
- Remove useless chmod2() after mkdtemp(3). [4]
- Replace mkdir(1) call with mkdir(2). [5]
- Get rid of some vsystem() calls.
- Switch from lstat(2) to open(2) in fexists().
- Try rename(2) in move_file() first.
- Bump PKG_INSTALL_VERSION to 20100401.

PR: bin/145101 [1], bin/139492 [2], bin/144919 [3]
bin/144920 [4], bin/144921 [5]
Submitted by: gcooper [1,2,3,4,5]


# 194497 19-Jun-2009 brian

When running pkg_add -r, check & install our dependencies for each
package rather than expecting our top level package to get all of
the dependencies correct.

Previously, the code depended on the top level package having all
of the pkgdep lines in +CONTENTS correct and in the right order,
but that doesn't always happen due to code such as this (in
security/gnutls/Makefile):

.if (defined(WITH_LZO) || exists(${LOCALBASE}/lib/liblzo2.so)) && !defined(WITHOUT_LZO)
LIB_DEPENDS+= lzo2:${PORTSDIR}/archivers/lzo2
....

With such conditional dependencies, my 'sophox-packages' package won't
install. The dependency tree looks like this:

sophox-packages
...
x11/gnome2
x11/gnome-applets
net/libgweather
devel/libsoup
security/gnutls
security/libgcrypt
security/libgpg-error
...
x11/gnome2
archivers/file-roller
archivers/gtar
archivers/lzop
archivers/lzo2
...

gnutls doesn't depend on lzo2 initially, but lzo2 is dragged into the
mix via other dependencies and is built by the initial 'make'. The
subsequent package generation for gnutls adds a pkgdep line for lzo2
to gnutls' +CONTENTS but the pkgdeps in sophox-packages' +CONTENTS
has gnutls *before* lzo2.

As a result, sophox-packages cannot install; gnutls fails because lzo2
is missing, 82 more packages fail because gnutls is missing and the
whole thing spirals into a super-confusing mess!

MFC after: 3 weeks


# 181376 07-Aug-2008 phk

Use humanize_number to report pen-sizes so people don't have to count
the digits when trying to install openoffice.


# 132799 28-Jul-2004 stefanf

Use the length modifier 'll' instead of 'q' to print long longs.


# 131285 29-Jun-2004 eik

- pkg_add spawns itself as argv[0] when installing dependent packages, to
enable the use as a port on older systems

- use absolute paths in all calls to external programs, to account for strange
PATH settings

- use INDEX or INDEX-5 depending on FreeBSD version, to enable the use on
FreeBSD 4.x as a port.

- conditionalize all 4.x/5.x differences on __FreeBSD_version, so that the
pkg_install tools can be kept in sync on 4.x and 5.x

- Bump PKG_INSTALL_VERSION

Reviewed by: portmgr (bento run)
MFC after: 4 weeks


# 96392 11-May-2002 alfred

replace __FUNCTION__ with standardized __func__.

Requested by: jhb


# 96388 11-May-2002 alfred

fix build:
you may not use string concatination with __FUNCTION__, replace all occurances
of:
__FUNCTION__ ": error string"
with:
"%s: error string"


# 93520 01-Apr-2002 obrien

Fix SCM ID's.


# 86757 22-Nov-2001 jkh

Choose more paranoid modes for the temporary directory so the user can't
easily browse its contents.

Noted by: Antoine


# 86402 15-Nov-2001 sobomax

Improve recently committed fix for -t bug.

Submitted by: "Andrew L. Neporada" <andr@dgap.mipt.ru>
MFC after: 3 days


# 84795 11-Oct-2001 sobomax

Make `-t' flag in pkg_*(1) tools actually working.

PR: 30843
Submitted by: Vladimir B. Grebenschikov <vova@express.ru>
MFC after: 2 weeks


# 84745 10-Oct-2001 sobomax

WARNS=2 cleanup.

Tested on: i386, alpha
MFC after: 2 weeks


# 74699 23-Mar-2001 sobomax

- Add which(1)-like functionality into pkg_info;
- fix a harmless bug in match_installed() function introduced in my last
commit;
- uniformely reorder includes across files.

Submitted by: Garrett Rooney <rooneg@electricjellyfish.net>
Not objected by: jkh, -ports


# 67429 22-Oct-2000 jkh

Cause fatal error messages to be a little more helpful to the programmer
concerning where they're taking place.

Switch from [r]index() to str[r]chr() functions, which are more ISO
compliant.

Prompted by: Edward Welbourne <eddy@vortigen.demon.co.uk>


# 50479 28-Aug-1999 peter

$Id$ -> $FreeBSD$


# 39068 11-Sep-1998 jkh

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>


# 37900 28-Jul-1998 nectar

Paranoia: use mkdtemp instead of mktemp
PR: bin/3212
Reviewed by: jkh@FreeBSD.ORG


# 35160 12-Apr-1998 jkh

Fix dependent-package loading when pkg_adding with an FTP URL. I broke
this when I changed the playpen code to disallow recursion. I know
this fixes a PR someplace but I can't seem to find it with the GNATs
search tool.


# 33427 16-Feb-1998 jkh

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.


# 32371 09-Jan-1998 jkh

MF22: Additional paranoia in cleanup.


# 30221 08-Oct-1997 charnier

Use err(3). Cosmetics in usage string and man page.


# 22997 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

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.


# 16549 20-Jun-1996 jkh

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.


# 16179 08-Jun-1996 alex

Change min_free to return free space as an off_t instead of a size_t.


# 13994 09-Feb-1996 jkh

Fix to catch a stupid oversight on my part which allowed this thing
to remove the current directory under certain circumstances.
Submitted by: Richard J Kuhns <rjk@watson.grauel.com>


# 11780 25-Oct-1995 jkh

Bring forward my changes from 2.1


# 10388 28-Aug-1995 jkh

Don't be needlessly verbose in the pkg_create.


# 10339 26-Aug-1995 jkh

Make the play-pen searching routine even more agile in trying
to create a /usr/tmp dir if it makes sense to do so.


# 10309 26-Aug-1995 jkh

Use size_t properly in all fs size ops. This kills a bug
encountered by someone who had his /tmp on a partition with 3.7GB of
free space!
Spotted by: Francisco Rosich Viana <rosich@power.ci.uv.es>


# 10085 17-Aug-1995 jkh

Some fixes to make this "TMPDIR agile".
Submitted by: jmacd + some of my own fixes.


# 9953 06-Aug-1995 jkh

Make "out of space in ${PKG_TMPDIR}" handling a bit more robust.
Print the right thing, do the right thing. Back to you, Satoshi!


# 8075 26-Apr-1995 jkh

Check dependencies BEFORE doing final extraction of package.
Fix a bug where direct-extract mode would have still invoked the
packing list reordering commands.


# 7999 22-Apr-1995 jkh

Export the min_free() function.


# 7972 21-Apr-1995 jkh

Correct a bogusly formatted printf().


# 7926 18-Apr-1995 jkh

Use a more nicely formatted message when we run out of space.


# 6501 16-Feb-1995 jkh

Rename TMPDIR to PKG_TMPDIR, just to make Jeff happy.. :-)


# 6418 15-Feb-1995 jkh

Make pkg_install use /var/tmp instead of /tmp
Suggested by: hsu


# 3578 14-Oct-1994 jkh

Print a better verbose message when creating packages.


# 3575 14-Oct-1994 jkh

Fix bug in home directory calculation that I introduced with the free space
checking code. Fix the free space checking code, while I'm at it! ;)
Thanks to Garrett for spotting the home dir problem.


# 3445 08-Oct-1994 jkh

Be optionally verbose about free-space checking. I need this to ascertian
whether or not this always works.


# 3364 04-Oct-1994 jkh

Add the ability to verify that a package won't extract in the space
available. Thanks to Michael Elbel for pushing me in the right direction.


# 383 05-Sep-1993 jkh

Made staging area configurable rather than assuming /tmp (-t)


# 379 03-Sep-1993 jkh

Lots of misc tweaks, support for arbitrary separators in pkg_info, more
intelligent name handling in pkg_create. Most of these files are changed
because of rcsid's being different in my cvs tree and freefall's (foo).


# 328 26-Aug-1993 jkh

This commit was generated by cvs2svn to compensate for changes in r327,
which included commits to RCS files with non-trunk default branches.


# 327 26-Aug-1993 jkh

The release version of my package install suite. Please see man pages
for info.