Condensed history: in working on some other fixes, I believe we're
crossing the threshold of maintainability in the usr/src/pkg
makefiles. When I suggested condensing the information we need into a
human readable, maintainable list format, Danek one-upped me and
suggested that we not maintain *any* package metadata outside the
manifests themselves.
As much as the extra effort seems frustrating, I agree. (As did Dave
Miner, rather emphatically.)
In reviewing the makefiles, we're currently using package metadata to
make the following decisions:
1. Per the current build environment, should we publish this pkg?
Depends on $PKGMACH and pkg property variant.arch.
Depends on $CLOSED_BUILD and proposed pkg property
org.opensolaris.redist, with possible values "redist,"
"nonredist," and "internal." Defaults to "redist," and we
would treat "nonredist" and "internal" identically.
2. Should we include this pkg in the group package?
Depends on pkg properties pkg.obsolete and pkg.renamed.
Though we incorporate all packages, we do NOT include obsolete
or renamed packages in the group package.
3. To what repository should we publish this package?
Depends on proposed pkg property org.opensolaris.redist, per
above.
In addition, we're making source build decisions (xmod and crypt), but
I would like to keep those separate. Even though they motivated some
of this discussion in the first place.
The "publish or not" decision lends itself well to allowing a graceful
abort from pkgmogrify. We provide a transform, according to build
environment, which will abort when it encounters matching pkg property
settings.
The remaining decisions require information that is only present in
the manifests themselves. We're already groveling through the
manifests once (pkgmogrify), but we don't currently have a way to
extract information (other than the output files themselves) from
this step. Rather than process the manifests three times (pkgmogrify,
then extract useful info, and finally publish), I suggest also adding
a "print" operation to the transform directive. This way we can
extract all of the information we need for our decisions via
transforms that we provide.
The specific operations I'm suggesting are:
abort: causes pkgmogrify to immediately exit with status 0, producing
no output. If -O outputfile was specified, that file will
never be opened.
print: causes pkgmogrify to output, when the transform is evaluated,
the specified information. At least at the time of initial
integration, the information to be output will be limited to
the text provided in the transform. In other words, I won't
be providing any keywords or tokenization to extract
information from the actions themselves.
An additional option will be added to specify an output file
for all output generated by use of this operation. If not
used, if will default to stdout. If both this new option and
-O are allowed to default to stdout, the printed information
will come immediately before the line that matched the
transform in the mixed output stream. This latter bit is an
artifact of implementation, since the print operation happens
as part of apply_transforms(), and printoutput and output will
both be sys.stdout.
I plan to let this discussion settle (or just look for a couple +1's
and no real objections), then file and implement the resulting rfe's
in the pkg gate and the on_ips project repo.
--Mark
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss