gaoyifan / homebrew-bottle-mirror Goto Github PK
View Code? Open in Web Editor NEWmirror tool to sync homebrew bottle files
License: MIT License
mirror tool to sync homebrew bottle files
License: MIT License
最近可能上游修改了fomula格式,现在同步脚本不work了,tuna服务器的日志摘录如下(每个包都会打印类似的错误):
Warning: /home/homebrew/.linuxbrew/homebrew/Library/Taps/homebrew/homebrew-core/Formula/sdns.rb: something goes wrong.
Warning: /home/homebrew/.linuxbrew/homebrew/Library/Taps/homebrew/homebrew-core/Formula/iproute2mac.rb: something goes wrong.
Warning: /home/homebrew/.linuxbrew/homebrew/Library/Taps/homebrew/homebrew-core/Formula/grin.rb: something goes wrong.
Warning: /home/homebrew/.linuxbrew/homebrew/Library/Taps/homebrew/homebrew-core/Formula/bitcoin.rb: something goes wrong.
Warning: /home/homebrew/.linuxbrew/homebrew/Library/Taps/homebrew/homebrew-core/Formula/chapel.rb: something goes wrong.
Warning: /home/homebrew/.linuxbrew/homebrew/Library/Taps/homebrew/homebrew-core/Formula/dfc.rb: something goes wrong.
Warning: /home/homebrew/.linuxbrew/homebrew/Library/Taps/homebrew/homebrew-core/Formula/faiss.rb: something goes wrong.
Warning: /home/homebrew/.linuxbrew/homebrew/Library/Taps/homebrew/homebrew-core/Formula/xlearn.rb: something goes wrong.
sdns: undefined method `license' for Formulary::FormulaNamespaceba328642f7a35b88d61745bb38d1b354::Sdns:Class
["/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:36:in `rescue in load_formula'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:33:in `load_formula'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:54:in `load_formula_from_path'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:136:in `load_file'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:126:in `klass'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:122:in `get_formula'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:331:in `factory'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formula.rb:1482:in `[]'", "/home/homebrew/.linuxbrew/homebrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:101:in `block (2 levels) in <top (required)>'", "/home/homebrew/.linuxbrew/homebrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:13:in `block in initialize'"]
root_url: https://homebrew.bintray.com/bottles, filename: libre-0.6.1.catalina.bottle.tar.gz
iproute2mac: uninitialized constant Language::Python::Shebang
["/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:36:in `rescue in load_formula'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:33:in `load_formula'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:54:in `load_formula_from_path'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:136:in `load_file'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:126:in `klass'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:122:in `get_formula'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:331:in `factory'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formula.rb:1482:in `[]'", "/home/homebrew/.linuxbrew/homebrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:101:in `block (2 levels) in <top (required)>'", "/home/homebrew/.linuxbrew/homebrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:13:in `block in initialize'"]
grin: undefined method `license' for Formulary::FormulaNamespace3c461c5652df5df4fe4bedd4293baf8a::Grin:Class
["/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:36:in `rescue in load_formula'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:33:in `load_formula'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:54:in `load_formula_from_path'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:136:in `load_file'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:126:in `klass'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:122:in `get_formula'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formulary.rb:331:in `factory'", "/home/homebrew/.linuxbrew/homebrew/Library/Homebrew/formula.rb:1482:in `[]'", "/home/homebrew/.linuxbrew/homebrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:101:in `block (2 levels) in <top (required)>'", "/home/homebrew/.linuxbrew/homebrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:13:in `block in initialize'"]
bitcoin: undefined method `license' for #<Class:0x0000557e6782efe8>
不知道ustc站是否遇到。大佬有什么修改思路吗?
Related: tuna/issues#91
TL; DR: 包名是[email protected]
,上游服务器上存储的文件名是 [email protected]
,请求用的 URL 是 openssl%401.1
,保存到下游的文件名是 openssl%401.1
。
Homebrew/brew@5e91802#diff-b3c658d990062dd092574fada51d693426f29891928462e2a24379e81800671c
这导致了运行到 https://github.com/gaoyifan/homebrew-bottle-mirror/blob/master/cmd/brew-bottle-mirror.rb#L119 时执行出错:
Error: undefined method `hash_type' for #<Checksum:0x0000564df4695f58>
/root/.linuxbrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:28:in `block (2 levels) in <top (required)>'
/root/.linuxbrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:21:in `each'
/root/.linuxbrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:21:in `block in <top (required)>'
/root/.linuxbrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:8:in `each'
/root/.linuxbrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:8:in `<top (required)>'
/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/root/.linuxbrew/Library/Homebrew/utils.rb:92:in `require?'
/root/.linuxbrew/Library/Homebrew/brew.rb:126:in `<main>'
似乎把这一行删掉就行了?
Error: undefined method `version_scheme' for #<Class:0x007fc9c60c9300>
/root/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/pyenv.rb:6:in `<class:Pyenv>'
/root/.linuxbrew/Library/Taps/homebrew/homebrew-core/Formula/pyenv.rb:1:in `load_formula'
/root/.linuxbrew/Library/Homebrew/formulary.rb:25:in `module_eval'
/root/.linuxbrew/Library/Homebrew/formulary.rb:25:in `load_formula'
/root/.linuxbrew/Library/Homebrew/formulary.rb:42:in `load_formula_from_path'
/root/.linuxbrew/Library/Homebrew/formulary.rb:91:in `load_file'
/root/.linuxbrew/Library/Homebrew/formulary.rb:82:in `klass'
/root/.linuxbrew/Library/Homebrew/formulary.rb:78:in `get_formula'
/root/.linuxbrew/Library/Homebrew/formulary.rb:215:in `factory'
/root/.linuxbrew/Library/Homebrew/formula.rb:1202:in `[]'
/root/.linuxbrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:4:in `block in <top (required)>'
/root/.linuxbrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:3:in `each'
/root/.linuxbrew/Library/Taps/gaoyifan/homebrew-bottle-mirror/cmd/brew-bottle-mirror.rb:3:in `<top (required)>'
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/root/.linuxbrew/Library/Homebrew/brew.rb:22:in `require?'
/root/.linuxbrew/Library/Homebrew/brew.rb:93:in `<main>'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.