summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/lib
AgeCommit message (Collapse)Author
2001-12-30don't hardcode "tar"'s program name, use TAR_FULLPATHNAME insteadhubertf
2001-12-12MKfoo=no -> NOfootv
2001-10-04fix typo that prevents to select best version of package.yamt
2001-09-26use full pathname of tar consistentlchubertf
Patch provided in PR 14072 by Stoned Elipot <seb@script.jussieu.fr>
2001-09-24va_{start,end} audit:wiz
Make sure that each va_start has one and only one matching va_end, especially in error cases. If the va_list is used multiple times, do multiple va_starts/va_ends. If a function gets va_list as argument, don't let it use va_end (since it's the callers responsibility). Improved by comments from enami and christos -- thanks! Heimdal/krb4/KAME changes already fed back, rest to follow. Inspired by, but not not based on, OpenBSD.
2001-09-16Spell 'occurred' with two 'r's.wiz
2001-07-24Fix `pkg_add -u' for packages without dependencies.wiz
Patch by Hubert Feyrer. Addresses pkg/13536.
2001-07-15Interface change for strip_txz(): now stores suffixhubertf
2001-06-19`existent', not `existant'wiz
2001-05-21Apply the -I substitution logic for @cd as well as @cwd (just foragc
completeness, as @cwd will be used almost everywhere, and @cd is deprecated).
2001-05-21Add -I argument to pkg_create so that the real prefix can be specifiedagc
for the @src and @cwd PLIST directives. Bump version number.
2001-05-18Add -U argument to pkg_create - by default, all files are added to theagc
pkgdb.byfile.db database. If -U is specified on command line to pkg_create, don't add the PLIST entry to pkgdb.byfile.db. Bump version number.
2001-04-28 * add function strip_txz() to strip off any .tgz, .tbz, .t[bg]z from ahubertf
given filename. * Use strip_txz() inside the FTP-wildcard-depends handling code to prevent it handing a combination of glob and dewey pattern to pmatch(), which our pattern matching code currently does not handle. Bugfix! XXX The other places that could be changed to use strip_txz() are not touched in this commit to keep the impact of this change small in the light of the approaching 1.5.1 release. I'll revisit them.
2001-04-17on pkgdb_remove, don't retain old errors - clear errno before.hubertf
This prevents some warnings from being printed over and over again after one error was found.
2001-04-09do not terminate on EINTR. with previous behavior pkg_add terminatesitojun
if we suspend/change window size.
2001-04-06Negative exit code cleanup: Replace exit(-x) with exit(x).wiz
As seen on tech-userlevel.
2001-03-18Add -u switch to pkg_add to do a very rudimentare form of pkg upgrading:hubertf
When invoked with 'pkg_add -u ...', and the package to be installed is found already being installed, the old (installed) package is removed with pkg_delete, and the new one is installed. A very crude handling of dependencies is done (by moving the +REQUIRED_BY file aside before pkg_delete, and back into place after the new pkg is installed). This needs a lot more work to TRT, but it's a first start.
2001-03-07Bump version to 20010307 (yesterday's bugfix, and a 1.4 build fix).wiz
2001-03-07This header file needs no __RCSID.wiz
2001-03-06Fix typos in commentswiz
2001-03-05version.o depends on version.h.wiz
2001-03-05Don't allow NULL version packages to match. Patch by hubertf.wiz
Bump version to 20010306.
2001-03-05Add -V option to all pkgtools, which reports the version of the pkgtools.wiz
Document it. While there, fix the ordering of the option descriptions in some man pages. Set version to 20010305.
2001-03-05Using strcmp with NULL pointers is a bad idea. Fixes pkg/11647.wiz
2001-03-05Fix command line for tar in the case that the file to be handled doesn'twiz
end in 'z' or 'Z'.
2001-01-05use %ll_ instead of the less standard %q_lukem
2001-01-01 * findmatchingname():hubertf
When the bzip-pkg handling was introduced, a dewey pattern (foo>1) may get a character-class-pattern attached (.t[bg]z), and the code was not prepared to match that. I've special-cased handling of character-class pkg suffixes for ".t[bg]z", and when scanning a dir in findmatchingname() now both the 'first' part of the pattern (e.g. "foo>1") and the suffix (e.g. ".t[bg]z") must match the file, hence the two pmatch() calls. * findbestmatchingname_fn(): Caught a case where ".t[bg]z" was not properly handled. Must do the same suffix-processing again here! Fixes PR 11856 by Dan McMahill <mcmahill@mit.edu>
2000-12-13Strip not only .tgz but also .tbz etc. (missed from last commit)hubertf
2000-12-13 * Accept ".tbz" as an alternative pkg suffix to ".tbz" for pkg_add andhubertf
pkg_info * In pkg_create, compress with bzip2 if a .tbz suffix is given * Fix pkg_info to work via ftp, either via URL specified on command line or via one made up from PKG_PATH (if set) XXX ALWAYS tacks on ".t[bg]z", NOT ".t[gb]z" !!!
2000-11-28Fix timeout in expect():hubertf
The FTP coprocess formerly wrote the output of the "get | tar vxf -" pipe to stderr, which resulted in no output to the feedback pipe (stdout), and thus the timeout was not updated for any line printed by the "tar" process. This was now changed to also feed back the chars to the expect() routine, updating the timeout handler. The "also" part is implemented by passing the output through "tee /dev/stderr". At least NetBSD and Solaris have this, so no problem there. Thanks to Frank van der Linden for helping me to debug this.
2000-11-26Don't mkdir("/usr/tmp") in a desperate try to get some space.hubertf
If it's there, use it. If it's not there - bad luck. Pointed out by Simon Burge <simonb@wasabisystems.com>.
2000-10-31Don't swallow '%' in file/directory names.hubertf
Patch submitted in PR 11352 by Brook Milligan <brook@biology.nmsu.edu>
2000-10-21Introduce some caching.mycroft
2000-10-11More format string cleanups by sommerfeld.is
2000-10-11Check if $PKG_PATH is set AND contains something useful. Stopshubertf
pkg_info from spewing.
2000-10-09Allow SRCS, LDADD to be set on the command line, and still add the files.hubertf
2000-10-09Only pull in <vis.h> when debugging expect(), i.e. EXPECT_DEBUG is set.hubertf
2000-10-04Make even more silent, only spit out stuff if -v is given.hubertf
Found during a post-install of a fresh machine: 1. setenv PKG_PATH ftp://smaug.fh-regensburg.de/pub/NetBSD/arch/i386ELF/All 2. pkg_add tcsh ssh XF86Config 3. Run XF86Config 4. pkg_add kde 5. Be done. We should do this from /etc/rc.local on first boot... :-)
2000-10-01Not every FTP server says nicely "Goodbye".hubertf
If they used some other string, pkg_add would hang forever. The result of testing things only against one FTP server...
2000-09-01When downloading and extracting a file (in ftp:hubertf
'get pkg.tgz "| cd /var/tmp/inst ; gunzip | tar -x -f -"'), handle two cases better: 1. Timing out ftp connections: Make sure the hanging pipeline gets a ^C (SIGINT), and wait until the ftp prompt is available again. Else we may nuke away tar's working dir, and it may be displeased. 2. One of the commands from the pipeline exiting: caught via SIGCHLD; for this signal to be delivered, a empty handler is needed) Adresses PR 10925 by Greg A. Woods <woods@planix.com>
2000-08-29Make pkg_add & friends print the files they push through tar(1) tohubertf
stderr, thus making them visible. (tar's stdout goes somewhere else)
2000-08-28 * Make a few functions public so this code can be used by other programshubertf
* Comment a workaround for a certain lukem ftp behaviour * Fix a bug where a invalid initial dir was not caught early enough
2000-08-28Hide "trying PKG_PATH ..." message, only print on -vhubertf
2000-07-24handle NULL pen variable more gracefully in find_play_pen()hubertf
2000-07-06remove/hide some debugging codehubertf
2000-07-05 * Move comment around a bithubertf
* Document some return code
2000-06-19be sure to set pkgdbp to NULL after closing the db.hubertf
2000-06-18remove stale debugging codehubertf
2000-06-18 * shuffle variable names in findbestmatchingname_fn() aroundhubertf
a bit, to make them more descriptive * in findbestmatchingname_fn, fix a bug where a null pointer wasn't caught (I wonder why we didn't actually hit that case...) * Bugfix in findbestmatchingname_fn: when comparing, strip off any trailing ".tgz", as this will give wrong results. "1.9.8.tgz" was found to be greater than "1.9.8.1".
2000-06-18use /var/tmp consistently. (XXX need to re-visit if we everhubertf
put pkg_add on a install floppy)