gpt4 book ai didi

homebrew - 使用 brew extract 安装先前版本的公式

转载 作者:行者123 更新时间:2023-12-03 14:50:29 25 4
gpt4 key购买 nike

由于problem使用 Subversion 1.13 Brew 公式,我正在安装该公式的旧版本:

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/0c3d786402ad7d9dd5eb6907e3ed3f2525a0472d/Formula/subversion.rb
这给出了警告:
Warning: Calling Installation of subversion from a GitHub commit URL is deprecated! Use 'brew extract subversion' to stable tap on GitHub instead.
建议同 this tip .
现在,我想使用 brew extract subversion 正确地做到这一点。而不是使用已弃用的提交 URL。我想在某些计算机上安装 Subversion 1.13_5,但 Subversion 1.14 是最新的公式。
我需要做这样的事情: brew extract --version 1.13.0_5 subversion <tap> .
我理解这一点的方式我应该:
  • 为我的版本化公式创建一个空存储库
  • 添加存储库作为点击并初始化它
  • 提取版本化公式
  • 提交并插入公式?

  • 我创建了一个 empty repository , 然后:
    $ brew tap rjollos/homebrew-versioned
    Cloning into '/usr/local/Homebrew/Library/Taps/rjollos/homebrew-versioned'...
    warning: You appear to have cloned an empty repository.
    Tapped (16 files, 22.2KB).
    $ brew tap-new rjollos/homebrew-versioned
    ==> Created rjollos/versioned
    /usr/local/Homebrew/Library/Taps/rjollos/homebrew-versioned
    $ brew extract --version '1.13.0_5' subversion rjollos/homebrew-versioned
    ==> Searching repository history
    Warning: Calling 'devel' blocks in formulae is deprecated! Use 'head' blocks or @-versioned formulae instead.
    Please report this issue to the homebrew/core tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
    /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/subversion.rb:16

    Warning: Calling 'devel' blocks ... (repeats about a dozen times)

    Error: subversion: undefined method `sha1' for #<SoftwareSpec:0x00007fceaf144490>
    我想我做错了几件事,但主要是我不确定为什么 brew extract不起作用。另外,有没有更好的方法来创建新的存储库并用模板文件填充它以进行新的点击?
    $ brew --version
    Homebrew 2.4.4-19-ge09802b
    Homebrew/homebrew-core (git revision 5ee797; last commit 2020-07-07)
    Homebrew/homebrew-cask (git revision 837ac; last commit 2020-07-08)

    最佳答案

    Taps 可以在没有实际 github 存储库的情况下在本地创建。这是一般示例:

    TAP=...     # <org>/<repo>, for example "my-org/homebrew-old"
    MODULE=... # name of module you want to install, e.g. "hugo"
    VERS=... # version of $MODULE you want to install, e.g., "0.80.0"
    brew tap-new $TAP
    brew extract --version $VERS $MODULE $TAP
    brew install $TAP/$MODULE@$VERS

    关于homebrew - 使用 brew extract 安装先前版本的公式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62785290/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com