Commit Graph

287 Commits

Author SHA1 Message Date
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