Re: how to exclude package from repo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Farkas Levente wrote:
hi,
is there any way to exclude package or assign priority to repository in
kickstart file? with yum one can exclude packages from a repo or with
yum-protect or yum-priority i can assign priority among repos (in conf
file). who can i do it in a kickstart file? eg. i'd like to install
kmod-xfs from centosplus repo during kickstart, but unfortunately
centosplus repo also contains a modified kernel while i wanna use the
base kernel. so with yum i can protect or give higher priority to base
and updates and in this case kernel not updated from centos plus, but
kmod-xfs can be used. of if i can exclude=kernel* from centosplus that's
another solution. but none of the above work with kickstart.
is there any way to solve my problem?
thanks in advance.

It's true, ASFAIK, that you can't modify the yum configuration for repositories added in kickstart with the --repos option, and used for %packages. An alternative would be to create the configuration with 'here' docs in %post, and then install the package. Something like:

%post
...
cat <<XYZ >>/etc/yum.repos.d/centosplus
[centosplus]
name=CentOSplus
baseurl=http://...
exclude=kernel*
enabled=0
XYZ

yum --enable-repo=centosplus install kmod-xfs
...

-Ed


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux