aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/lib
Commit message (Collapse)AuthorAgeFilesLines
* After around 20 years of duty it is time for pkg_install to retireBaptiste Daroussin2013-10-3115-3318/+0
| | | | Notes: svn path=/head/; revision=257444
* sysconf(3) returns a long, not an int.David E. O'Brien2013-06-291-1/+1
| | | | Notes: svn path=/head/; revision=252363
* sysconf(3) returns a long, not an int.David E. O'Brien2013-06-281-1/+2
| | | | Notes: svn path=/head/; revision=252348
* Fix compilation errors.Jason Evans2013-01-231-2/+2
| | | | Notes: svn path=/head/; revision=245837
* Use snprintf instead of strc* functions and add bounds checking when creatingBaptiste Daroussin2013-01-222-4/+9
| | | | | | | | | pkgngpath Submitted by: sbz, gahr Notes: svn path=/head/; revision=245828
* Provide an option to users to shoot themselves in the foot.Eitan Adler2012-11-262-1/+5
| | | | | | | | | Reviewed by: bapt Approved by: cperciva MFC after: 1 month Notes: svn path=/head/; revision=243554
* Use modern license instead of being consistent with the other pkg_ toolsEitan Adler2012-11-262-10/+24
| | | | | | | | | | | | | | | Use a more informative message Fix some style(9) nits. Bump version number In pkg_add only warn users after the chroot is performed. Submitted by: gavin, jilles Reviewed by: beat, bapt Approved by: cperciva MFC after: 1 month Notes: svn path=/head/; revision=243553
* Warn users when using pkg tools if it looks like theyEitan Adler2012-10-223-1/+40
| | | | | | | | | | | | be be pkgng users. Reviewed by: bapt (earlier version) Reviewed by: kwm Approved by: cperciva MFC after: 3 days Notes: svn path=/head/; revision=241830
* Make sure that each va_start has one and only one matching va_end,Kevin Lo2012-09-281-0/+1
| | | | | | | especially in error cases. Notes: svn path=/head/; revision=241021
* if a file in plist starts with / then do not prefix it with "prefix" [1]Baptiste Daroussin2012-09-182-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | pkg info -g returns 1 if a file mismatch [2] flush stdout in pkg info -g [3] clean up quiet mode (-q | --quiet) output of pkg_version(1) [4] fix missing error call in uname check added to pkg_version(1) [5] fix pkg_add(1) fails to install with -C from bad path [6] only resolve path from pkg_add(1) -p if the given prefix do not start with a '/' [7] PR: bin/13128 [1] bin/139015 [2] bin/113702 [3] bin/142570 [4] bin/146857 [5] bin/157543 [6] Submitted by: cy [1] Anton Yuzhaninov <citrin@citrin.ru> [2] Ighighi <ighighi@gmail.com> [3] "N.J. Mann" <njm@njm.me.uk> [4] gcooper [5] David Naylor <naylor.b.david@gmail.com> [6] netchild [7] MFC after: 2 weeks Notes: svn path=/head/; revision=240682
* 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
* Bump PKG_INSTALL_VERSION which should've been done in r236233Josh Paetzel2012-05-301-1/+1
| | | | | | | | MFC after: 3 days Pointed out by: bapt Notes: svn path=/head/; revision=236336
* Let pkg_add use the ENV variable PACKAGESUFFIX. ThisJosh Paetzel2012-05-302-3/+9
| | | | | | | | | | | | | 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
* Make sure that each va_start has one and only one matching va_end,Kevin Lo2012-05-292-0/+3
| | | | | | | especially in error cases. Notes: svn path=/head/; revision=236213
* - Print package name in case an empty pkgdep line is found.Beat Gaetzi2012-05-111-1/+2
| | | | | | | | | | PR: bin/164378 Submitted by: Yuri <yuri AT tsoft.com> and many others Approved by: flz MFC after: 2 weeks Notes: svn path=/head/; revision=235276
* Touch up some more small typos missed in the previous round.Ulrich Spörlein2012-01-051-1/+1
| | | | | | | Reported by: Ben Kaduk <minimarmot@gmail.com> et al. Notes: svn path=/head/; revision=229655
* Spelling fixes for usr.sbin/Ulrich Spörlein2011-12-3011-14/+14
| | | | Notes: svn path=/head/; revision=228990
* - add a missing "be" and "in"Eitan Adler2011-11-111-1/+1
| | | | | | | | | | | | | | - fix other errors introduced when committing r226436 - add 'function' to a sentence where it makes sense Submitted by: delphij Submitted by: dougb Submitted by: jhb Approved by: dougb Approved by: jhb Notes: svn path=/head/; revision=227458
* - change "is is" to "is" or "it is"Eitan Adler2011-10-161-1/+1
| | | | | | | | | | | - change "the the" to "the" Approved by: lstewart Approved by: sahil (mentor) MFC after: 3 days Notes: svn path=/head/; revision=226436
* Backout libinstall.a -> libpkg commit.Florent Thoumie2011-05-1714-0/+3241
| | | | | | | 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-2314-3241/+0
| | | | | | | | | | | | | | - 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
* Bump PKG_INSTALL_VERSION to 20100403.Florent Thoumie2010-04-031-1/+1
| | | | Notes: svn path=/head/; revision=206133
* Fix pkg_delete, check if the file we're trying to delete is aFlorent Thoumie2010-04-031-1/+1
| | | | | | | | | | | symlink before complaining that it doesn't exist. Typical case would be a leftover library symlink that's left over after the actual library has been removed. Reported by: tabthorpe Notes: svn path=/head/; revision=206132
* Various fixes.Florent Thoumie2010-04-015-29/+32
| | | | | | | | | | | | | | | | | | | - 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
* - Add support for UPDATING remote fetching.Florent Thoumie2010-01-221-1/+1
| | | | | | | | | | | | - Reorganize EXAMPLES section in pkg_updating(1). - Style fixes. - Bump PKG_INSTALL_VERSION to 20100122. Submitted by: beat MFC after: 1 week Notes: svn path=/head/; revision=202844
* - Bump PKG_INSTALL_VERSION to 20090902 after dougb's changes.Florent Thoumie2009-09-021-3/+3
| | | | | | | | - Change the comment to say that version must be changed when a non-cosmetic change is made. Notes: svn path=/head/; revision=196766
* Add support for INDEX-9 [1]Doug Barton2009-08-311-3/+3
| | | | | | | | | While I'm here, strip off support for FreeBSD 5.x. Submitted by: Alexey Shuvaev <shuvaev@physik.uni-wuerzburg.de> [1] Notes: svn path=/head/; revision=196706
* Don't imply that only FTP urls are supported when we can't fetchBrian Somers2009-06-301-1/+1
| | | | | | | | | | a package. Approved by: re (kib) MFC after: 3 weeks Notes: svn path=/head/; revision=195212
* When running pkg_add -r, check & install our dependencies for eachBrian Somers2009-06-193-25/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Skip @pkgdep if there's no argument.Florent Thoumie2009-05-192-1/+5
| | | | | | | | Submitted by: pav MFC after: 1 week Notes: svn path=/head/; revision=192382
* - Backout latest changes (follow symlinks: r186496, r186518).Florent Thoumie2009-01-062-61/+24
| | | | | | | - Bump PKG_INSTALL_VER to 20090106. Notes: svn path=/head/; revision=186835
* Fix memory leaks introduced in last commit.Florent Thoumie2008-12-272-13/+3
| | | | | | | | | | | Bump version to 20081227. Reported by: gcooper Submitted by: Andrea Barberio <insomniac@slackware.it> MFC after: 1 month Notes: svn path=/head/; revision=186518
* Follow symlinks when deleting directories.Florent Thoumie2008-12-252-24/+71
| | | | | | | | | | | Bump PKG_INSTALL_VER to 20081225 (Merry Christmas \o/). PR: bin/54446 Submitted by: Andrea Barberio <insomniac@slackware.it> MFC after: 1 month Notes: svn path=/head/; revision=186496
* Use humanize_number to report pen-sizes so people don't have to countPoul-Henning Kamp2008-08-071-4/+15
| | | | | | | the digits when trying to install openoffice. Notes: svn path=/head/; revision=181376
* Enable the -n option of pkg_create(1).Giorgos Keramidas2008-07-081-1/+1
| | | | | | | | | | | | The changes to make the option work are already in place, but I missed the patch hunk that adds it to the getopt() option-handling loop. Pointy hat: keramida Approved by: flz MFC after: 1 week Notes: svn path=/head/; revision=180361
* Remove support for RELENG_4 (__FreeBSD_version < 500039).Florent Thoumie2008-06-162-16/+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
* - Add long options to pkg_install.Florent Thoumie2008-05-301-1/+1
| | | | | | | | - Remove check for '-?' as it's not listed in authorized options. - Bump PKG_INSTALL_VERSION to 20080530. Notes: svn path=/head/; revision=179433
* Bump PKG_INSTALL_VERSION to 20080528.Florent Thoumie2008-05-281-1/+1
| | | | | | | X-MFC after: latest HEAD changes have been MFC'ed to RELENG_[67] Notes: svn path=/head/; revision=179373
* - Restore functionality broken in previous commit; we need to be able to reportPav Lucistnik2008-05-032-10/+13
| | | | | | | | | | 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-112-17/+56
| | | | | | | | | | | | | | 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
* Some code cleanups, including removing of stale getopt argument andKirill Ponomarev2007-11-101-0/+7
| | | | | | | | | | | hardcoded +CONTENTS defines. PR: bin/117855 Submitted by: Beat Gaetzi <beat@chruetertee.ch> MFC after: 14 days Notes: svn path=/head/; revision=173514
* Momoize the results of isinstalledpkg()Kirill Ponomarev2007-11-021-9/+55
| | | | | | | | | PR: bin/116452 Submitted by: wollmann MFC after: 7 days Notes: svn path=/head/; revision=173291
* Add whitespace.Kirill Ponomarev2007-10-171-1/+1
| | | | Notes: svn path=/head/; revision=172723
* Update for INDEX-8 support.Kirill Ponomarev2007-10-171-1/+3
| | | | Notes: svn path=/head/; revision=172722
* - Replace rather inefficient bubble sort with a recursive depth-first search.Pav Lucistnik2007-06-181-64/+110
| | | | | | | | | | | | | This speeds up registration of packages considerably. - style(9) police welcome! PR: bin/112630 Submitted by: Stephen Montgomery-Smith <stephen@cauchy.math.missouri.edu> Tested by: bento i386 experimental run MFC after: 14 days Notes: svn path=/head/; revision=170947
* Make consistent with style(msmith). 4 spaces indent, tab for each 2 indents.Nate Lawson2007-03-284-7/+7
| | | | Notes: svn path=/head/; revision=167972
* Invoke tar(1) with the -p option when installing a packageRuslan Ermilov2007-03-061-2/+2
| | | | | | | | | | | | from an URL (i.e., do it the same way as when installing from a file). This fixes the lossage of the setuid bits. It wasn't a problem before because GNU tar(1) implied the -p option for root, but BSD tar(1) doesn't do that. Discussed with: tobez and some advanced users :) Notes: svn path=/head/; revision=167270
* Cosmetic: fix indentation.Dag-Erling Smørgrav2006-08-111-2/+2
| | | | Notes: svn path=/head/; revision=161212
* Turn on libfetch debugging if -v was specified on the command line.Dag-Erling Smørgrav2006-07-081-0/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=160178