Changes by hubertf and seb; these changes tested on NetBSD, Linux and Irix.
Modified Files:
src/usr.sbin/pkg_install/add: perform.c pkg_add.1
Log Message:
Implement remaining TODO item in pkg upgrade (pkg_add -u):
* 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.
Modified Files:
src/usr.sbin/pkg_install/admin: main.c
src/usr.sbin/pkg_install/info: main.c perform.c
Log Message:
Consistently check findmatchingname() return value for error condition.
Among other this fixes 'pkg_info -e whateverpkg' exit status when
/var/db/pkg is missing: it is now 1 and not 0.
Modified Files:
src/usr.sbin/pkg_install/lib: version.h
Log Message:
Bump to "20030325" after today's changes from seb and me
and X11BASE ("/usr/X11R6"), which, while they might not be right for
*every* system, are certainly more right than UNDEFINED.
Give lang/python/pyversion.mk a little help by stuffing the material
from PYTHON_VERSIONS_ACCEPTED into the two places it expects it (since
lintpkgsrc doesn't do .for loops), add support for the ${FOO:S/foo/&/}
construction, and tweak the .if handling for && and || bits.
This has the following effect on the -g output (as a simple measure):
% grep -c UNDEFINED before after
before:58
after:1
Jump to 3.47.
you need and then build off-line (suggested by smb).
Add -M to set the name/location of the make program (for the -F and -R
output formats) to be used on systems where the make program is not
the one you want (suggested by seb).
Clean up a bug with subgraph assignment and counting.
Move to 2.3.
Date: Sat Mar 15 20:49:27 UTC 2003
Introduce a pkgdb_dump() function, which dumps the cache file of
(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.
Date: Sat Mar 15 20:50:15 UTC 2003
Bump version string for pkgdb_dump changes.
Date: Sat Mar 15 20:54:26 UTC 2003
Catch one more place that could result in Current not being set properly
(and thus in the execution of "rm -fr /") if ^C is pressed at the wrong time.
See also PR 19436.
of commands to rebuild directly from pkgsrc), -K (as with lintpkgsrc)
as a way of specifying the PKG_PATH (the environment is also checked),
and convert to using Getopt::Long, so that we can stuff multiple
values for "out of date" packages or packages to be "updated" into
arrays. Now you can make more than one package be out of date, etc.
* label the graph and the subgraphs (feature)
* rework subgraph identification in the main loop (feature)
* better handling of recoloring graphs that contain subgraphs (bugfix)
* be a little more picky about what *might* be a pkg directory (bugfix
via seb)
* fix a bug in error reporting in canonification routine (bugfix via
seb)
* add comments (bugfix? feature?)
New features (excerpts from the man page, not in proper order, so that
you can better see how it fits together):
-L Limit the graph to those packages that are out of date or ulti-
mately depend on some package that is.
-D Instead of the standard graph output, pkgdepgraph lists the
packages that need to be deleted, in ``least required first''
order, so that they can be deleted without any dependency prob-
lems.
-R Instead of the standard graph output, emits a series of sh(1)
commands that will rebuild all the out of date packages by re-
building all the deleted leaf packages.
-U package
Generates a graph with only the out of date dependencies of
package marked in red (ie, packages that are out of date but not
dependencies of package will not be considered out of date).
-f Force a rebuild of all dependent packages. This option is for
use in conjunction with the -U option to force a rebuild of all
the dependencies of a package to be updated.
-O package
Marks package as out of date so that you can see the impact of
deleting dependent packages and rebuilding everything.
-t target
Changes the target of the -R output from ``install'' to target
in case you want to ``make package'' or some other target.
-c Inserts a ``make clean'' command in the set of instructions to
rebuild packages (see the -R option) after they are installed.
-C Asserts -c and adds ``CLEANDEPENDS=YES'' so that all rebuilt de-
pendencies are cleaned as well.
The code was also cleaned up a bit, some unused or otherwise useless
variables were culled, the "multiple box" phenomenon of subgroups is
fixed, and the examples were all cleaned up to take advantage of all
the new features.
Hey ma! Now I can update my pkgs in four easy steps!
$ lintpkgsrc -i > pkgdepgraph.in
$ pkgdepgraph -R pkgdepgraph.in > rebuild.sh
$ pkg_delete `pkgdepgraph -D pkgdepgraph.in`
$ sh rebuild.sh
In pkgdb_remove_pkg, only perform DB functions if HAVE_DBOPEN is defined,
else return EXIT_SUCCESS unconditionally (as in other functions dealing with
db functionality).
fixes build problem on Solaris when no libdb is available.
which creates DVD sized images instead of the default CD-ROM sized images.
Prompted by the current size of an i386 CD-ROM set (7) and the suggestion
by David Brownlee that we create DVD images.
"database" that lintpkgsrc can use in lieu of scanning all the pkgsrc
Makefiles.
This has several nice effects, chiefly:
(1) Using any of -B, -O, -R, -S, -V, -d, -g, -i, -p, or -u, are now
*much* faster since reading the "database" takes at most 3 seconds on
my laptop, whereas reading all the Makefiles takes at least 3 minutes.
(2) One can now check for out-of-date packages on machines which do
not have an expanded pkgsrc tree simply by copying the "database"
over. Note that the database will inherently have some dependencies
on the environment of machine where it is generated (eg, mk.conf
settings, architecture type, etc).
Reviewed by the wiz.
- Allow the user to issue any command inside the chroot environment using the
"chroot" target, instead of only running ROOTSHELL. Patch provided by seb.
----------------------------------------------------------------------
Add a pkgdb_remove_pkg() function and use it in pkg_delete(1).
Bump lib/version.h due to added functionality.
Order the getopt(3) options alphabetically.
Introduce the notion of "preserving" an installed package.
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.
like, so 80's! Pass a value more appropriate for the current decade
to --mandir via CONFIGURE_ARGS, and let ./configure set this in
the Makefiles.
Install catted man pages with the suffix ".0" rather than ".1".
Bump PKGTOOLS_VERSION.
Keep the old NO_PKG_REGISTER and NO_PACKAGE definitions for now,
rather than force everyone to upgrade their pkg_install sources to
today's version.
At the next bsd.pkg.mk bump of PKGTOOLS_REQD, this can be readdressed.
a pkgdb_open that may return one of _three_ values (0,1,-1), so that
we can not simply use
if (!pkgdb_open(ReadOnly))
but need to use
if (pkgdb_open(ReadOnly) == -1)
Mea culpa.
In pkgdb_remove(), use the return value from (*db->del), rather than
explicitly setting and checking errno.
Do some CSE in pkgdb_iter().
Use the db access functions in the proper manner.
Also fix some whitespace nits.
Use EXIT_FAILURE, rather than hardcoding a value of '1' in err(3) and
errx(3).
Plug a memory leak by modifying the signature of
_pkgdb_getPKGDB_FILE() to take a buffer and its size, and fill in that
buffer and return it.
Add an enumerated type which is used in pkgdb_open() to specify
read-only or read-write mode.
Modify the return value of pkgdb_open() to have a more logical boolean
value.
- replace occurrences of "make" with @MAKE@
- add @MAKE@ to the list of variables to get sod (I never learned
properly how to conjugate "sed")
- warn about NO_PATCH, since it hinders more than it helps
- remove NO_PATCH from Makefile to quell new pkglint warning