Commit graph

59 commits

Author SHA1 Message Date
rillig
cb4b57b6b0 Replaced PHASE_MSG with STEP_MSG in many (but not all) places where it
wasn't used to identify a ``phase'', as defined in the pkgsrc guide.
2006-06-08 08:01:53 +00:00
jlam
0c1e91164b Avoid using ::= construct which apparently is somewhat buggy in bmake.
This hopefully fixes user/group creation problems on platforms using
bootstrap bmake, e.g. Solaris.  Problem noted by adrianp in private
email.
2006-06-08 03:30:37 +00:00
jlam
377d2c27f2 Move _ZERO_FILESIZE_P ftom bsd.pkginstall.mk to bsd.pkg.mk so it can more
clearly be used in other modules.
2006-06-07 17:44:29 +00:00
jlam
8efe9d7045 Avoid using PKGNAME in target names since they are "immediately"
resolved in much the same manner as variables set using :=.  PKGNAME
could be set after including bsd.pkg.mk (which is poor form), and it's
too close to the pkgsrc-2006Q2 branch to fix that all over pkgsrc at
this time).  This fixes building shells/static-bash2.
2006-06-06 19:49:52 +00:00
jlam
3fbe129b69 Use PHASE_MSG, STEP_MSG, WARNING_MSG, and ERROR_MSG in place of ECHO_MSG
in various places.
2006-06-05 22:49:44 +00:00
jlam
e914dab1ef Drop the use of _ACQUIRE_LOCK and _RELEASE_LOCK and replace with
acquire-lock and release-lock macro targets.  Take advantage of using
a make target by breaking up the _ACQUIRE_LOCK script into smaller
pieces, and make better use of the *_MSG definitions for printing
messages within the acquire-lock and release-lock targets.
2006-06-04 04:31:47 +00:00
jlam
46822f43e8 Convert just-in-time su targets to use su-target instead of ${_SU_TARGET}.
Garbage-collect the (now) unused _SU_TARGET.
2006-06-04 00:39:05 +00:00
jlam
e5eb2c56af 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.
2006-06-03 23:11:42 +00:00
jlam
143b5f7d14 Move mk/install to mk/pkginstall to better reflect the contents (the
pkginstall framework).
2006-05-21 23:50:15 +00:00