Skip to content

Important Variable Names

Greg Neagle edited this page Aug 22, 2013 · 6 revisions

Variables that are important to know about if writing recipes

Most AutoPkg recipes to date follow roughly this pattern:

  1. Check some URL to determine what to download
  2. Download it if not already cached
  3. Optionally process the downloaded file
  4. At some point by now, mark as being the end of the "check" phase
  5. Import the result into a repository or build a package

The processors used to perform some of these tasks use several common variable names, listed below:

Name Description
url The URLDownloader processor will use this for the URL to download. Any custom processor that provides a download URL should use this.
download_changed URLDownloader sets this boolean to True if it determines that we do not have a previously-cached file of this download. `automunkiimport` uses this to report any new downloads for a run.
pathname URLDownloader uses this for the location of the downloaded file. You can refer to this for any post-processing steps in the recipe. You can set this as an input variable, otherwise it will be set automatically based on the tail of the URL.
pkginfo This is a "base" pkginfo dict that is used by MunkiImport and MunkiPkginfoMerger. MunkiImport will use it to copy any keys after running makepkginfo, and MunkiPkginfoMerger will use it as a base to merge to merge two pkginfo dicts.
additional_pkginfo This is what will be merged on top of the contents of `pkginfo` by MunkiPkginfoMerger. MunkiInstallsItemsCreator will set this, for example, as will some other application-specific processors to provide additional pkginfo keys such as `requires`, `minimum_os_version`, etc. Note that MunkiPkginfoMerger is the only recipe that performs something useful with this as input.

Table of Contents

Clone this wiki locally