其实,上述问题标题中可能包含以下两个子问题:
1) rpm 包结构的开发设计如何,是否会导致 repoquery -i 输出为空?
2) 如果 rpm 包结构中没有“from_repo”属性,是否会导致通过 yum list 得到“installed”?
#
#
# yum list installed|grep -i installed
Installed Packages
storcli.x86_64 007.1108.0000.0000-1 installed
#
#
#
# yum list installed|grep -i zabbix
zabbix-agent.x86_64 4.0.2-1.el7 @zabbix
#
#
#
# yum info storcli.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
Name : storcli
Arch : x86_64
Version : 007.1108.0000.0000
Release : 1
Size : 7.1 M
Repo : installed
Summary : Storage Command Line Tool.
URL : http://www.avagotech.com
License : AVAGO Technologies
Description : storcli is used to manage storage controllers.
#
#
# yumdb info storcli.x86_64
Loaded plugins: fastestmirror
storcli-007.1108.0000.0000-1.x86_64
#
#
#
# repoquery -i storcli.x86_64
#
#
# repoquery -i storcli.x86_64
#
#
# yum info zabbix-agent.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
Name : zabbix-agent
Arch : x86_64
Version : 4.0.2
Release : 1.el7
Size : 1.5 M
Repo : installed
From repo : zabbix
Summary : Zabbix Agent
URL : http://www.zabbix.com/
License : GPLv2+
Description : Zabbix agent to be installed on monitored systems.
#
#
# repoquery -i zabbix-agent.x86_64
Name : zabbix-agent
Version : 4.0.2
Release : 1.el7
Architecture: x86_64
Size : 1559464
Packager : None
Group : Applications/Internet
URL : http://www.zabbix.com/
Repository : zabbix
Summary : Zabbix Agent
Source : zabbix-4.0.2-1.el7.src.rpm
Description :
Zabbix agent to be installed on monitored systems.
#
#
标记
installed
表示未使用 安装的软件包yum
。例如,如果我这样做:然后我将看到:
一些 yum 子命令仅仅使用 rpmdb 来查询...,尤其是已安装列表和信息。