summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add -K option to pkg_add and pkg_info.flz2006-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
* When using @cwd %%FOO%%, we must ensure to return in the originalkrion2006-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
* Do not bitch about bsdpan modules not having origin.krion2005-09-241-1/+1
| | | | | | Based on PR: bin/82269 Submitted by: Steven Hartland <killing at multiplay dot co dot uk> MFC after: 3 days
* remove a few uses of the word `really'jmg2005-06-271-2/+2
| | | | | | Reviewed by: hrs Approved by: re (scottl) MFC after: 1 week
* Implement @noinst field which has at the moment the same meaning andkrion2005-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)
* Use INDEX-6 for versions of FreeBSD > 600000paul2005-01-041-1/+3
|
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+1
| | | | any fake value.
* Add a -q flag to pkg_version. It suppresses the output of <,=,>.obrien2004-10-182-0/+2
| | | | This makes it possible to "portupgrade `pkg_version -q -l '<'`".
* Don't put DEBUG to CFLAGS, we have the standard DEBUG_FLAGS for this.ru2004-08-121-2/+0
|
* Use the length modifier 'll' instead of 'q' to print long longs.stefanf2004-07-282-2/+2
|
* Downgrade WARNS level to more tolerable value. Attempt to fixkan2004-07-282-2/+2
| | | | casts as lvalue usage whenever possible.
* - pkg_add spawns itself as argv[0] when installing dependent packages, toeik2004-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
* - pkg_info: flag -r: (show packages this packages depends on (documentation ↵eik2004-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
* - match package version numbers with relational operatorseik2004-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
* - complete rewrite of the version number parsing code, restoring ↵eik2004-06-292-84/+240
| | | | | | | | | | 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
* When invoking tar, make sure the mode option (-x) is first.kientzle2004-04-081-7/+6
|
* Fix a case of undefined behavior due to overlapping buf objects inschweikh2003-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
* Backout 1.14, it seems to be causing problems with libxml buildbmilekic2003-08-041-1/+1
| | | | | and I don't have time to investigate this code in much detail right now.
* Use strncmp() and not strcmp() here to properly matchbmilekic2003-08-011-1/+1
| | | | | | installed ports. Submitted by: Harold Gutch <logix@foobar.franken.de>
* pkg_create incorrectly does not add trailing '\n' when it receiveslioux2003-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
* * Add explicit conflict-checking to the package tools. Packages cankris2003-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
* Revert url.c:1.2: there was a race condition between when I producedrwatson2003-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
* Don't pass NULL in as a flags argument to libfetch's fetchGetURL()rwatson2003-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.
* Prevent buffer overflow in format_cmd() by properly tracking maximumjkh2003-01-063-15/+23
| | | | | | buffer size. Reported by: Lionnel CHAPTAL <Lionnel.Chaptal@IPricot.com> MFC after: 1 week
* Assume that packages passed on stdin are in bzip2 format, not gzip.bmah2002-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.
* Clean up a little. Don't need to include fetch.h any more, and I can'tobrien2002-11-061-7/+0
| | | | find any consumers of HOSTNAME_MAX.
* Break fileGetURL() out into its own file so that pkg_install/lib consumersobrien2002-11-063-113/+145
| | | | pkg_{create,delete} don't need to needlessly link with libfetch.
* Whitespace cleanupdes2002-10-291-5/+5
|
* Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the structwollman2002-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
* Sigh, finally activate pkgwrap.c.sobomax2002-09-091-1/+1
| | | | | Big pointy hat to: sobomax (who apparently needs some sleep) Submitted by: walt <wa1ter@hotmail.com>
* Introduce notion of the package tools revision and allow to wrap all toolssobomax2002-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
* Don't treat unknown commands as fatal errors: they are probably justkris2002-08-311-2/+3
| | | | | | | the signature of out-of-date pkg_tools and newer packages. Reviewed by: jkh MFC after: 3 days
* Grrr.... mumble.... a linger gzip'ism still existed.obrien2002-08-261-1/+1
| | | | Submitted by: Craig Rodrigues <rodrigc@attbi.com>
* Find remaining hardcoded gzip bits and change to bzip2 bits.obrien2002-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.
* Preserve suid/gid permissions when extracting packages remotellylioux2002-08-241-1/+1
| | | | | | | fetched with -r option Reviewed by: will Approved by: will
* Ensure that origin field in the packing list structure is initialised. Thissobomax2002-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
* Fix typos; each file has at least one s/seperat/separat/schweikh2002-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
* Another .tbz2 -> .tbz leftover. Properly look for pkgname.tbz.knu2002-08-041-1/+1
| | | | MFC after: 1 day
* C replacement for the Perl5 code.markm2002-06-242-7/+134
| | | | Submitted by: reg
* Eliminate free'ing already freed chunks.sobomax2002-05-221-2/+3
| | | | MFC after: 1 week
* - Make use of DEPOROGINs (if there are any) when installing package;sobomax2002-05-143-24/+139
| | | | | | | - fix few bogosities here and there; - move some common routines into the library. MFC after: 2 weeks
* Mark all internal libraries with INTERNALLIB.ru2002-05-131-5/+1
|
* replace __FUNCTION__ with standardized __func__.alfred2002-05-115-23/+23
| | | | Requested by: jhb
* fix build:alfred2002-05-113-21/+23
| | | | | | | | you may not use string concatination with __FUNCTION__, replace all occurances of: __FUNCTION__ ": error string" with: "%s: error string"
* New feature: allow origins of all dependencies be recorded into package listsobomax2002-05-053-7/+32
| | | | | | | | | | | | | | | | | | using new `@comment DEPORIGIN:...' directive. This would allow us to make many neat things including: - easier binary upgrades; - source upgrades without using external tools by simply extending bsd.port.mk and pkg_install tools; - mixed-mode upgrades (source + binary); - depreciate and deorbit silly +REQUIRED_BY files in the near future. This feature is no-op until appropriate bsd.port.mk patch is committed, and even when it is already committed packages generated will remain 100% compatible with old set of pkg_install tools (module all those neat features, of course). MFC after: 6 days
* Handle PLIST_ORIGIN properly.sobomax2002-05-051-0/+4
| | | | | | Poked by: kris Pointy hat grabbed by: sobomax MFC after: 6 days
* Add ability to query installed packages based on origin.sobomax2002-05-042-3/+21
|
* Fix SCM ID's.obrien2002-04-0110-51/+30
|
* Make sortdeps() working with dependency lists containing one or no elements.sobomax2002-02-201-1/+4
| | | | | Submitted by: roam MFC in: 1 week
* Choose more paranoid modes for the temporary directory so the user can'tjkh2001-11-221-1/+1
| | | | | | easily browse its contents. Noted by: Antoine
OpenPOWER on IntegriCloud