aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/add/perform.c
Commit message (Collapse)AuthorAgeFilesLines
* After around 20 years of duty it is time for pkg_install to retireBaptiste Daroussin2013-10-311-709/+0
| | | | Notes: svn path=/head/; revision=257444
* Do not change owner, group, or mode when package database directory andJung-uk Kim2012-09-141-1/+1
| | | | | | | | | | | its contents are created with pkg_add(1). It may happen when the packing list contains @owner, @group, or @mode. Reported by: Donald Bostrom (dbostrom at niksun dot com) Reviewed by: portmgr (bapt) Notes: svn path=/head/; revision=240476
* Let pkg_add use the ENV variable PACKAGESUFFIX. ThisJosh Paetzel2012-05-301-4/+13
| | | | | | | | | | | | | can be used to override the default .tbz package extension to .txz .tgz or .tar Submitted by: kmoore Obtained from: PC-BSD Sponsored by: iXsystems MFC after: 3 days Notes: svn path=/head/; revision=236333
* Spelling fixes for usr.sbin/Ulrich Spörlein2011-12-301-1/+1
| | | | Notes: svn path=/head/; revision=228990
* Backout libinstall.a -> libpkg commit.Florent Thoumie2011-05-171-1/+1
| | | | | | | Discussed with: erwin, brooks, bapt Notes: svn path=/head/; revision=222035
* - Take libinstall.a out of pkg_install and make it a proper shared library.Florent Thoumie2010-04-231-1/+1
| | | | | | | | | | | | | | - Rework the wrapper support to check libpkg version as well as pkg_install version. - Add libfetch to _prebuild_libs. - There are no new features introduced. Notes: the API is not stable, so basically, do not use libpkg in your projects for now. Also there's no manpage for libpkg yet, because the API will change drastically. I repeat, do not use libpkg for now. Notes: svn path=/head/; revision=207113
* Various fixes.Florent Thoumie2010-04-011-7/+17
| | | | | | | | | | | | | | | | | | | - 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] Notes: svn path=/head/; revision=206043
* Disable r194497 for now. It doesn't work well with ports-mgmt/tinderbox.Brian Somers2009-07-051-0/+2
| | | | | | | Approved by: re (ken) Notes: svn path=/head/; revision=195346
* When running pkg_add -r, check & install our dependencies for eachBrian Somers2009-06-191-13/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=194497
* Remove support for RELENG_4 (__FreeBSD_version < 500039).Florent Thoumie2008-06-161-4/+0
| | | | | | | MFC after: 1 day Notes: svn path=/head/; revision=179835
* - add: Keep dependent packages too if -K is specified.Florent Thoumie2008-06-121-1/+1
| | | | | | | | | | | | - updating: terminating '\n' is not part of the package origin. - bump PKG_INSTALL_VERSION to 20080612. PR: bin/119368 [1], bin/124459 [2] Submitted by: gcooper [1], Beat Gatzi <beat@chruetertee.ch> [2] MFC after: 3 days Notes: svn path=/head/; revision=179760
* - Restore functionality broken in previous commit; we need to be able to reportPav Lucistnik2008-05-031-15/+19
| | | | | | | | | | multiple installed packages with the same PKGORIGIN. Reported by: marcus MFC after: 1 month Notes: svn path=/head/; revision=178753
* Optimize package registration/deregistration. Previously, when looking up thePav Lucistnik2008-04-111-24/+62
| | | | | | | | | | | | | | package name for the origin of a dependency, all entries in /var/db/pkg were traversed for each dependency of added/removed package. Now, gather all the origins first, then do the lookup in a single pass over /var/db/pkg. This should provide a major speedup for packages with hundreds of dependencies. Submitted by: rdivacky (earlier version) MFC after: 1 month Notes: svn path=/head/; revision=178103
* Improve style a little and remove one always-true condition.Roman Divacky2008-03-301-3/+3
| | | | | | | | Approved by: portmgr (pav) Approved by: kib (mentor) Notes: svn path=/head/; revision=177741
* Add -i option for package installation without fetching andKirill Ponomarev2007-11-101-1/+5
| | | | | | | | | | | installing its dependencies. PR: bin/117065 Submitted by: Vladimir Ermakov <samflanker@gmail.com> MFC after: 14 days Notes: svn path=/head/; revision=173513
* Add -F option to not fail on already installed packages.Poul-Henning Kamp2006-03-091-3/+3
| | | | | | | Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru> Notes: svn path=/head/; revision=156497
* Add -K option to pkg_add and pkg_info.Florent Thoumie2006-01-091-4/+7
| | | | | | | | | | | | This option saves packages to PKGDIR (if defined or current directory by default) as they are downloaded. Silent a warning when -n is used and package has a +DISPLAY file. Approved by: krion MFC after: 1 week Notes: svn path=/head/; revision=154145
* Add -P flag, it does the same as the -p option, except that theKirill Ponomarev2005-11-121-2/+7
| | | | | | | | | | | | | | given prefix is also used recursively for the dependency packages, if any. If the -P flag appears after any -p flag on the command line, it overrides it's effect, causing pkg_add to use the given prefix recursively. PR: bin/75742 Submitted by: Frerich Raabe <raabe AT kde DOT org> MFC after: 3 days Notes: svn path=/head/; revision=152329
* Use the length modifier 'll' instead of 'q' to print long longs.Stefan Farfeleder2004-07-281-2/+2
| | | | Notes: svn path=/head/; revision=132799
* - pkg_add spawns itself as argv[0] when installing dependent packages, toOliver Eikemeier2004-06-291-7/+11
| | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=131285
* - pkg_info: flag -r: (show packages this packages depends on (documentation ↵Oliver Eikemeier2004-06-291-4/+5
| | | | | | | | | | | | | | | | | | | change)) - pkg_info: new flag -j (show the requirements script) - pkg_info: fix verbose output when used on packages - better handling of corrupt entries in /var/db/pkg - differ between corrupt entires and packages not installed - various small fixes PR: 56989, 57016, 57029, 26468 Notes: svn path=/head/; revision=131280
* * Add explicit conflict-checking to the package tools. Packages canKris Kennaway2003-04-171-1/+31
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=113594
* When installing package from a local file assume that all subsequentMaxim Sobolev2002-09-031-2/+6
| | | | | | | | | | | autoinstalled dependencies will have the same extension, not just ".tbz". Pointy hat to: obrien X-MFC after: -1 day Notes: svn path=/head/; revision=102888
* Find remaining hardcoded gzip bits and change to bzip2 bits.David E. O'Brien2002-08-251-2/+3
| | | | | | | | Mark with XXX so someone that cares about being able to handle either bziped or gziped packages knows where the remaining nits are. Notes: svn path=/head/; revision=102383
* - Make use of DEPOROGINs (if there are any) when installing package;Maxim Sobolev2002-05-141-35/+67
| | | | | | | | | | - fix few bogosities here and there; - move some common routines into the library. MFC after: 2 weeks Notes: svn path=/head/; revision=96613
* DTRT for packages read from STDIN:Murray Stokely2002-04-021-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | $ 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 Notes: svn path=/head/; revision=93660
* Fix SCM ID's.David E. O'Brien2002-04-011-5/+3
| | | | Notes: svn path=/head/; revision=93520
* WARNS=2 cleanup.Maxim Sobolev2001-10-101-12/+12
| | | | | | | | Tested on: i386, alpha MFC after: 2 weeks Notes: svn path=/head/; revision=84745
* - Allow package archive to be created from a locally installed package. ThisMaxim Sobolev2001-10-081-8/+12
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=84670
* Remove duplicate umask(2) call.Maxim Sobolev2001-08-151-1/+0
| | | | | | | | | PR: dusty/7998 Submitted by: Stefan Eggers <seggers@semyam.dinoco.de> MFC after: 2 weeks Notes: svn path=/head/; revision=81699
* Reduce private "lesser known" function redirection to improve clarity.David E. O'Brien2001-08-131-1/+1
| | | | | | | Approved by: jkh Notes: svn path=/head/; revision=81571
* Cosmetics: replace dozen instances of "(tmp = getenv(PKG_DBDIR) ? tmp : ↵Maxim Sobolev2001-08-021-4/+4
| | | | | | | | | | | DEF_LOG_DIR)" with macro. MFC after: 1 month Notes: svn path=/head/; revision=81049
* Usability tweak:Maxim Sobolev2001-08-021-13/+13
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=81046
* Properly quote recursive pkg_add operations so that filenames withJordan K. Hubbard2001-06-111-1/+1
| | | | | | | spaces or special characters in them won't barf. Notes: svn path=/head/; revision=78118
* Style policy: reformat multiline comments to conform to style(9).Maxim Sobolev2001-05-171-2/+6
| | | | Notes: svn path=/head/; revision=76739
* Fix a bug arised from the ')' in the wrong place when calling printf()-likeMaxim Sobolev2001-01-151-1/+1
| | | | | | | | | | 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. Notes: svn path=/head/; revision=71055
* Add `_PATH_DEVZERO'.David E. O'Brien2000-12-091-2/+3
| | | | | | | Use _PATH_* where where possible. Notes: svn path=/head/; revision=69793
* Redirect stdout from mtree to /dev/null; we don't really need to knowSatoshi Asami2000-01-031-2/+2
| | | | | | | the list of directories being created when we install a package. Notes: svn path=/head/; revision=55367
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50479
* -Wall fixes. Ambigious if/elses, uninitialized values, missing headers,Bill Fumerola1999-08-111-5/+5
| | | | | | | missing prototypes, and empty format strings. Notes: svn path=/head/; revision=49637
* Make it possible to have separate install scripts as well as haveJordan K. Hubbard1998-12-161-11/+37
| | | | | | | | | an on-delete script. Submitted by: Rajesh Vaidheeswarran <rv@fore.com> Notes: svn path=/head/; revision=41866
* correct usage of cleanup() everywhere - this became bogus when the warnx/errxJordan K. Hubbard1998-09-111-6/+7
| | | | | | | | stuff was added and nobody seems to have noticed. :) Noticed by: Josh MacDonald <jmacd@paris.CS.Berkeley.EDU> Notes: svn path=/head/; revision=39068
* Fail as documented when a dependency cannot be foundJordan K. Hubbard1998-09-081-1/+7
| | | | | | | | PR: 7318 Submitted by: djv@bedford.net Notes: svn path=/head/; revision=38931
* Fix recursive package add problem (for on-disk package files) I introducedJordan K. Hubbard1998-08-271-3/+6
| | | | | | | | with the change in semantics to make_playpen(). Now package dependencies more than 2 levels deep should work again. Pass the hat. Notes: svn path=/head/; revision=38583
* Avoid race-conditions on playpen delete.Eivind Eklund1998-07-171-2/+5
| | | | Notes: svn path=/head/; revision=37728
* Eliminate the idea of nested "playpens" entirely - it just obfuscatedJordan K. Hubbard1998-02-161-8/+13
| | | | | | | the code and, in at least one case, made it more dangerous to no gain. Notes: svn path=/head/; revision=33427
* I must have been smoking crack when I made this change. Using sh -cJordan K. Hubbard1998-01-211-4/+4
| | | | | | | | 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! Notes: svn path=/head/; revision=32665
* MF22: fix to install script handling.Jordan K. Hubbard1998-01-171-4/+4
| | | | Notes: svn path=/head/; revision=32587
* Don't assume install script is directly runnable - use sh -c.Jordan K. Hubbard1998-01-081-4/+4
| | | | Notes: svn path=/head/; revision=32334
* - do string-magic on the right variable when tryingJordan K. Hubbard1997-10-181-2/+2
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=30533