make sure that a failed installation of a rpe-requisite package kills
the attempt to add the package. This reverts pkg_add(1) to traditional
behaviour.
Bump version number accordingly.
to be added, first try to use the exact version of the pre-requisite
with which the base package was built (from the @blddep directive in
the +CONTENTS file), and then use the traditional dependency from the
@pkgdep directive.
Also rename a variable from "code" to "errc" to make it obvious what
the variable counts.
Bump version number to 20020306.
version of the pre-requisite package which was used to build the
package. This is derived automatically from the list of pre-requisite
packages which is provided to pkg_create(1) in the -P argument.
Bump the version number to 20020305.
Versions of the pkg_install tools prior to 20020305, when adding a
binary package with embedded @blddep directives, will warn that the
directive is not recognised, but will continue to add the binary
package.
> revision 1.22
> date: 2002/02/18 00:57:54; author: hubertf; state: Exp; lines: +10 -3
> make @cwd work a bit more reliable:
>
> When -L is used (as it is by pkgsrc), don't override the directory
> set by @cwd unconditionally with what was given to -L (srcdir).
> Instead, use the @cwd directory.
When -L is used (as it is by pkgsrc), don't override the directory
set by @cwd unconditionally with what was given to -L (srcdir).
Instead, use the @cwd directory.
XXX#1: This was not tested with DESTDIR set
XXX#2: @cwd is still needed twice
* There is no -indent option to .Bd or .Bl, although you would
never know that from its frequent use in this tree. There is a
"-offset indent" combination that makes sense, and you can certainly
say "-width indent".
* Also, you can't markup the -width option argument, tho you CAN
use a callable macro. So "-width Ar filename" doesn't make sense,
but either "-width Ar" or "-width filename" does, as might something
like "-width xxfilename" for a little extra space.
* There are a lot of needlessly complex hanging tag macros in man4 used
to create simple item lists. Those should be simplified one of these
days before someone copies and edits yet another man4 page.
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.
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.
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.
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
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.
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.
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.
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.
* 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...)
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>
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" !!!
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.
- 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
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... :-)
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.
'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>
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.
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".
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.
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.
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
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
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
- Minor re-indenting
- Fix printing of @ignore in pkg_info (did this ever work?)
- Fix installing of local wildcard dependencies (unused in main system)
- Fix deleting of packages that depend on wildcard dependencies
(fexist() is not enough there :-)
installed version and binary packages. The size can be queried then
via pkg_info:
xfeyrer @ noon% pkg_info -s xv
Information for xv-3.10apl1:
Size of this package in bytes: 4670692
xfeyrer @ noon% pkg_info -S xv
Information for xv-3.10apl1:
Size in bytes including required pkgs: 14610165
While doing work on the size code, support for the @src directive was
removed (formerly enabled with the pkg_create -s switch, but unused in
our pkg system). The new pkg_info -s and -S switches were tested on
installed, local (file) and remote (ftp) packages.
In bsd.pkg.mk, take special care for pkg_* versions that do not have
the pkg_create -s and -S switches and do not record size information
there.
If no (installed) package is found with the given name, "-[0-9]*" is
appended, and the search retried. Withs with any options to pkg_delete
and (esp.) pkg_info:
pkg_info kde
pkg_info -e emacs
pkg_info -qL xlock
pkg_delete -v emacs
URLs, and an access function (URLlength) - saves having various
hardcoded strings all over the place. Delete isURL, and use URLlength
in its place. Also use URLlength when parsing a filename for host
and filename part.
invoked for (FTP) URLs, this was just a matter of recognizing HTTP URLs
in the places where FTP URLs were recognized (and updating a comment and
the manual page).
list, using chopss' list functions (moved to lib/lpkg.c and
lib/lib.h).
Properly handle wildcards in arguments to "pkg_info", "pkg_delete" and
"pkg_admin check".
Some other minor cleanups.
hardcoded strings "tar" and "/usr/bin/tar". This allows the package
tools to use GNU tar with a different name (it's often installed as
gtar), and from a directory other than /usr/bin.
because it wasn't in LogDir when it was enterred. :-/
XXX A better fix to this would be to put this save-and-restore-CWD back
in and also add it to recurse_require_find() and require_find(), but
this is too much action for nothing now.
- Fix check for circular dependency
- Most importantly: DO NOT remove the package if something depends
on it, and -r isn't given!!!!! Without this change, pkg_delete was
happily nuking away any package even if it had some dependencies.
machine:
- create /var/db/pkg if not there
- fix wrong handling of findmatchingname() return code, resulting
in missing /var/db/pkg dir being interpreted as match found
- only move +BUILD_VERSION and +BUILD_INFO files if they're
actually present (old pkgs don't have them!)
creating packages, and modify pkg_add to copy the files when a binary
package is added. This preserves the fine-grained version information in
a binary package, and also the options with which the binary package was
built.
PR bin/6284, slightly munged about for platforms which aren't LP64.
Also, don't use hardcoded strings (or their lengths) when we've
already defined them in a common header file.
+ Fix a bug introduced when the package name comparison routines were moved -
alternate matching now completes and works properly.
+ Add -R argument to pkg_create, which re-orders any directories in the
generated PLIST into reverse alphabetic order.
+ Add -l argument to pkg_create, which checks that any symbolic links in
the package are relative-to-$PREFIX pathnames, rather than full pathnames.
+ General cleanup elsewhere.
to be printed. Also, don't error out if any unexpected input is read -
just log the error, and keep on going.
Fix a slight bug along the way - if there was an @option in the package,
then pkg_info would die.
a stack of directories, we'll do with a save/restore_dirs cludge for
now. => Fixes the bug I mentioned yesterday that shows when one pkg
installs another (depending) pkg via FTP.
Fixed another bug with extract-in-place when the destination dir is
already there.