Just to clarify a minor misconception that showed up in private email.

There are very few things hardcoded in the ports tree, the correct way
to enquire about some file location is to use make show=variable with
the correct value (or preferably make dump-vars if you need a largish
collection).  Tweaks such as DPB=value are only meant for dpb use and the
exact list/how it's trimmed should be considered internal.


Likewise, the list of files and actual syntax used by the pkg_tools is
documented mostly for debugging purposes. 

Handling of  PackingList elements should happen through the API 
documented in OpenBSD::PackingList(3p) and OpenBSD::PackingElement(3p).

Anything else will break eventually.

PkgCreate.pm   got augmented recently, so that the actual OpenBSD::PkgCreate
class can be used as a base class for a tool  that wants to see more closely
how a packinglist is constructed (most specifically, the read_fragments
method goes through an empty annotate method that can be overridden to see
the actual line before substitution AND the actual source file).

Likewise, PkgCreate::State can be used to get an exact copy of options
passed to pkg_create. This is all part of a pending rewrite to update-plist,
it's not fully documented yet, but it will provide a fully-sanctioned 
interface to tools that want to get very chummy with packing-list details.

If you don't like perl much, tough luck.  You can always invert stuff 
somewhat: it's reasonably trivial to write a small perl stub that uses
$plist =PackingList->read() and then  $plist->some_visitor  to extract the
information you really want, and print it out.

Reply via email to