-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
GitDownloadStrategy: Control submodule clones #17783
Comments
It will have to be done by writing code, I'm afraid. Checkout the existing download strategies for examples of how we use inheritance in them. Line 386 is where we do submodule things, will probably need to add some member flag that is checked as well. |
I'll take a crack at this, looks like a good opportunity to clean up the methods in this class. |
Thanks, Jack! I am so busy this quarter, it would take me weeks to get this
|
Patches to Homebrew: https://github.com/jacknagel/homebrew/compare/git formula-side changes: class GitNoSubmoduleDownloadStrategy < GitDownloadStrategy
def submodules?; false; end
end
class SomeFormula < Formula
url '...', :using => GitNoSubmoduleDownloadStrategy
# ...
end I don't want to bother adding a flag to the DSL or anything yet. |
Merged my patches. |
Is there a way to communicate to the GitDownloadStrategy that we don't want to clone submodules? Julia's buildsystem has moved to git submodules for dependencies (e.g. openlibm, nginx, Rmath, libuv) and I'd like to manually manage those dependencies with Homebrew. E.g. since we have an
nginx
formula in Homebrew, I'd like to use that nginx instead of having Julia download/build her own.Once the
install
method of my formula is invoked, I can exercise control over Julia's build process (e.g. pass the proper flags tomake
to stop her from compiling her ownnginx
from the sources that have been downloaded) however I can't figure out how to exercise control over which submodules are downloaded. I would happily patch.gitmodules
or somesuch if that would work, however submodules are automatically downloaded before any of my code runs, including patches. Is there a way to modify this behavior in Homebrew?The text was updated successfully, but these errors were encountered: