我注意到,每次使用 yum repolist 运行很长一段时间间隔时,都会有一个额外的“刷新状态”过程...
注意:这里的“长时间间隔”是指大约几天(至少超过 3 天) ),但不是几个小时......
#
# yum repolist <<< a few days interval
Loaded plugins: security, verify
Cluster | 1.5 kB 00:00
ClusterStorage | 1.5 kB 00:00
RHEL_5.8_local | 951 B 00:00
Server | 1.5 kB 00:00
VT | 1.3 kB 00:00
repo id repo name status
Cluster Cluster_r58 32
ClusterStorage ClusterStorage_r58 39
RHEL_5.8_local RHEL_5.8_x86-64_all_local 3,414
Server Server_r58 3,285
VT VT_r58 58
repolist: 6,828
#
#
# yum repolist <<< a few hours interval
Loaded plugins: security, verify
repo id repo name status
Cluster Cluster_r58 32
ClusterStorage ClusterStorage_r58 39
RHEL_5.8_local RHEL_5.8_x86-64_all_local 3,414
Server Server_r58 3,285
VT VT_r58 58
repolist: 6,828
#
更新:
这真的很奇怪,我的 yum 存储库元数据生命周期只是默认的 3600 秒,
所以这里如何解释我的 yum 存储库元数据实际生命周期而不是默认生命周期?
# yum -v repolist
Not loading "katello" plugin, as it is disabled
Not loading "product-id" plugin, as it is disabled
Not loading "rhnplugin" plugin, as it is disabled
Loading "security" plugin
Not loading "subscription-manager" plugin, as it is disabled
Loading "verify" plugin
Config time: 0.068
Yum Version: 3.2.22
Cluster | 1.5 kB 00:00
ClusterStorage | 1.5 kB 00:00
Server | 1.5 kB 00:00
VT | 1.3 kB 00:00
Setting up Package Sacks
pkgsack time: 0.032
Repo-id : Cluster
Repo-name : Cluster_r58
Repo-updated : Fri Feb 3 02:38:19 2012
Repo-pkgs : 32
Repo-size : 83 M
Repo-baseurl : file:///mnt/Cluster/
Repo-expire : 3,600 second(s) (last: Fri May 24 18:27:23 2024)
Repo-id : ClusterStorage
Repo-name : ClusterStorage_r58
Repo-updated : Fri Feb 3 02:39:28 2012
Repo-pkgs : 39
Repo-size : 11 M
Repo-baseurl : file:///mnt/ClusterStorage/
Repo-expire : 3,600 second(s) (last: Fri May 24 18:27:23 2024)
Repo-id : RHEL_5.8_local
Repo-name : RHEL_5.8_x86-64_all_local
Repo-updated : Tue Apr 23 10:43:03 2024
Repo-pkgs : 3,414
Repo-size : 3.6 G
Repo-baseurl : file:///install/rhel_5.8_x86-64_local
Repo-expire : 3,600 second(s) (last: Fri May 24 18:20:41 2024)
Repo-id : Server
Repo-name : Server_r58
Repo-updated : Fri Feb 3 02:39:04 2012
Repo-pkgs : 3,285
Repo-size : 3.3 G
Repo-baseurl : file:///mnt/Server/
Repo-expire : 3,600 second(s) (last: Fri May 24 18:27:23 2024)
Repo-id : VT
Repo-name : VT_r58
Repo-updated : Fri Feb 3 02:38:17 2012
Repo-pkgs : 58
Repo-size : 193 M
Repo-baseurl : file:///mnt/VT/
Repo-expire : 3,600 second(s) (last: Fri May 24 18:27:23 2024)
repolist: 6,828
#
如果我在这里误解了你,我深表歉意!
yum 下载有关存储库的元数据。完成此操作后,元数据在一段时间内有效(查看 man dnf.conf 和metadata_expire),如果您在有效期内运行 repolist 那么元数据将不会再次下载,它将使用本地元数据,否则它将下载新的元数据。
您可以通过以下方式查看存储库的当前状态: