[已解决]aptitude的提示中"{a}"是什么意思?

最大的社区版本,Ubuntu的发源地
回复
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

[已解决]aptitude的提示中"{a}"是什么意思?

#1

帖子 科学之子 » 2016-08-05 7:27

aptitude的提示中"{a}"是什么意思?
出现这种不明白的提示就直接按输入"?"(不含双引号)就可以了

代码: 全选

The following NEW packages will be installed:
  firefox-esr{a} 
man aptitude

代码: 全选

-W, --show-why
           In the preview displayed before packages are installed or removed,
           show which manually installed package requires each automatically
           installed package. For instance:

               $ aptitude --show-why install mediawiki
               ...
               The following NEW packages will be installed:
                 libapache2-mod-php5{a} (for mediawiki)  mediawiki  php5{a} (for mediawiki)
                 php5-cli{a} (for mediawiki)  php5-common{a} (for mediawiki)
                 php5-mysql{a} (for mediawiki)

           When combined with -v or a non-zero value for
           Aptitude::CmdLine::Verbose, this displays the entire chain of
           dependencies that lead each package to be installed. For instance:

               $ aptitude -v --show-why install libdb4.2-dev
               The following NEW packages will be installed:
                 libdb4.2{a} (libdb4.2-dev D: libdb4.2)  libdb4.2-dev
               The following packages will be REMOVED:
                 libdb4.4-dev{a} (libdb4.2-dev C: libdb-dev P<- libdb-dev)

           This option will also describe why packages are being removed, as
           shown above. In this example, libdb4.2-dev conflicts with
           libdb-dev, which is provided by libdb-dev.

           This argument corresponds to the configuration option
           Aptitude::CmdLine::Show-Why and displays the same information that
           is computed by aptitude why and aptitude why-not.
我猜测意思是自动安装的包?
但man中并没有描述{a}后缀的含义
只是根据上下文语境猜测是"自动安装"的意思
有无更加直接的描述参考?
上次由 科学之子 在 2016-08-05 12:37,总共编辑 1 次。
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: aptitude的提示中"{a}"是什么意思?

#2

帖子 vickycq » 2016-08-05 7:59

科学之子 写了:有无更加直接的描述参考?
尚未见到更加直接的描述
http://ubuntu.5.x6.nabble.com/Aptitude- ... 72154.html
http://unix.stackexchange.com/questions ... -package3u
https://ubuntuforums.org/showthread.php?t=1626057
科学之子 写了:只是根据上下文语境猜测是"自动安装"的意思
可用 apt-mark manual, apt-mark auto 做实验确定
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

Re: aptitude的提示中"{a}"是什么意思?

#3

帖子 科学之子 » 2016-08-05 9:02

vickycq 写了:
科学之子 写了:有无更加直接的描述参考?
尚未见到更加直接的描述
http://ubuntu.5.x6.nabble.com/Aptitude- ... 72154.html
http://unix.stackexchange.com/questions ... -package3u
https://ubuntuforums.org/showthread.php?t=1626057
科学之子 写了:只是根据上下文语境猜测是"自动安装"的意思
可用 apt-mark manual, apt-mark auto 做实验确定
apt-mark好像没法检查{u}(unuse)
下载了源代码
搜到了{a}和{u}的说明
但{b}和{p}还是没搜到
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: aptitude的提示中"{a}"是什么意思?

#4

帖子 vickycq » 2016-08-05 9:29

科学之子 写了: 搜到了{a}和{u}的说明
但{b}和{p}还是没搜到
src/cmdline/cmdline_prompt.cc

代码: 全选

 "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."))));
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

Re: aptitude的提示中"{a}"是什么意思?

#5

帖子 科学之子 » 2016-08-05 12:35

vickycq 写了:
科学之子 写了: 搜到了{a}和{u}的说明
但{b}和{p}还是没搜到
src/cmdline/cmdline_prompt.cc

代码: 全选

 "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."))));
感谢回复.

原来如此简单,只要在提示时输入"?"(不含双引号)就可以获得帮助...
不知道怎么回事那个问号以前就像没看到一样
看了源代码才醒悟,原来就是调用帮助函数的作用

代码: 全选

# aptitude safe-upgrade iceweasel
Resolving dependencies...                
The following NEW packages will be installed:
  firefox-esr{a} 
The following packages will be upgraded:
  iceweasel 
1 packages upgraded, 1 newly installed, 0 to remove and 113 not upgraded.
Need to get 43.6 MB of archives. After unpacking 9,545 kB will be used.
Do you want to continue? [Y/n/?] ?
Commands:
  y: continue with the installation
  n: abort and quit
  i: show information about one or more packages; the package names should follow the 'i'
  c: show the Debian changelogs of one or more packages; the package names should follow the 'c'
  d: toggle the display of dependency information
  s: toggle the display of changes in package sizes
  v: toggle the display of version numbers
  w: try to find a reason for installing a single package, or explain why installing one package should lead to installing another package.
  e: enter the full visual interface
  
  You may also specify modification to the actions which will be taken.  To do so, type an action character followed by one or more package names (or patterns).  The action will
  be applied to all the packages that you list.  The following actions are available:
  
  '+' to install packages
  '+M' to install packages and immediately flag them as automatically installed
  '-' to remove packages
  '_' to purge packages
  '=' to place packages on hold
  ':' to keep packages in their current state without placing them on hold
  '&M' to mark packages as automatically installed
  '&m' to mark packages as manually installed
  '&BD' to install the build-dependencies of a package.
  
  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.
Do you want to continue? [Y/n/?] 
回复