logoalt Hacker News

captn3m0today at 6:46 AM1 replyview on HN

`PreInstall` mainly. But `PreFetch/PreBuild` also for source-repositories, such as AUR helpers.

homebrew doesn't support hooks as a system package manager: https://github.com/ecosyste-ms/package-manager-hooks as an example.

I think the packaging ecosystem is varied enough that this should be left for the package managers to decide. Yarn allows dependency resolution and WebFetch overrides in its hooks for eg.


Replies

eqvinoxtoday at 8:33 AM

> `PreInstall` mainly. But `PreFetch/PreBuild` also for source-repositories, such as AUR helpers.

I don't think this is detailed enough - what exactly should the hooks be able to do? Affect dependency resolution? Choice of versions? Are they per run or per package? Is something already downloaded so it can be inspected?