有没有办法从更新中永久排除内核?

Oct*_*pus 1 yum kernel

我正在使用 Fedora 并想知道是否有某种方法可以在运行时排除内核更新yum update,直到我特别想更新内核。

我之所以担心这一点,是因为有时需要进行大量额外的研究,为某些程序寻找补丁,并花费额外的时间重新编译它们以在新内核上工作。我特别将 VMWare 作为一个例子。

我想知道是否有某种方法yum update可以不更新内核,并且只在它执行其例程时通知我有一个可用的新内核,以便我可以决定将其推迟到更方便的时间。还是这种想法可能会导致其他问题?

cuo*_*glm 8

尝试这个:

yum --exclude=kernel\* update
Run Code Online (Sandbox Code Playgroud)

或者:

yum -x 'kernel*' update
Run Code Online (Sandbox Code Playgroud)

yum手册页:

-x, --exclude=package
        Exclude a specific package by name or glob from updates on all
        repositories. Configuration Option: exclude
Run Code Online (Sandbox Code Playgroud)

如果你想使这个持久性,添加一行exclude=kernel*/etc/yum.conf

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://b
distroverpkg=centos-release
exclude=kernel*
Run Code Online (Sandbox Code Playgroud)

当你想更新时,使用--disableexcludes选项覆盖配置yum.conf

yum --disableexcludes=main update
Run Code Online (Sandbox Code Playgroud)