* Teaching pkg_add(1) to be smarter about how to add a depoted packge.
* "pkg_delete foo" only deletes foo if it's a unique package.
* Teach pkg_admin(1) two new commands "add" and "delete" for working
with pkgdb.byfile.db.
* pkg_view(1) uses the new pkg_admin(1) commands to keep the
pkgdb.byfile.db files consistent in each view.
unique package. This makes deleting packages less surprising in a pkgviews
world where you can have multiple versions of packages installed at the
same time in the package depot.
Also make "pkg_delete -f" work depoted packages if they have been added to
views by also running "pkg_delete -f" for the package instances in the
views.
add pkg ...
For each listed package, write the absolute pathnames of the
files listed in its +CONTENTS file together with the package
they belong to into the package database. This should be used
only by pkg_view(1).
delete pkg ...
For each listed package, remove all file entries in the
package database that belong to the package. This should be
used only by pkg_view(1).
These commands will be used by pkg_view(1) to keep the pkgdb.byfile.db
files for each view consistent with what's stored in each view.
Since we stole these names from the debug code, change the names of the
debug commands to "addkey" and "delkey".
but the size of the data field in the pkgdb.byfile.db file is the length of
the string plus 1 for the NUL. Fix this check so that removing all of the
files belonging to pkgname from pkgdb.byfile.db works again.
Add the ability to pkg_info(1) and pkg_delete(1) to take a directory
name for the name of the package, so that shell-completion can help
when finding out information or deleting packages.
When doing quick pre-check if any conflicting dependencies are installed
and a dependency is not found installed do not try to search for a wildcarded
(-[0-9]* suffix) package if the dependency was already wildcarded.
This prevent something like 'p5-Net-DNS-0.33' reported as an already
installed version of 'p5-Net-[0-9]*' as a dependency.
Before this fix 'p5-Net-[0-[0-9]*' would have been incorrectly searched for.
Reviewed by hubertf@.
Bump PKGTOOLS_VERSION to 20030423.
fixes 'pkg_admin lsall' and 'pkg_admin lsbest' on Solaris and probably
other platforms where getcwd() doesn't allocate a buffer when the 2nd
arg is NULL.
ok'd by simonb@
option, including NetBSD 1.5 and 1.6. noted by wiz.
also handle tar.gz, tar.bz2 and .tar filenames, and bomb with a useful
error if we don't know to handle a file.
(PKG_DBDIR/PKGNAME). Address PR pkg/20856 and part of PRs pkg/20852,
pkg/20853 and pkg/20854 by FUKAUMI Naoki <naoki at fukaumi dot
org>.
Note: with this change pkg_tarup can now produce reusable binary
packages from installed packages when they depend on an install
script.
* Upgrade step 1/4: Check if the new version is ok with all pkgs
* (from +REQUIRED_BY) that require this pkg
Inspired by bsd.pkg.mk's upgrade(?) target.
(filename, package) pairs.
Modify calling functions to use pkgdb_dump() directly, rather than
sequences of
pkgdb_open
{ pkgdb_iter, pkgdb_retrieve }
pkgdb_close
calls.
Remove the now unnecessary pkgdb_iter function.
A preserved package may not be deleted by pkg_delete(1) (unless the -f
option is given), and the preserved capability will be carried into
any binary package. pkg_add(1) will also keep the preserved capability
if it was present in the binary package.
The "preserve" capability can be given to a package by using the
PKG_PRESERVE definition in a package Makefile in pkgsrc.
Ride on the recently-bumped lib/version.h for new functionality.
This fixes the problem that pkg_add(1) drops setuid/setgid bit.
This problem occurs on pax(1) based tar environment.
pkgtools/pkg_install should be fixed, too.
stay in no-longer existing dir and continue with removal of db-files;
otherwise, the packages contents would be removed, but the package not
uninstalled. Pointed out by Grant in PR pkg/18384. OK'd by hubertf.
- all command executions now use the path [execvp/execlp/system].
- normalize the macro names as <COMMAND>_CMD.
- in some OS's full pathnames for commands can still be provided, but this
is not the default.
This was needed to fix -DTAR_FULLPATHNAME="/usr/bin/tar"
Also, remove a call to path_create() that causes the `prepend' path held by
pkg_perform() to be deleted, causing a core dump later when pkg_perform()
tries to remove it itself.
Will return true if 'pkg' matches 'pattern', false else.
Provides a command line interface to the pmatch() C function
to be used from shell scripts etc.
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.