@@ -38,6 +38,12 @@ from the matching legacy Ruby pattern where possible.
3838Local scan source: ` homebrew/core ` at ` fb0ca6682b4 ` .
3939
4040- ` 178 ` of ` 8,359 ` formulae define ` post_install ` .
41+ - ` post_install_defined ` is the only install-time Ruby execution flag exposed
42+ through the formula JSON API for bottle installs. I did not find a
43+ caskfile-only-style source download gate for other formula DSL at bottle
44+ install time; formula source downloads for API-loaded formulae are used for
45+ source builds, local patches and resources rather than post-install metadata
46+ gaps.
4147- ` 73 ` create shared directories in ` var ` , ` etc ` or ` HOMEBREW_PREFIX ` .
4248 Examples: ` glib ` , ` languagetool ` , ` mecab ` .
4349- ` 71 ` write or patch default configuration/data files.
@@ -55,8 +61,14 @@ Local scan source: `homebrew/core` at `fb0ca6682b4`.
5561
5662Local scan source: ` homebrew/cask ` at ` 4ed4e04eaa5 ` .
5763
58- - ` 204 ` of ` 7,646 ` casks currently require the Ruby source at install time:
59- ` 181 ` because of flight blocks and ` 23 ` because of language blocks only.
64+ - ` 204 ` of ` 7,646 ` casks currently require the Ruby source at install time
65+ through ` Cask#caskfile_only? ` : ` 181 ` because of legacy ` *flight ` blocks and
66+ ` 23 ` because of language blocks only. ` 27 ` casks have language blocks in
67+ total, so ` 4 ` have both language blocks and legacy ` *flight ` blocks.
68+ - I did not find other current cask install-time Ruby source download gates.
69+ Ordinary artifacts, uninstall/zap directives, caveats, dependencies and
70+ ` on_* ` variations are serialised through API data. ` *_steps ` artifacts are
71+ also serialised and should not make ` caskfile_only? ` true.
6072- ` 78 ` flight blocks create directories, touch files or write small files.
6173 Examples: ` 86box ` , ` autogram ` , ` dante-via ` .
6274- ` 27 ` move, copy or symlink files during install or uninstall.
@@ -68,6 +80,23 @@ Local scan source: `homebrew/cask` at `4ed4e04eaa5`.
6880- ` 27 ` casks use language blocks. Large examples include ` firefox ` ,
6981 ` libreoffice-language-pack ` and ` thunderbird ` .
7082
83+ ## API Source Download Gates
84+
85+ Formula JSON API installs need to preserve ` post_install ` because it is the
86+ only install-time Ruby hook recorded for bottle installs. The hook runs from
87+ the formula stored in the installed keg, while source builds and local patch
88+ handling use ` Homebrew::API::Formula.source_download_formula ` for build-time
89+ reasons outside this post-install DSL work.
90+
91+ Cask JSON API installs use ` Homebrew::API::Cask.source_download_cask ` when
92+ ` Cask#caskfile_only? ` is true. Today that is true when a cask has any legacy
93+ ` preflight ` , ` postflight ` , ` uninstall_preflight ` or ` uninstall_postflight `
94+ block, or when it has language blocks. Legacy flight blocks need the source
95+ because API data only records that a block exists, not the Ruby body. Language
96+ blocks need the source because the API stores available language codes, but not
97+ the selected block return value or stanza effects; language-specific URLs must
98+ be resolved before the download can be enqueued.
99+
71100## Install Step Examples
72101
73102- ` languagetool ` : ` post_install_steps { mkdir "log/languagetool", base: :var } ` .
@@ -113,12 +142,12 @@ Local scan source: `homebrew/cask` at `4ed4e04eaa5`.
113142 paths to ` prefix ` ; expose the ordered array through ` FormulaStruct ` ; make
114143 ` post_install_steps ` take precedence over ` post_install ` ; document that the
115144 two forms must not be mixed.
116- - [ ] PR 3, cask flight steps.
145+ - [x ] PR 3, cask flight steps.
117146 Commit: ` Add cask install steps ` .
118147 Scope: cask artifacts for ` preflight_steps ` , ` postflight_steps ` ,
119148 ` uninstall_preflight_steps ` and ` uninstall_postflight_steps ` , cask API
120149 serialisation through artifact data, installer casts, cask cookbook docs,
121- cask fixture/API loader coverage and cask-specific autocorrection .
150+ cask fixture/API loader coverage.
122151 Estimated existing casks affected: ` 181 ` casks currently use flight blocks.
123152 The first useful conversion surface is roughly ` 78 ` casks that create/touch
124153 files or directories and the supported subset of ` 27 ` casks that move or
@@ -127,7 +156,9 @@ Local scan source: `homebrew/cask` at `4ed4e04eaa5`.
127156 Notes for implementation: default all relative cask paths to ` staged_path ` ;
128157 keep steps as normal cask artifacts so API loader round-trips work; make
129158 steps remove/override the matching Ruby flight artifact with a warning; keep
130- ` uninstall: true ` symlink cleanup available for install-phase steps.
159+ ` uninstall: true ` symlink cleanup available for install-phase steps. Keep
160+ the tap-wide autocorrect audit in a follow-up commit so the implementation
161+ can land before converted casks.
131162- [ ] PR 4, desktop and cache rebuild actions.
132163 Estimated existing formulae/casks affected: about ` 35 ` formulae run rebuild
133164 tools such as ` glib-compile-schemas ` , ` gtk*-update-icon-cache ` ,
0 commit comments