Subject: CVS commit: pkgsrc
To: None <pkgsrc-changes@NetBSD.org>
From: Johnny C. Lam <jlam@netbsd.org>
List: pkgsrc-changes
Date: 06/03/2006 23:11:43
Module Name: pkgsrc
Committed By: jlam
Date: Sat Jun 3 23:11:43 UTC 2006
Modified Files:
pkgsrc/doc: CHANGES-2006
pkgsrc/mk: bsd.options.mk bsd.pkg.extract.mk bsd.pkg.mk bsd.pkg.use.mk
bsd.prefs.mk
pkgsrc/mk/pkginstall: bsd.pkginstall.mk
pkgsrc/mk/plist: plist.mk
Added Files:
pkgsrc/mk: bsd.pkg.update.mk
pkgsrc/mk/check: bsd.check-vars.mk bsd.check.mk check-files.mk
check-interpreter.mk check-shlibs.mk check-vulnerable.mk
check-wrkref.mk
pkgsrc/mk/depends: bsd.depends-vars.mk bsd.depends.mk depends.mk
pkgsrc/mk/flavor: bsd.flavor-vars.mk bsd.flavor.mk
pkgsrc/mk/flavor/pkg: check.mk deinstall.mk depends.mk flavor-vars.mk
flavor.mk install.mk metadata.mk package.mk reduce-depends.awk
register-dependencies replace.mk utility.mk views.mk
pkgsrc/mk/install: bsd.install-vars.mk bsd.install.mk deinstall.mk
install.mk replace.mk
pkgsrc/mk/package: bsd.package.mk package.mk
Removed Files:
pkgsrc/mk: bsd.pkg.check.mk reduce-depends.mk
Log Message:
First pass at implementing support for package system flavors other
than pkgsrc's current one. This is an important lead-up to any project
that redesigns the pkg_* tools in that it doesn't tie us to past design
(mis)choices. This commit mostly deals with rearranging code, although
there was a considerable amount of rewriting done in cases where I
thought the code was somewhat messy and was difficult to understand.
The design I chose for supporting multiple package system flavors is
that the various depends, install, package, etc. modules would define
default targets and variables that may be overridden in files from
pkgsrc/mk/flavor/${PKG_FLAVOR}. The default targets would do the
sensible thing of doing nothing, and pkgsrc infrastructure would rely
on the appropriate things to be defined in pkgsrc/mk/flavor to do the
real work. The pkgsrc/mk/flavor directory contains subdirectories
corresponding to each package system flavor that we support. Currently,
I only have "pkg" which represents the current pkgsrc-native package
flavor. I've separated out most of the code where we make assumptions
about the package system flavor, mostly either because we directly
use the pkg_* tools, or we make assumptions about the package meta-data
directory, or we directly manipulate the package meta-data files, and
placed it into pkgsrc/mk/flavor/pkg.
There are several new modules that have been refactored out of bsd.pkg.mk
as part of these changes: check, depends, install, package, and update.
Each of these modules has been slimmed down by rewriting them to avoid
some recursive make calls. I've also religiously documented which
targets are "public" and which are "private" so that users won't rely
on reaching into pkgsrc innards to call a private target.
The "depends" module is a complete overhaul of the way that we handle
dependencies. There is now a separate "depends" phase that occurs
before the "extract" phase where dependencies are installed. This
differs from the old way where dependencies were installed just before
extraction occurred. The reduce-depends.mk file is now replaced by
a script that is invoked only once during the depends phase and is
used to generate a cookie file that holds the full set of reduced
dependencies. It is now possible to type "make depends" in a package
directory and all missing dependencies will be installed.
Future work on this project include:
* Resolve the workflow design in anticipation of future work on
staged installations where "package" conceptually happens before
"install".
* Rewrite the buildlink3 framework to not assume the use of the
pkgsrc pkg_* tools.
* Rewrite the pkginstall framework to provide a standard pkg_*
tool to perform the actions, and allowing a purely declarative
file per package to describe what actions need to be taken at
install or deinstall time.
* Implement support for the SVR4 package flavor. This will be
proof that the appropriate abstractions are in place to allow
using a completely different set of package management tools.
To generate a diff of this commit:
cvs rdiff -r1.406 -r1.407 pkgsrc/doc/CHANGES-2006
cvs rdiff -r1.54 -r1.55 pkgsrc/mk/bsd.options.mk
cvs rdiff -r1.35 -r0 pkgsrc/mk/bsd.pkg.check.mk
cvs rdiff -r1.22 -r1.23 pkgsrc/mk/bsd.pkg.extract.mk
cvs rdiff -r1.1826 -r1.1827 pkgsrc/mk/bsd.pkg.mk
cvs rdiff -r0 -r1.1 pkgsrc/mk/bsd.pkg.update.mk
cvs rdiff -r1.33 -r1.34 pkgsrc/mk/bsd.pkg.use.mk
cvs rdiff -r1.220 -r1.221 pkgsrc/mk/bsd.prefs.mk
cvs rdiff -r1.3 -r0 pkgsrc/mk/reduce-depends.mk
cvs rdiff -r0 -r1.1 pkgsrc/mk/check/bsd.check-vars.mk \
pkgsrc/mk/check/bsd.check.mk pkgsrc/mk/check/check-files.mk \
pkgsrc/mk/check/check-interpreter.mk pkgsrc/mk/check/check-shlibs.mk \
pkgsrc/mk/check/check-vulnerable.mk pkgsrc/mk/check/check-wrkref.mk
cvs rdiff -r0 -r1.1 pkgsrc/mk/depends/bsd.depends-vars.mk \
pkgsrc/mk/depends/bsd.depends.mk pkgsrc/mk/depends/depends.mk
cvs rdiff -r0 -r1.1 pkgsrc/mk/flavor/bsd.flavor-vars.mk \
pkgsrc/mk/flavor/bsd.flavor.mk
cvs rdiff -r0 -r1.1 pkgsrc/mk/flavor/pkg/check.mk \
pkgsrc/mk/flavor/pkg/deinstall.mk pkgsrc/mk/flavor/pkg/depends.mk \
pkgsrc/mk/flavor/pkg/flavor-vars.mk pkgsrc/mk/flavor/pkg/flavor.mk \
pkgsrc/mk/flavor/pkg/install.mk pkgsrc/mk/flavor/pkg/metadata.mk \
pkgsrc/mk/flavor/pkg/package.mk pkgsrc/mk/flavor/pkg/reduce-depends.awk \
pkgsrc/mk/flavor/pkg/register-dependencies \
pkgsrc/mk/flavor/pkg/replace.mk pkgsrc/mk/flavor/pkg/utility.mk \
pkgsrc/mk/flavor/pkg/views.mk
cvs rdiff -r0 -r1.1 pkgsrc/mk/install/bsd.install-vars.mk \
pkgsrc/mk/install/bsd.install.mk pkgsrc/mk/install/deinstall.mk \
pkgsrc/mk/install/install.mk pkgsrc/mk/install/replace.mk
cvs rdiff -r0 -r1.1 pkgsrc/mk/package/bsd.package.mk \
pkgsrc/mk/package/package.mk
cvs rdiff -r1.1 -r1.2 pkgsrc/mk/pkginstall/bsd.pkginstall.mk
cvs rdiff -r1.11 -r1.12 pkgsrc/mk/plist/plist.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.