brew
brew copied to clipboard
casks using: :svn to depend on svn
Provide a detailed description of the proposed feature
A lot of cask-fonts are using svn
to download artifacts, but fail to download on a fresh system. It would be nice if svn
will be automatically installed if url is using: :svn
.
What is the motivation for the feature?
Less manual steps and font download errors.
How will the feature be relevant to at least 90% of Homebrew users?
Anyone who tries to install on a fresh system wouldn't need to install svn
manually.
What alternatives to the feature have been considered?
Explicitly add svn
dependency to those casks.
As I understand, this issue was introduced when Xcode CLT stopped shipping svn
binary.
Yes, this seems reasonable. Are there any other using:
that auto-install dependencies?
I'm unsure, I didn't see this before.
Hi! I would like to take a look at this.
If I understand this correctly: New code will probably go here: https://github.com/Homebrew/brew/blob/master/Library/Homebrew/cask/artifact/font.rb
And this property needs to be parsed: https://github.com/Homebrew/brew/blob/1909d89d003bdf1f34775faf81b8c0529729013f/Library/Homebrew/cask/artifact/relocated.rb#L51
is this halfway correct?
@Git-Jiro don't think it's going to be font-specific logic. @Homebrew/cask folks can provide more help here, feel free to open a PR that's a bit broken and we'll do what we can to help β€οΈ
Note that installing svn
happens once ever per machine. It is at worse a minor inconvenience which might not be worth it if it significantly complicates the code.
Alternatives:
- Relinquish the fonts repo to a third-party. (Not because of this; the matter has been considered before)
- Remove the SVN dependency in favour of newer git commands.
Note that for formulae relying on SVN, brew already acknowledges that SVN is a dependency on systems where it isn't installed:
1015-Catalina ~ % brew deps --tree --include-build acme
acme
βββ subversion
βββ openjdk
β βββ autoconf
β βββ m4
βββ pkg-config
βββ [email protected]
...
The trick is getting brew to install SVN in those cases before attempting to download anything else.
1015-Catalina ~ % brew install -s acme
==> Cloning https://svn.code.sf.net/p/acme-crossass/code-0/trunk
==> Checking out 266
You must: brew install svn
Error: acme: Failed to download resource "acme"
Failure while executing; `svn checkout https://svn.code.sf.net/p/acme-crossass/code-0/trunk /Users/serveradmin/Library/Caches/Homebrew/acme--svn --quiet -r 266` exited with 1. Here's the output:
You must: brew install svn
While messing around with font casks in an experiment, I installed subversion to validate that my experiment's changed didn't break svn fonts. Searching around to check history of my experiment led me to this ticket.
I noted that I had no other reason to have svn installed. Upon installation, it newly installed several dependencies outside of my standard config for Linuxbrew. brew deps --tree subversion
was surprising to me. I know some are very common but I'm curious if requiring subversion creates some extra package upgrade burden that would be nice to avoid for folks who otherwise don't need svn or its less-widely installed dependencies.
I know some are very common but I'm curious if requiring subversion creates some extra package upgrade burden that would be nice to avoid for folks who otherwise don't need svn or its less-widely installed dependencies.
There's always a way to do it manually. Just svn checkout
then tar -czf
then brew edit
and replace these resources with your local copy - a file://
URL.
I have a related issue though. brew
now requires the newest svn
for those resources even though an older svn
works fine⦠In my case I'm running High Sierra so the latest bottled svn is [email protected]
, and building SVN builds some really heavy duty stuff beforehand, AND if I were to upgrade svn sometime later I'd need to upgrade those build dependencies again(!)
Think I need an environment variable that bypasses the svn dependency check and just use whatever svn it found in /usr/local/bin/
Think I need an environment variable that bypasses the svn dependency check and just use whatever svn it found in /usr/local/bin/
No, sorry, we don't wish to adjust behaviour in this way for versions we no longer support (e.g. High Sierra)
The built-in svn
on older macOS versions can't be relied upon because it's now unable to connect to some repositories, which is why Homebrew pre-installs it when needed. A PR to allow the formula to install on older versions is being discussed at Homebrew/homebrew-core#99023.
Are there any other using: that auto-install dependencies?
I think it's mercurial
, curl
, and svn
judging from:
https://github.com/Homebrew/homebrew-test-bot/blob/6e5b9dbd11338e55995293df9852ece37123af3d/lib/test_formulae.rb#L40-L59
It looks like this could probably be handled with git sparse-checkout
instead of svn
now that https://github.com/Homebrew/brew/pull/14035 got merged in.
An extra only_path:
option must be passed with the git
url to specify the sparse checkout.
It looks like this could probably be handled with
git sparse-checkout
instead ofsvn
now that #14035 got merged in.An extra
only_path:
option must be passed with thegit
url to specify the sparse checkout.
Yes, this would be ideal solution ππ». CC @hmarr for thoughts or if you're working on this already.
Thanks for the ping @MikeMcQuaid. I just moved the remaining fonts over to git in https://github.com/Homebrew/homebrew-cask-fonts/pull/6725
Thanks for finishing this off @hmarr!