aptitude:大括号的含义,即package1{b} package2{a} package3{u}

fin*_*een 14 aptitude debian apt

使用aptitude 时,更改的包列表有时会在某些包名称后面的大括号中包含单个字符。手册页有两个示例,但没有解释它们(版本 0.6.10-1)。

到目前为止,我已经注意到 {b}、{a} 和 {u}。前一个似乎在运行时出现aptitude install并尝试重新安装我删除的软件包(例如,通过 debfoster,我如何禁用它?),后两个似乎与自动依赖项解析有关。

这些字符是什么意思,还有其他字符吗?它们对其他操作有什么影响?该额外信息可用于dpkgapt吗?

Gra*_*eme 10

这些没有记录。我的猜测是a用于自动安装,u用于(自动?)升级以及b用于安装的软件包以修复损坏的软件包。

这意味着debfoster正在删除不应该删除的包,请注意该网站说:

As of 2006-01-01, debfoster is officially deprecated.
Run Code Online (Sandbox Code Playgroud)

多年来,这可能是由于apt系统的变化而产生的错误。您可以aptitude search '~b'在使用后确认这一点debfoster(它会列出损坏的包)。

请注意,apt现在支持依赖包的自动标志,并且具有apt-get autoremove. 有了 aptitude 你也可以做到aptitude remove '~g'

更新

玩弄 aptitude,结果发现如果我?在收到Do you want to continue? [Y/n/?]提示时按,我会收到以下消息:

In the list of actions to be performed, some packages will be followed by one or
more characters enclosed in braces; for instance: "aptitude{u}".  These
characters provide extra information about the package's state, and can include
any combination of the following:
  
  'a': the package was automatically installed or removed.
  'b': some of the package's dependencies are violated by the proposed changes.
  'p': the package will be purged in addition to being removed.
  'u': the package is being removed because it is unused.
Run Code Online (Sandbox Code Playgroud)

所以这似乎b应该是为了一个破损的包裹。虽然,在您的情况下,如果没有任何损坏,则显示它似乎是一个错误。我无法重现这个问题,但aptitude确实尝试重新安装我删除的软件包,apt-get只是没有任何东西在大括号中。

另请注意,这aptitude keep-all可能比删除更安全/var/lib/aptitude/pkgstates