如何在 apt-get install 之前接受 Steam 的许可协议?

Jos*_*ahn 11 package-management apt steam debconf

我目前正在摆弄使用 ansible 用我选择的配置/应用程序等设置我的机器......我遇到了 Steam 的绊脚石,它是许可协议。我一直在尝试使用 debconf 来预先接受它。

这是steam源中的相关文件之一:http : //bazaar.launchpad.net/~ubuntu-branches/ubuntu/utopic/steam/utopic/view/head :/ debian/preinst

我已经尝试echo steam steam/question select "I AGREE" | sudo debconf-set-selections了一大堆其他非常相似的命令,也包括尝试设置所见的许可证。

这是输出sudo debconf-show steam steam/purge: * steam/license: * steam/question: I AGREE

我尝试过的一切都导致 apt-get 认为我已经预先不同意许可协议,并且在我能够安装 Steam 之前我必须删除这些条目。有没有人有任何想法?

dra*_*788 7

如原始问题所述,您可以在尝试安装 Steam 之前简单地使用命令行设置所需的值。

echo steam steam/question select "I AGREE" | sudo debconf-set-selections
echo steam steam/license note '' | sudo debconf-set-selections
Run Code Online (Sandbox Code Playgroud)

包中可能存在错误(如果不是您的主要责任,则打包非常困难)并且更高版本现在应该可以工作并从 debconf 数据库读取预先接受的许可证。这意味着您不应收到提示。

sudo apt-get install steam
Run Code Online (Sandbox Code Playgroud)

典型的格式如下:

echo package package/key {boolean,string} {true, some string} | sudo debconf-set-selections
sudo apt-get install package
Run Code Online (Sandbox Code Playgroud)

对此有用的问答是https://unix.stackexchange.com/a/106553


小智 4

根据您的研究和您帖子评论中提供的链接,我弄清楚了这一点。截至 15.04(2015-09-24),Ubuntu 存储库中的 steam 软件包仍然是 1.0.0.48,但您需要 1.0.0.50 才能正确读取 debconf 设置。

我发现你可以从Steam 下载页面下载的 steam.deb是 1.0.0.50,所以如果你从这个文件安装,使用 debconf 设置,它应该可以工作。

我使用 saltstack,这是我的 steam 工作状态:

steam:
  debconf.set:
    - data:
        steam/question: {'type': 'select', 'value': 'I AGREE'}
        steam/license: {'type': 'note', 'value': ''}
  pkg.installed:
    - sources:
      - steam-launcher: https://steamcdn-a.akamaihd.net/client/installer/steam.deb
    - require:
      - debconf: steam
Run Code Online (Sandbox Code Playgroud)