aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Allow variable amounts of verbosity.David E. O'Brien2006-06-122-2/+2
| | | | Notes: svn path=/head/; revision=159554
* Add INDEX-7 and remove trailing spaces.Kirill Ponomarev2006-04-171-3/+5
| | | | | | | MFC after: 5 days Notes: svn path=/head/; revision=157809
* Add -K option to pkg_add and pkg_info.Florent Thoumie2006-01-092-4/+27
| | | | | | | | | | | | 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
* When using @cwd %%FOO%%, we must ensure to return in the originalKirill Ponomarev2006-01-071-2/+5
| | | | | | | | | | | | | | | | | | prefix later, but doing so with @cwd %%OLDPREFIX%% (having PLIST_SUB+="OLDPREFIX=${PREFIX}") hardcodes the value in the packing list. That's not really a problem when dealing with ports but that's a problem with packages since pkg_add -p option only overrides the first @cwd occurrence. This patch allow us to use @cwd without any argument. If no directory argument is given, it will set current working directory to the first prefix given by the @cwd command. PR: bin/77212 Submitted by: flz Notes: svn path=/head/; revision=154102
* Do not bitch about bsdpan modules not having origin.Kirill Ponomarev2005-09-241-1/+1
| | | | | | | | | Based on PR: bin/82269 Submitted by: Steven Hartland <killing at multiplay dot co dot uk> MFC after: 3 days Notes: svn path=/head/; revision=150530
* remove a few uses of the word `really'John-Mark Gurney2005-06-271-2/+2
| | | | | | | | | Reviewed by: hrs Approved by: re (scottl) MFC after: 1 week Notes: svn path=/head/; revision=147632
* Implement @noinst field which has at the moment the same meaning andKirill Ponomarev2005-06-142-1/+8
| | | | | | | | | | | function as @comment has. But will be valid only for files and not for md5 sums, rcsid's and comments in the future. Submitted by: flz Approved by: re@ (scottl) Notes: svn path=/head/; revision=147381
* Use INDEX-6 for versions of FreeBSD > 600000Paul Richards2005-01-041-1/+3
| | | | Notes: svn path=/head/; revision=139676
* For variables that are only checked with defined(), don't provideRuslan Ermilov2004-10-241-1/+1
| | | | | | | any fake value. Notes: svn path=/head/; revision=136910
* Add a -q flag to pkg_version. It suppresses the output of <,=,>.David E. O'Brien2004-10-182-0/+2
| | | | | | | This makes it possible to "portupgrade `pkg_version -q -l '<'`". Notes: svn path=/head/; revision=136643
* Don't put DEBUG to CFLAGS, we have the standard DEBUG_FLAGS for this.Ruslan Ermilov2004-08-121-2/+0
| | | | Notes: svn path=/head/; revision=133596
* Use the length modifier 'll' instead of 'q' to print long longs.Stefan Farfeleder2004-07-282-2/+2
| | | | Notes: svn path=/head/; revision=132799
* Downgrade WARNS level to more tolerable value. Attempt to fixAlexander Kabaev2004-07-282-2/+2
| | | | | | | casts as lvalue usage whenever possible. Notes: svn path=/head/; revision=132789
* - pkg_add spawns itself as argv[0] when installing dependent packages, toOliver Eikemeier2004-06-296-20/+40
| | | | | | | | | | | | | | | | | | | | | 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-294-12/+15
| | | | | | | | | | | | | | | | | | | 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
* - match package version numbers with relational operatorsOliver Eikemeier2004-06-292-26/+198
| | | | | | | | | | | | | | | | | - use glob patterns when matching packages by origin - csh-style {...} choices in glob matching - pkg_info: new flag -E (list matching package names only) - pkg_version: new flag -T (test if a given name matches a pattern) - new flag -X (interpret pattern as an extended regular expression) PR: 56961 Notes: svn path=/head/; revision=131275
* - complete rewrite of the version number parsing code, restoring ↵Oliver Eikemeier2004-06-292-83/+239
| | | | | | | | | | | | | compatibiliy of 5.x with 4.x and portupgrade - parse version numbers of ports containing an underscore followed by a number correctly - handle special strings pl, alpha, beta, pre and rc PR: 56961 Notes: svn path=/head/; revision=131274
* When invoking tar, make sure the mode option (-x) is first.Tim Kientzle2004-04-081-7/+6
| | | | Notes: svn path=/head/; revision=128026
* Fix a case of undefined behavior due to overlapping buf objects inJens Schweikhardt2003-12-231-2/+3
| | | | | | | | | | | snprintf (buf, size, fmt, buf, etc). This only works by chance with our libc, but fails (with a truncated string) on e.g. glibc. Okayed by: sobomax MFC after: 1 week Notes: svn path=/head/; revision=123770