Disclaimer: this doc is not finished but I wanted to write an overview of the script internal.
Everything is done in the update script.
The script ensure the following things:
- all packages must have existing packages as dependencies
- internal libraries from emacs should be excluded from the dependencies
- a package is not updated if it already has the latest version (to avoid redownloading the emacs world)
The script works as follow:
- We re-read already generated packages (to get package version)
- It reads the code source and parse it (there is no evaluation)
- It only reads packages defined with
define-public
- Then, it fetches
https://melpa.org/archive.json
and read it - Archives are then filtered
- We resolve dependencies to see if they exists
- This is done recursively
- Once it’s done, we can download all new packages from melpa to compute the hashes
- Then we write everything to ../emacs/packages/melpa.scm
- We are appending the
define-module
code + copyrights - We are appending content of ../emacs/packages/melpa-overrides at the end of the file
- We are appending the