Documentation
¶
Index ¶
- func CleanUp(cachePath string)
- func ExpandUninstallsWithUpdaters(uninstalls []string, index map[string][]string) []string
- func InstalledReferentUpdaters(catalogsMap map[int]map[string]catalog.Item, index map[string][]string, ...) []string
- func Installs(installs []string, catalogsMap map[int]map[string]catalog.Item, ...)
- func Manifests(manifests []manifest.Item, catalogsMap map[int]map[string]catalog.Item) (installs, uninstalls, updates []string)
- func PruneSelfServeUninstalls(selfServe *manifest.Item, catalogsMap map[int]map[string]catalog.Item, ...) (changed bool)
- func ReconcileSelfServe(selfServe *manifest.Item, manifests []manifest.Item) (installs, uninstalls []string, changed bool)
- func ResolveItem(itemName string, catalogsMap map[int]map[string]catalog.Item) (catalog.Item, bool)
- func Uninstalls(uninstalls []string, catalogsMap map[int]map[string]catalog.Item, ...)
- func UpdaterIndex(catalogsMap map[int]map[string]catalog.Item) map[string][]string
- func Updates(updates []string, catalogsMap map[int]map[string]catalog.Item, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanUp ¶
func CleanUp(cachePath string)
CleanUp checks the age of items in the cache and removes if older than 10 days
func ExpandUninstallsWithUpdaters ¶
ExpandUninstallsWithUpdaters transitively appends the updaters of every removed item so updaters are removed with their referent (R7). Original order is preserved with expansions appended; a visited set makes it cycle-safe.
func InstalledReferentUpdaters ¶
func InstalledReferentUpdaters(catalogsMap map[int]map[string]catalog.Item, index map[string][]string, installsSet map[string]bool, checker *status.Checker, cachePath string) []string
InstalledReferentUpdaters returns the updaters of referents that are merely installed on disk (not being installed this run), so they ride along as installs (R7). installsSet is the set of names already being installed this run; those referents are handled by the in-walk expansion in installWithDeps. Referents that do not resolve are skipped; a status-check error warns and skips. Script-check referents do run their check script here — the run context is where scripts are expected to execute.
func Installs ¶
func Installs(installs []string, catalogsMap map[int]map[string]catalog.Item, r *installer.Runner, index map[string][]string)
Installs prepares and then installs an array of items with their dependencies resolved recursively (K4, spec R6). index maps referent names to their update_for updaters so updaters ride along after their referent (R7).
func Manifests ¶
func Manifests(manifests []manifest.Item, catalogsMap map[int]map[string]catalog.Item) (installs, uninstalls, updates []string)
Manifests iterates though the first manifest and any included manifests
func PruneSelfServeUninstalls ¶
func PruneSelfServeUninstalls(selfServe *manifest.Item, catalogsMap map[int]map[string]catalog.Item, checker *status.Checker, cachePath string) (changed bool)
PruneSelfServeUninstalls drops managed_uninstalls entries whose software is confirmed gone so the user can reinstall later (R5). An entry that no longer resolves to a catalog item is kept (the catalog may return); a still-installed item is kept and retried next run. Returns whether the file needs saving.
func ReconcileSelfServe ¶
func ReconcileSelfServe(selfServe *manifest.Item, manifests []manifest.Item) (installs, uninstalls []string, changed bool)
ReconcileSelfServe reconciles the self-serve manifest against the admin manifests and returns the authorized installs and the pass-through uninstalls to feed into the run. It mutates selfServe in place for the once-only default state machine and reports whether the file needs saving.
Authorization set is the union of every manifest's optional_installs only. As in Munki, a default_installs name only asserts intent into the self-serve file (analyze.py:747-748); it must also be offered in optional_installs to actually install, since installation flows exclusively through the self-serve managed_installs filtered against available optional installs (core.py:264-278). A default-only name is recorded but filtered out of the returned installs.
func ResolveItem ¶
ResolveItem returns the catalog item the run acts on for itemName (the first valid occurrence, as firstItem picks it) without logging. Callers that only report on items use it so they agree with the run.
func Uninstalls ¶
func Uninstalls(uninstalls []string, catalogsMap map[int]map[string]catalog.Item, r *installer.Runner)
Uninstalls prepares and then installs an array of items
func UpdaterIndex ¶
UpdaterIndex maps a referent item name to the names of items that declare update_for it (its updaters). Catalogs are iterated in index order (sorted keys, like firstItem) and updater names are deduped first-catalog-wins.
ponytail: plain-name matching only — Munki's version-specific updater names (e.g. "Firefox-60.0") are not supported. Upgrade path: when a real catalog needs them, parse the version suffix here and gate updaters on the resolved referent version.
Types ¶
This section is empty.