|
The current setup is only really good for modifying PKGBUILD fields. The
modification of PKGBUILD funcs is hackish. Instead, the tweaks will be
written in a scripting language (like Io) where both PKGBUILD fields
and function code can be easily modified.
Fields should be able to be modified just like arrays, but with easier
package matching going on. PKGBUILD bash functions are simply arrays
of lines, but they are not as sophisticated. Instead they can only be
appended to.
Package files are represented as trees. Each file (PKGBUILD pkg.install)
is a child of the top-level node of the tree. Each child of the file
node is a section of the file (intro, body, end). Each section can
also have its own intro, body, and end node. In this way each bash
function is a node with its own intro, body, and end node. Prepending
to a function appends to its intro node. Appending to a function appends
to its end child node. The body cannot be modified.
|