aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/lib
Commit message (Collapse)AuthorAgeFilesLines
* MF7: r252640David E. O'Brien2013-07-031-2/+3
| | | | | | | | | MF8: r252639 MF9: r252635, r252638: MFC: r252348, r252363: sysconf(3) returns a long, not an int. Notes: svn path=/stable/6/; revision=252642
* Synchronize pkg_install with HEAD.Florent Thoumie2010-01-224-32/+40
| | | | Notes: svn path=/stable/6/; revision=202842
* Synchronize pkg_install with HEAD (20080708):Florent Thoumie2008-12-252-5/+16
| | | | | | | | | r180361: actually enable '-n' for pkg_create(1) r181376: use humanize_number to report pen-sizes r186494: add package directory for 7.1-RELEASE Notes: svn path=/stable/6/; revision=186495
* MFC: remove 4.x support (r179835)Florent Thoumie2008-06-172-16/+0
| | | | Notes: svn path=/stable/6/; revision=179844
* Synchronize pkg_install with HEAD (20080612)Florent Thoumie2008-06-161-1/+1
| | | | | | | r179760: fix recursive -K (add), '\n' not part of pkg origin (updating) Notes: svn path=/stable/6/; revision=179818
* Synchronize pkg_install with HEAD (20080530)Florent Thoumie2008-06-101-1/+1
| | | | | | | | r179352,179366: don't regenerate packages r179433: add long options Notes: svn path=/stable/6/; revision=179703
* MFC: distfile target, pkg registration optimizationFlorent Thoumie2008-06-032-18/+60
| | | | | | | | r178032,179377,179520: add distfile target r178103,178753-178754: optimize package registration Notes: svn path=/stable/6/; revision=179522
* Synchronize pkg_install with HEAD:Florent Thoumie2008-04-075-15/+24
| | | | | | | | | | | - Add pkg_updating, - Remove pkg_sign, - Support for 8-CURRENT, - Style cleanup (__P use), - ... and much more. Notes: svn path=/stable/6/; revision=177975
* MFC: match.c: 1.21Kirill Ponomarev2007-11-101-9/+55
| | | | | | | | | | | date: 2007/11/02 20:18:47; author: krion; state: Exp; lines: +57 -11 Memoize the results of isinstalledpkg() PR: bin/116452 Submitted by: wollmann Notes: svn path=/stable/6/; revision=173531
* MFC 1.12: Replace rather inefficient bubble sort with a recursive depth-firstPav Lucistnik2007-07-021-64/+110
| | | | | | | search. This speeds up registration of packages considerably. Notes: svn path=/stable/6/; revision=171151
* MFC: (1.6) turn on libfetch debugging if -v was specifiedDag-Erling Smørgrav2006-07-221-0/+1
| | | | Notes: svn path=/stable/6/; revision=160564
* MFC: lib.h: 1.58Kirill Ponomarev2006-05-141-3/+5
| | | | | | | | date: 2006/04/17 11:15:29; author: krion; state: Exp; lines: +5 -3 Add INDEX-7 and remove trailing spaces. Notes: svn path=/stable/6/; revision=158557
* MFC:Florent Thoumie2006-01-162-4/+27
| | | | | | | | | | | | | | | | | | | | | Add -K option to pkg_add and pkg_info. 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. src/usr.sbin/pkg_install/info/perform.c: rev 1.53 -> 1.54 src/usr.sbin/pkg_install/add/main.c: rev 1.65 -> 1.66 src/usr.sbin/pkg_install/lib/lib.h: rev 1.56 -> 1.57 src/usr.sbin/pkg_install/info/pkg_info.1: rev 1.55 -> 1.56 src/usr.sbin/pkg_install/add/add.h: rev 1.12 -> 1.13 src/usr.sbin/pkg_install/add/pkg_add.1: rev 1.68 -> 1.69 src/usr.sbin/pkg_install/add/perform.c: rev 1.78 -> 1.79 src/usr.sbin/pkg_install/info/info.h: rev 1.28 -> 1.29 src/usr.sbin/pkg_install/lib/url.c: rev 1.4 -> 1.5 src/usr.sbin/pkg_install/info/main.c: rev 1.48 -> 1.49 Notes: svn path=/stable/6/; revision=154437
* MFC: add/extract.c:1.44 create/perform.c:1.82 create/pkg_create.1:1.70 ↵Kirill Ponomarev2006-01-101-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | create/pl.c:1.28 info/show.c:1.40 lib/plist.c:1.51 date: 2006/01/07 22:10:57; author: krion; state: Exp; lines: +10 -3 When using @cwd %%FOO%%, we must ensure to return in the original 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=/stable/6/; revision=154200
* MFC: 1.20Kirill Ponomarev2005-09-271-1/+1
| | | | | | | | | | | | | | date: 2005/09/24 21:41:47; author: krion; state: Exp; lines: +1 -1 Do not bitch about bsdpan modules not having origin. Based on PR: bin/82269 Submitted by: Steven Hartland <killing at multiplay dot co dot uk> MFC after: 3 days Approved by: re (kensmith) Notes: svn path=/stable/6/; revision=150618
* 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
* Backout 1.14, it seems to be causing problems with libxml buildBosko Milekic2003-08-041-1/+1
| | | | | | | | and I don't have time to investigate this code in much detail right now. Notes: svn path=/head/; revision=118410
* Use strncmp() and not strcmp() here to properly matchBosko Milekic2003-08-011-1/+1
| | | | | | | | | installed ports. Submitted by: Harold Gutch <logix@foobar.franken.de> Notes: svn path=/head/; revision=118313
* pkg_create incorrectly does not add trailing '\n' when it receivesMario Sergio Fujikawa Ferreira2003-05-262-1/+23
| | | | | | | | | | | | | | | | | | | | | | either COMMENT or DESCR from the command line. When a port is installed, one gets both +COMMENT and +DESCR files with a trailing '\n' character. However, +COMMENT does not contain a trailing '\n' when it is installed from a package due to this behavior of pkg_create. Therefore, make sure it behaves exactly the same regardless of where got its information; either command line or files. The modified functions are used by pkg_create. PR: 52097 Reviewed by: bento, kris, portmgr, re, Michael Nottebrock <michaelnottebrock@gmx.net>, Martin Horcicka <horcicka@FreeBSD.cz> Approved by: re (scottl) MFC after: 1 week Notes: svn path=/head/; revision=115325
* * Add explicit conflict-checking to the package tools. Packages canKris Kennaway2003-04-172-3/+9
| | | | | | | | | | | | | | | | | | 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
* Revert url.c:1.2: there was a race condition between when I producedRobert Watson2003-04-171-1/+1
| | | | | | | | | | the fix and when I committed it -- in between the two, DES committed a different fix, rendering this fix unneeded. Requested by: des Notes: svn path=/head/; revision=113587
* Don't pass NULL in as a flags argument to libfetch's fetchGetURL()Robert Watson2003-03-271-1/+1
| | | | | | | | | as this can result in a NULL pointer deference when parsing the flags later. This change fixes "pkg_add -r" on 5.0-CURRENT for me; not quite clear how the problem was introduced. Notes: svn path=/head/; revision=112722
* Prevent buffer overflow in format_cmd() by properly tracking maximumJordan K. Hubbard2003-01-063-15/+23
| | | | | | | | | buffer size. Reported by: Lionnel CHAPTAL <Lionnel.Chaptal@IPricot.com> MFC after: 1 week Notes: svn path=/head/; revision=108778
* Assume that packages passed on stdin are in bzip2 format, not gzip.Bruce A. Mah2002-11-141-1/+2
| | | | | | | | | (sysinstall depends on this feature for package addition.) Comment on hard-coded bzip2 usage in the spirit of rev. 1.58. Notes: svn path=/head/; revision=106923
* Clean up a little. Don't need to include fetch.h any more, and I can'tDavid E. O'Brien2002-11-061-7/+0
| | | | | | | find any consumers of HOSTNAME_MAX. Notes: svn path=/head/; revision=106492
* Break fileGetURL() out into its own file so that pkg_install/lib consumersDavid E. O'Brien2002-11-063-113/+145
| | | | | | | pkg_{create,delete} don't need to needlessly link with libfetch. Notes: svn path=/head/; revision=106491
* Whitespace cleanupDag-Erling Smørgrav2002-10-291-5/+5
| | | | Notes: svn path=/head/; revision=106136
* Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the structGarrett Wollman2002-09-211-2/+2
| | | | | | | | | | | | | | | | | | | hack, thereby allowing future extensions to the structure (e.g., for extended attributes) without rebreaking the ABI. FTSENT now contains a pointer to the parent stream, which fts_compar() can then take advantage of, avoiding the undefined behavior previously warned about. As a consequence of this change, the prototype of the comparison function passed to fts_open() has changed to reflect the required amount of constness for its use. All callers in the tree are updated to use the correct prototype. Comparison functions can now make use of the new parent pointer to access the new stream-specific private data pointer, which is intended to assist creation of reentrant library routines which use fts(3) internally. Not objected to in spirit by: -arch Notes: svn path=/head/; revision=103726
* Sigh, finally activate pkgwrap.c.Maxim Sobolev2002-09-091-1/+1
| | | | | | | | Big pointy hat to: sobomax (who apparently needs some sleep) Submitted by: walt <wa1ter@hotmail.com> Notes: svn path=/head/; revision=103162
* Introduce notion of the package tools revision and allow to wrap all toolsMaxim Sobolev2002-09-092-0/+99
| | | | | | | | | | | | | | | | | | | | | included into pkg_install according to the content of /var/db/pkg_install.conf file, which specifies version and alternative location of the tools. Format of the said file is very simple: one line which specifies revision of the alternative version of the tools and their location separated by space, i.e.: 20030102 /usr/local/sbin This would allow bsd.port.mk to install and use up to date version of tools on older system from ports. Also add new `-P' flag to pkg_info, which causes it to report currently installed version of package tools. Discussed with: will Notes: svn path=/head/; revision=103149
* Don't treat unknown commands as fatal errors: they are probably justKris Kennaway2002-08-311-2/+3
| | | | | | | | | | the signature of out-of-date pkg_tools and newer packages. Reviewed by: jkh MFC after: 3 days Notes: svn path=/head/; revision=102732
* Grrr.... mumble.... a linger gzip'ism still existed.David E. O'Brien2002-08-261-1/+1
| | | | | | | Submitted by: Craig Rodrigues <rodrigc@attbi.com> Notes: svn path=/head/; revision=102430
* Find remaining hardcoded gzip bits and change to bzip2 bits.David E. O'Brien2002-08-251-5/+8
| | | | | | | | 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
* Preserve suid/gid permissions when extracting packages remotellyMario Sergio Fujikawa Ferreira2002-08-241-1/+1
| | | | | | | | | | fetched with -r option Reviewed by: will Approved by: will Notes: svn path=/head/; revision=102375
* Ensure that origin field in the packing list structure is initialised. ThisMaxim Sobolev2002-08-121-0/+1
| | | | | | | | | | fixes problem when there are origin-less packages installed on a system Reported by: Mark Knight <markk@knigma.org> MFC after: 3 days Notes: svn path=/head/; revision=101740
* Fix typos; each file has at least one s/seperat/separat/Jens Schweikhardt2002-08-111-6/+6
| | | | | | | | | | | | | (I skipped those in contrib/, gnu/ and crypto/) While I was at it, fixed a lot more found by ispell that I could identify with certainty to be errors. All of these were in comments or text, not in actual code. Suggested by: bde MFC after: 3 days Notes: svn path=/head/; revision=101677
* Another .tbz2 -> .tbz leftover. Properly look for pkgname.tbz.Akinori MUSHA2002-08-041-1/+1
| | | | | | | MFC after: 1 day Notes: svn path=/head/; revision=101339