Fromager's documentation does not explain well how package hooks should deal with sources. In downstream we have some plugins that do not follow the best practices, because the developers were not aware of the hidden rules.
- only
download_source and prepare_source shall retrieve the primary sources of a dependency (download, git clone, ...)
- only
prepare_source shall be used to fetch additional sources (git clone or download dependencies)
- a custom
prepare_source should use sources.default_prepare_source() if possible. If is_new is False, a custom hook shall not modify the source tree
- all sources shall bundled in the sdist. Additional dependency shall not get stored outside
source_root_dir.
- sdists should be variant-agnostic if possible. Variant-specific changes should be avoided unless they are absolutely necessary.
The rules ensure that sdists are self-contained and enable hermetically sealed build sequence jobs. The bootstrap phase downloads, prepares, and stashes all sdists. The build phase can use the stashed sdists and does not need any internet connection.
Fromager's documentation does not explain well how package hooks should deal with sources. In downstream we have some plugins that do not follow the best practices, because the developers were not aware of the hidden rules.
download_sourceandprepare_sourceshall retrieve the primary sources of a dependency (download, git clone, ...)prepare_sourceshall be used to fetch additional sources (git clone or download dependencies)prepare_sourceshould usesources.default_prepare_source()if possible. Ifis_new is False, a custom hook shall not modify the source treesource_root_dir.The rules ensure that sdists are self-contained and enable hermetically sealed build sequence jobs. The bootstrap phase downloads, prepares, and stashes all sdists. The build phase can use the stashed sdists and does not need any internet connection.