Commit Graph

412 Commits

Author SHA1 Message Date
wiz b85170c751 Improve markup, sort section, sort SEE ALSO. 2002-02-02 01:31:16 +00:00
wiz 923aa5f99b Drop an empty line. 2002-02-02 01:30:39 +00:00
wiz bc145df2ee Use .Nx, replace empty line with .Pp. 2002-01-19 02:01:35 +00:00
agc cfa115fedf Explain a bit more fully the collating sequence which pkg_info(1) uses when
comparing package versions strings.
2002-01-10 10:46:28 +00:00
agc b85b4de6a6 Bump version number to reflect the pkg_info version number recognition
changes.
2002-01-09 18:50:17 +00:00
agc 2afa28bf02 Pull in a much simplified version of the vtest functionality. This new
functionality adds recognition of '_' and "pl" as pseudonyms for '.',
so that 1.2p2 == 1.2.2, and adds recognition of "pl" and "rc" strings,
which stand for "patchlevel" and "release candidate" respectively.

In addition, this version should handle alphabetic characters properly
(so that 1.2e == 1.2.5)

Normal NetBSD revision number processing has been retained (and is always
compared after all other tests have been performed).

64-bit integers are used internally for each component of the version
number.
2002-01-09 16:17:08 +00:00
hubertf 75b2df2eee don't hardcode "tar"'s program name, use TAR_FULLPATHNAME instead 2001-12-30 04:46:21 +00:00
tv 8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
agc c7f73c3331 "it's" is short for "it is".
The possessive pronoun is "its".
2001-10-04 19:44:48 +00:00
yamt d75115bcb0 fix typo that prevents to select best version of package. 2001-10-04 05:32:50 +00:00
hubertf 384aae98cc use full pathname of tar consistentlc
Patch provided in PR 14072 by Stoned Elipot <seb@script.jussieu.fr>
2001-09-26 13:48:27 +00:00
agc ead534127e Print out the name of the detached signature file which is being used to
verify the binary package. Idea from Hubert Feyrer.
2001-09-25 11:42:56 +00:00
agc 03663b89ae Add a "-s verification-type" argument to pkg_add, which adds a callout
to a verification program for a binary package. The following callouts
are defined: "none", "gpg" and "pgp5".

This feature allows you to verify a binary package against a detached
signature file, and to proceed with the installation or not, depending
upon the level of trust you place in the signatory of the binary
package.

Digital signatures will be checked in a recursive manner (i.e. if
pkg_add is called with a verification type which is not "none", the
verification type will be passed to subsequent invocations of pkg_add
for the dependent packages).

At the current time, digital signatures cannot be used with the URL
form of pkg_add(1) - the detached signature file must be in the same
directory as the binary package, either locally or mounted by NFS.

If no -s argument is given, pkg_add(1) retains its current behaviour -
the package will not be verified before installation takes place.
2001-09-25 10:28:16 +00:00
wiz 4c99916337 va_{start,end} audit:
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-24 13:22:25 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
yamt 7bc6654ad8 disable unnecessary warning when PKG_PATH isn't set. 2001-08-21 18:38:40 +00:00
hubertf 194031e9be Don't do FTP stuff when operating on all pkgs
Adresses PR 13397 by Greg A. Woods <woods@weird.com>
2001-08-19 23:33:35 +00:00
agc d069ffa789 Add a -n switch to show the packages "needed" by a package (i.e. the
packages which are depended upon).

Provided in PR 13071 by woods@planix.com (Greg A. Woods), the addition
to the synopsis by myself, pedant-in-chief.
2001-08-13 20:08:58 +00:00
wiz 64662a0528 Fix `pkg_add -u' for packages without dependencies.
Patch by Hubert Feyrer.
Addresses pkg/13536.
2001-07-24 14:45:16 +00:00
wiz a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
wiz e46d80027f Close some memory leaks.
Reported (incl. patch) by YAMAMOTO Takashi in pkg/12830.
2001-07-16 13:50:41 +00:00
hubertf 861dbe4370 Interface change for strip_txz(): now stores suffix 2001-07-15 00:34:14 +00:00
hubertf f990f4a5a2 * Bugfix: if PLIST_SRC directly follows PLIST_CWD, ignore
the PLIST_CWD in creating the tar pipe.

   This takes care of pkg_create -p PREFIX -L FAKE
   where PREFIX does not exist at pkg creation time.

   From OpenBSD's rev. 1.9->1.10

 * Register PLIST_SRC before dependencies and conflicts so that the
   PLIST_CWD != PLIST_SRC hack works with dependencies present.

   From OpenBSD's rev. 1.10->1.11

 * improve error message to tell full path of exec() that failed
2001-07-15 00:23:14 +00:00
wiz 3f9984fc90 `existent', not `existant' 2001-06-19 13:42:07 +00:00
wiz d422b80ea9 Uppercase Dt argument. 2001-06-05 11:58:55 +00:00
joda 073d0b6122 (usage): correct number of arguments to fprintf 2001-05-28 07:59:53 +00:00
agc bd6e892efe Apply the -I substitution logic for @cd as well as @cwd (just for
completeness, as @cwd will be used almost everywhere, and @cd is
deprecated).
2001-05-21 12:06:30 +00:00
agc 8f6a8bb131 When adding the checksums for the individual file entries in the generated
+CONTENTS file, if the entry is also the last in the package's list, adjust
the tail pointer accordingly.
2001-05-21 12:05:20 +00:00
agc 83dc57abd5 Display the correct directory for the @src directive if -I has been
specified.
2001-05-21 12:03:53 +00:00
agc 95a52b2709 Add -I argument to pkg_create so that the real prefix can be specified
for the @src and @cwd PLIST directives.

Bump version number.
2001-05-21 09:17:28 +00:00
agc 6ccfedb598 Add -U argument to pkg_create - by default, all files are added to the
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-05-18 13:21:38 +00:00
hubertf 01b66ea788 * add function strip_txz() to strip off any .tgz, .tbz, .t[bg]z from a
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-28 20:55:33 +00:00
hubertf 965773e0ca Check for return value of getenv() before handing it to strdup().
Fixes a bug in last commit when PKG_ADD was not set.
2001-04-21 01:38:14 +00:00
dmcmahill b80446717f Allow PKG_PATH (or part of that) to contain a local directory, and
still let "pkg_add foo" work:

        setenv PKG_PATH /usr/upkgsrc/packages/All
        pkg_add -v kde2

Depending pkgs will be pulled in as usual.

If PKG_PATH contains a mixture of local paths and ftp://-URLs, the local
paths will be searched first.

Patch provided by Hubert.
2001-04-19 12:31:59 +00:00
hubertf dcdc94af10 Don't warn about @src being deprecated any longer - we add it per default
to each binary pkg again (via pkg_create -L) to assist DESTDIR builds.

Noted by Dan McMahill in private mail.
2001-04-17 10:42:11 +00:00
hubertf 152216c60d on pkgdb_remove, don't retain old errors - clear errno before.
This prevents some warnings from being printed over and over again
after one error was found.
2001-04-17 10:33:35 +00:00
hubertf 5db44bee09 Include lsall and lsbest in usage message. 2001-04-14 00:01:28 +00:00
itojun 939a343de8 have EXAMPLES section. 2001-04-10 01:39:44 +00:00
wiz 9552f78610 Whitespace, and remove unnecessary "" after .Nm. 2001-04-09 12:48:37 +00:00
wiz 71c4cdb33c Fix date, and whitespace fixes. 2001-04-09 12:48:09 +00:00
wiz b5f78004d1 Whitespace fixes. 2001-04-09 12:47:37 +00:00
wiz 4058e24dfa Fix date, and improve markup. 2001-04-09 12:47:09 +00:00
wiz 0037cd4f1b Whitespace fixes. 2001-04-09 12:46:47 +00:00
itojun 3e4d36b9a4 do not terminate on EINTR. with previous behavior pkg_add terminates
if we suspend/change window size.
2001-04-09 08:13:37 +00:00
hubertf 741e17c0cd * Invent ZOULARISBASE, defaulting to $LOCALBASE/bsd
* allow overriding CHOWN/CHGRP/CHMOD (= -> ?+)
2001-04-08 14:11:48 +00:00
wiz 14dbdf5518 Negative exit code cleanup: Replace exit(-x) with exit(x).
As seen on tech-userlevel.
2001-04-06 11:13:45 +00:00
hubertf 6890588691 If a package is already installed, this is *not* a fatal error. Do not
report error code 1, as this will abort installing pkgs if a dependency is
already found installed under certain conditions.
2001-03-28 12:46:01 +00:00
tron d059ac0ad9 Use "tar" included in latest Zoularis under SunOS. 2001-03-23 14:06:16 +00:00
hubertf 35be797120 Set return code != 0 if the given pkg (file) cannot be found.
E.g. try "pkg_add foo ; echo $?". This hits is in bulk builds.
2001-03-22 13:41:35 +00:00
wiz 47acaa6b2d Update path in example to a more recent package. Noted by zuntum. 2001-03-20 19:43:36 +00:00
hubertf 648fa44a28 Add -u switch to pkg_add to do a very rudimentare form of pkg upgrading:
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-18 03:20:28 +00:00
hubertf ee1019de50 Update description a bit - inspired by Jeremy C. Reed <reed@reedmedia.net>
from tech-pkg.
2001-03-13 18:25:30 +00:00
wiz 63f7d31eeb Fix -r: Show REQ/+REQUIRE file for a package, if existing. Fixes pkg/12210.
Patch by Hubert Feyrer.
Note: REQ support has been taken out of bsd.pkg.mk in v1.628; since
pkg_create still supports it, we should support it in pkg_info too,
though.
2001-03-10 18:41:45 +00:00
wiz c62849a451 Minor cleanup, no functional change. Patch by Hubert Feyrer. 2001-03-10 13:18:09 +00:00
wiz a456915f39 Bump version to 20010307 (yesterday's bugfix, and a 1.4 build fix). 2001-03-07 10:04:33 +00:00
wiz 2bf9002908 This header file needs no __RCSID. 2001-03-07 09:44:40 +00:00
wiz f2496b9080 Test matching entries in /var/db/pkg on if they are directories.
Fixes pkg/12073 by Dan McMahill.
2001-03-06 10:30:54 +00:00
wiz e0fc1c5416 Fix typos in comments 2001-03-06 10:29:11 +00:00
wiz 45678a8082 version.o depends on version.h. 2001-03-05 18:24:58 +00:00
wiz 429d019073 Don't allow NULL version packages to match. Patch by hubertf.
Bump version to 20010306.
2001-03-05 18:12:49 +00:00
wiz 2ba98ef9a1 Add -V option to all pkgtools, which reports the version of the pkgtools.
Document it. While there, fix the ordering of the option descriptions in
some man pages. Set version to 20010305.
2001-03-05 16:53:12 +00:00
wiz fcf23e4f53 Using strcmp with NULL pointers is a bad idea. Fixes pkg/11647. 2001-03-05 16:48:35 +00:00
wiz 6c81e9b559 Fix command line for tar in the case that the file to be handled doesn't
end in 'z' or 'Z'.
2001-03-05 16:46:23 +00:00
hubertf 4b8c25f151 Prevent some minor descriptor leaks. 2001-03-04 18:16:42 +00:00
hubertf 55a4568c92 Make usage message match that of other pkg_* programs:
* user lowercase "usage"
 * do not use __progname/getprogname() to make this build on old systems
   (the pkg_install pkg is intended to run on 1.4 and maybe 1.3 too...)
2001-02-21 13:12:47 +00:00
cgd 25bdbb661e convert to use getprogname() 2001-02-19 23:22:40 +00:00
jdolecek c7121de1da use getcwd() instead of getwd() - mainly to avoid link warning, this
particular usage is safe
2001-01-10 22:53:22 +00:00
lukem 443a19e035 convert to using .WAIT 2001-01-09 03:13:39 +00:00
enami 270db080e9 Use PRINTOBJDIR. 2001-01-07 08:00:54 +00:00
hubertf f4f6931307 Alphabetize options. 2001-01-07 01:39:20 +00:00
lukem c2aa46e7c2 use %ll_ instead of the less standard %q_ 2001-01-05 03:27:26 +00:00
hubertf 6e6337b43d * findmatchingname():
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>
2001-01-01 22:07:35 +00:00
hubertf 3d76df0ee0 Strip not only .tgz but also .tbz etc. (missed from last commit) 2000-12-13 03:49:56 +00:00
hubertf 5382dffae7 * Accept ".tbz" as an alternative pkg suffix to ".tbz" for pkg_add and
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-12-13 03:17:53 +00:00
hubertf 4b8a7a0e49 Fix pkg_info w/ URLs (*sigh*) 2000-11-30 10:09:15 +00:00
mycroft 9ff73e166a Oops; the increment needs to be in check1pkg() for the case where the user
specifies a list.
2000-11-28 05:23:35 +00:00
mycroft 23451da968 pkgcnt was incremented twice during a `check'... 2000-11-28 05:21:57 +00:00
hubertf fc8a285aa2 Fix timeout in expect():
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-28 01:16:01 +00:00
hubertf ec58d85250 Don't mkdir("/usr/tmp") in a desperate try to get some space.
If it's there, use it. If it's not there - bad luck.

Pointed out by Simon Burge <simonb@wasabisystems.com>.
2000-11-26 03:12:01 +00:00
wiz 18c121ba47 ispell 2000-11-12 15:32:57 +00:00
lukem 279552d3db fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
  e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
  using `.Nm ""' if there's stuff following, or for the 2nd and so on
  occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
2000-11-07 06:43:24 +00:00
hubertf efeb1d1e82 Don't swallow '%' in file/directory names.
Patch submitted in PR 11352 by Brook Milligan <brook@biology.nmsu.edu>
2000-10-31 23:47:05 +00:00
hubertf 4f394222d2 Pull in /etc/mk.conf unconditionally, not only on SunOS.
Discussed with Alistair Crooks.
2000-10-27 11:49:23 +00:00
hubertf 931aadfd80 s/bsd/BSD/ 2000-10-25 15:55:44 +00:00
mycroft f5abf3cd7a Introduce some caching. 2000-10-21 00:55:23 +00:00
is d8302e2d73 More format string cleanups by sommerfeld. 2000-10-11 20:23:46 +00:00
hubertf bf24eb4e3f Check if $PKG_PATH is set AND contains something useful. Stops
pkg_info from spewing.
2000-10-11 11:09:20 +00:00
hubertf 5f69d95c26 Check right variable to see if it's a URL (pkg -> cp) 2000-10-11 11:08:04 +00:00
hubertf b31af88872 fix indentation 2000-10-11 11:01:41 +00:00
hubertf 589e705b57 Remove unneeded header <db.h>. 2000-10-09 19:11:58 +00:00
hubertf 6cc0c78181 Remove unneeded header <sys/syslimits.h> 2000-10-09 19:06:08 +00:00
hubertf f5b925151e Allow SRCS, LDADD to be set on the command line, and still add the files. 2000-10-09 17:03:20 +00:00
hubertf 32166d4f75 Only pull in <vis.h> when debugging expect(), i.e. EXPECT_DEBUG is set. 2000-10-09 14:35:27 +00:00
ad 5b09090e8e insure -> ensure 2000-10-05 12:35:33 +00:00
hubertf 037fd8a74e Make even more silent, only spit out stuff if -v is given.
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-04 16:01:50 +00:00
hubertf 0a2663ad0b Not every FTP server says nicely "Goodbye".
If they used some other string, pkg_add would hang forever.
The result of testing things only against one FTP server...
2000-10-01 20:34:30 +00:00
hubertf 197ee08b13 Don't replace the pkg version with -[0-9] on pkg alternates ("{foo-x,bar-y}")
as this will remove things like trailing '}' etc. and doesn't work in general.

As mentioned in the already-existing comment, doing TRT here would mean to
partly expand the pattern, then replace the versions on alternatives.
Unless our pkg pattern parser gets these hooks, cowardly step back.
2000-10-01 12:23:21 +00:00
jwise f9c3dbedef Silly as it may be, update the #! line in this script to match the pkgsrc
wish install.

After the freeze, I'll pkgsrc this script -- it's kind of cute.
2000-09-14 18:00:44 +00:00
hubertf b09f22f48f When downloading and extracting a file (in ftp:
'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-09-01 04:42:57 +00:00
hubertf 80c46f750e * Code cleanup
* Add a comment in one appropriate place
 * Indent properly
2000-09-01 04:36:20 +00:00
hubertf c06c5a0348 Add some (commented out) debug flags 2000-09-01 04:34:03 +00:00
hubertf d332db18be Make pkg_add & friends print the files they push through tar(1) to
stderr, thus making them visible. (tar's stdout goes somewhere else)
2000-08-29 03:56:56 +00:00
hubertf 14dbdb5745 * Make a few functions public so this code can be used by other programs
* Comment a workaround for a certain lukem ftp behaviour
 * Fix a bug where a invalid initial dir was not caught early enough
2000-08-28 21:35:14 +00:00
hubertf 0186d67219 Hide "trying PKG_PATH ..." message, only print on -v 2000-08-28 15:39:35 +00:00
hubertf 8102826629 Keep *roff from eating things.
Noted in PR 10687 by NAKAJIMA Yoshihiro <nakayosh@kcn.ne.jp>
2000-07-26 15:18:09 +00:00
dmcmahill 43301f1fee Fix a buffer overrun bug. The TOOBIG macro had some hard coded constants
which needed to be set at compile time but weren't (to handle the case where
TAR_CMD was set to something other than "tar", eg "gtar".  In addition to
the constants being wrong, the wrong directory name was being examined for
its string length.

Add a few comments to hopefully avoid having this problem come back.
2000-07-24 20:09:15 +00:00
hubertf c0f021878e handle NULL pen variable more gracefully in find_play_pen() 2000-07-24 02:54:22 +00:00
hubertf 0379a1727a remove/hide some debugging code 2000-07-06 16:06:36 +00:00
hubertf 7ca7a7f658 Only calculate MD5 checksum for plain files.
As a side effect, fixes handlink of links to dirs.
2000-07-05 20:18:16 +00:00
hubertf 2b35b3d322 * Move comment around a bit
* Document some return code
2000-07-05 20:17:04 +00:00
msaitoh f6f00e2615 remove extra period in SEE ALL section 2000-07-05 15:45:28 +00:00
hubertf 65162fd077 be sure to set pkgdbp to NULL after closing the db. 2000-06-19 13:28:06 +00:00
hubertf f9aaf0a4e5 Allocate space & copy a string returned by a function that'll clobber it on
next call.
2000-06-19 00:55:11 +00:00
hubertf 74056630be remove stale debugging code 2000-06-18 01:31:23 +00:00
hubertf e5b91ee82e * shuffle variable names in findbestmatchingname_fn() around
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-18 01:29:30 +00:00
hubertf 7aed2e5cfb use /var/tmp consistently. (XXX need to re-visit if we ever
put pkg_add on a install floppy)
2000-06-18 01:29:17 +00:00
tron 1b5dabcf75 Update prototype for "extract_plist()". 2000-06-17 11:30:49 +00:00
sjg 7bd1e30c61 extract_plist() should inform caller when it aborts extract 2000-06-16 23:49:17 +00:00
sjg cc95d19ae1 avoid possible overflow of exit status 2000-06-16 23:48:23 +00:00
hubertf 2b57637552 ftp(1)'s "ls" now lists files/dirs plus attributes (much like "dir" did
before). Use "nlist" to still get filenames only.
Needed to expand wildcards.
2000-06-08 00:26:48 +00:00
hubertf 29efdd4919 save another call to allocate space on the stack for something that's
definitely going to end up there.
2000-06-07 03:17:10 +00:00
hubertf 6fa913c454 Don't use asprintf() which isn't available on NetBSD 1.3.2. 2000-06-07 02:10:28 +00:00
hubertf 0948b6f2cb pkg_delete -r was done by Chris Hopps (I used the same code do implement
pkg_delete -R on that later on).
2000-05-16 16:38:15 +00:00
hubertf 7f040da3cd Don't remove any INSTALL scripts. Just in case someone needs them later
(e.g. to tar up the pkg again, and install it elsewhere).
2000-05-16 15:59:16 +00:00
hubertf 5cb5e5143c Don't read +CONTENTS files if not needed. 2000-05-15 23:14:42 +00:00
hubertf 8b8a982165 When expanding wildcards given on the command line, don't include
files (from /var/db/pkg). Only directories can contain pkgs.

Fixed PR 10083 by Dan McMahill <mcmahill@mtl.mit.edu>
2000-05-11 14:13:13 +00:00
hubertf d06e2d8e2e Add "lsall" and "lsbest" commands to pkg_admin, to find all/best
package matching a certain pattern. Examples:

            yui# cd /usr/pkgsrc/packages/i386ELF/All/
            yui# ls unzip*
            unzip-5.40.tgz  unzip-5.41.tgz
            yui# pkg_admin lsall 'unzip*'
            unzip-5.40.tgz
            unzip-5.41.tgz
            yui# pkg_admin lsall 'unzip>=5.40'
            unzip-5.40.tgz
            unzip-5.41.tgz
            yui# pkg_admin lsall 'unzip>=5.41'
            unzip-5.41.tgz
            yui# pkg_admin lsbest 'unzip>=5.40'
            unzip-5.41.tgz
            yui# pkg_admin lsall /usr/pkgsrc/packages/i386ELF/All/'{mit,unproven}-pthread*'
            /usr/pkgsrc/packages/i386ELF/All/mit-pthreads-1.60b6.tgz

This adds a shell/user-interface to pkg-patterns, which are a superset
of sh/csh patterns and can't be expanded by any shell.
2000-05-08 22:48:42 +00:00
hubertf b471b566f8 In require_delete(), actually use the expanded wildcard passed in via
@pkgdep.

Fixes PR 10056 by Dan McMahill <mcmahill@mtl.mit.edu>
2000-05-07 00:33:28 +00:00
mycroft 411fdd599d Fix obvious typo in previous commit. This could not possibly compile. 2000-04-30 07:57:45 +00:00
hubertf c669928eeb Print appropriate warning if the directory of a @dirrm is not present
at all.

Pointed out & fix reviewed by Thomas Klausner.
2000-04-29 22:39:58 +00:00
hubertf d071991a9a Don't abort during quick depends pre-scan when -f is used 2000-04-01 23:31:39 +00:00
hubertf f996345ebf Improve the last change.
Handling all kinds of wildcards properly would be hard, though it should
handle some cases better now. Esp. ones with '-' in the pkg(!) name, and/or
ones with dewer relational versions. I.e. the teTeX-share>1.97 case should
work now.
2000-04-01 22:12:45 +00:00
augustss 93336646e4 Make this compile again. 2000-04-01 14:54:51 +00:00
hubertf 404096ac77 In the "quick depends pre-check" don't only try to replace anything
after a "-" with the "more liberal pattern", but also anything after
any pkg wildcard.

That way if someone has teTeX-share-1.0 installed and pkg_adds
teTeX-1.0.7 (which wants teTeX-share>1.0.2), it will be caught.

XXX This "quick depends pre-check" would be nice to be done in
    bsd.pkg.mk as well
2000-03-31 22:12:56 +00:00
hubertf 0c2cdb98d9 * in pkg_add, before the "install dependencies" loop, check ALL
dependencies if they _can_ be installed. I.e. if a package wants
   version X installed, but version Y is already installed, pkg_adding
   that required pkg will blow up later (probably some pkg_add recursions
   down, given what we keep in the depends list). Now, it stopps right
   away:

        noon# pkg_add /usr/pkgsrc/packages/i386ELF/All/xdaemon-1.0.tgz
        pkg_add: pkg `xteddy-1.*' required, but `xteddy-2.0.1' found installed.
        Please resolve this conflict!

   The idea of this is from Thomas Klausner, further inputs from Alistair
   Crooks.

 * allow pkg names without versions given to "pkg_admin check"
 * Use sizeof() instead of hardcoding the buffers' size in some places
2000-03-19 17:24:27 +00:00
soren 89c5a767f8 Fix doubled 'the's. 2000-03-13 22:55:05 +00:00
hubertf 495734ff62 - Bump timeout in select() to 10 minutes
- Make sure ftp_cmd() properly passes down an error value (-1) when
   appropriate.
2000-02-27 02:35:28 +00:00
hubertf 93b37b7f07 adjust copyright 2000-02-22 01:24:26 +00:00
abs ce9e985266 Special case 'nb<X>' suffix in deweycmp() - this allows NetBSD specific
changes to packages to have a unique version, and still work with deweycmp().
2000-02-07 11:26:26 +00:00
hubertf 422fde1de4 init buffer differently 2000-02-04 03:45:48 +00:00
hubertf b932078a68 remove clutter left after switching to mkstemp 2000-02-02 14:54:50 +00:00
hubertf 4b164aae49 Use mkstemp instead of mkstemp. 2000-02-02 14:42:53 +00:00
hubertf 45d0c80c1d add copyright and (more important!) _RCS_ID() 2000-02-02 14:09:40 +00:00
agc cf6ad33088 Set the environment variables to have zero-length strings on Solaris. 2000-02-01 10:46:55 +00:00
agc 2a29f83468 Fix a typo.
Make a start at linting this.
2000-01-31 13:39:08 +00:00
agc 69acf6de93 Fix for Solaris: don't try to call unsetenv(). 2000-01-31 13:33:19 +00:00
hubertf 938c6a8b17 be a bit more liberal WRT slow servers 2000-01-26 02:12:14 +00:00
hubertf 549295852e -current's gcc seems to be a bit picky about using pointer-differences as
args to the "*" of a printf "%*.*s" pattern. Add some casts to int.
(At least on NetBSD, ptrdiff_t is typedef'ed to int anyways)
2000-01-25 17:21:07 +00:00
hubertf 4a961a7fc3 some code cleanup 2000-01-25 12:09:19 +00:00
hubertf 9d0c5bb4ee FTP wildcard depends code, initial commit.
Modulo some code cleanup, this gives NetBSD full wildcard support not
only in pkgsrc, but esp. for binary packages installed from local disk
and via FTP. For more information, see:

	http://www.feyrer.de/NetBSD/wildcards.html
2000-01-19 23:28:28 +00:00