Documentation
¶
Overview ¶
Package installspec is the declarative KIDS install spec + validating loader (VSL T0a.3): the answers `v pkg install` feeds to a non-interactive KIDS install — the source distribution, the environment-check choice, the standard KIDS questions, and the device/queue. It is the JSON form of the install-spec.yaml in docs/kids-installation-automation.md §5. The standard answers map onto the KIDS XPDDIQ answer codes (XPO1/XPI1/XPZ1) used to suppress the prompts (see that doc, Tier A).
Index ¶
- Constants
- func FinalInstallScript(name, header string, nPairs int) string
- func StageChunks(pairs []kids.Pair, maxBytes int) []string
- func UninstallScript(name string, routines, paramDefs, files []string) string
- func VerifyScript(name string, routines, paramDefs, files []string) string
- type Answers
- type Device
- type ExtraAnswer
- type Source
- type Spec
Constants ¶
const ResultMarker = "<<VPKG>>"
ResultMarker prefixes the script's machine-readable result lines on the principal device — the driver layer scans stdout for it. Format: `<<VPKG>>key=value`.
Variables ¶
This section is empty.
Functions ¶
func FinalInstallScript ¶
FinalInstallScript returns the constant-size install routine run after StageChunks has populated ^XTMP("VPKGI",…). nPairs is the expected staged-node count: the routine counts the staging global and refuses to install if it does not match (so a silently-truncated stage fails loudly instead of installing a partial package). header is the #9.7 install header (cosmetic).
func StageChunks ¶
StageChunks renders the transport-global pairs as M routine bodies that populate the staging global ^XTMP("VPKGI",…). Each body is kept at or below maxBytes (a lone over-long SET is its own chunk), so no single staged routine is large enough to hit the driver's silent-truncation limit. The first body clears any stale staging global. Run each body in order; the global persists across the (stateless) driver processes, accumulating the whole tree.
func UninstallScript ¶
UninstallScript returns M source that reverses an install (T0a.4): delete each routine (^%ZOSF("DEL") removes the .m + .o), each PARAMETER DEFINITION from #8989.51 (FileMan DIK by IEN — clears its "B" and subfile xrefs), each FileMan FILE (its DD, data global, and dict-of-files pointer — KIDS ships no generic file uninstall), and the #9.7 INSTALL and #9.6 BUILD entries via DIK. The monotonic #9.x / #8989.51 IEN counters are not rolled back (inherent to FileMan, not a leak).
func VerifyScript ¶
VerifyScript returns M source that reports whether name is installed: the #9.7 INSTALL presence + status (piece 9; 3 = "Install Completed"), per routine whether it is loaded ($T probe), per PARAMETER DEFINITION whether it is present in #8989.51 (the "B" index), and per FileMan FILE whether its data dictionary installed (^DD(file,0) present). Each fact is a ResultMarker line.
Types ¶
type Answers ¶
type Answers struct {
RebuildMenuTrees bool `json:"rebuildMenuTrees"`
InhibitLogons bool `json:"inhibitLogons"`
DisableOptionsProtocols bool `json:"disableOptionsProtocols"`
DelayInstallMinutes int `json:"delayInstallMinutes"`
}
Answers are the four standard KIDS install questions.
type Device ¶
type Device struct {
Queue bool `json:"queue"`
At string `json:"at,omitempty"` // ISO time when queued
}
Device selects the install output device / queueing.
type ExtraAnswer ¶
type ExtraAnswer struct {
PromptContains string `json:"promptContains"`
Answer string `json:"answer"`
}
ExtraAnswer answers a build-specific pre/post-install question by prompt match.
type Source ¶
type Source struct {
Kind string `json:"kind"` // "hfs" (Host File) | "packman" (MailMan message)
Path string `json:"path"`
}
Source is the distribution location.
type Spec ¶
type Spec struct {
Name string `json:"name"` // INSTALL NAME, e.g. ZZSKEL*1.0*1
Source Source `json:"source"` // where the distribution comes from
EnvCheck string `json:"environmentCheck,omitempty"` // "run" (default) | "skip"
Backup bool `json:"backupTransportGlobal,omitempty"`
Answers Answers `json:"answers"`
Device Device `json:"device"`
ExtraAnswers []ExtraAnswer `json:"extraAnswers,omitempty"` // build-specific pre/post questions
}
Spec is one install spec (kids/<pkg>.install.json or passed inline).