Difference between revisions of "Yum-plugin-priorities"
Line 50: | Line 50: | ||
} | } | ||
− | == | + | === Usage === |
− | + | #* if you install any contribs or non-sme packages using any form of ''--enablerepo=<xxx>'', update with ''yum --enablerepo=* update'' (or separate --enablerepo=<xxx> arguments for every repo you've ever included using ''--enablerepo='') to make sure you get any available updates for your extra packages | |
− | + | #* If you get a 'missing dependancy error' from yum, | |
− | + | #** re-run yum manually using "--exclude <pkgname>" on the command line, replacing <pkgname> with the package that is preventing your update | |
− | + | #** If you suspect that the blocked update resolves a security issue, you must decide for yourself whether to compromise the original sme/centos package and force the update of the non-sme/centos package by running ''yum --noplugins --enablerepo=* update <pkgname> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | yum | ||
− | |||
− | |||
− | |||
− | yum update | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | the | ||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 00:51, 26 November 2008
yum-plugin-priorities
This page is intended to explore the possible use of yum-plugin-priorities in order to help prevent the installation of unwanted rpms from 3rd-party repositories such as dag, dries, etc.
Inspired by Bugzilla:4757
Installation
SME 7.x (Centos 4.x
yum --enablerepo=extras install yum-plugin-priorities
SME 8.x (Centos 5.x)
(untested!)
yum --enablerepo=extras install yum-priorities
Configuration
New config files
(SME 7.x): The installation of yum-plugin-priorities will create /etc/yum/pluginconf.d/priorities.conf with the following settings
[main] enabled = 1 check_obsoletes = 1
These settings tell yum to pay attention to the 'priority' setting for each repo, and to make sure the an 'obsoletes' flag in a low priority repo will not result in the removal of a package from a higher-priority repo.
Either Modify /etc/yum.conf sme 7.3
Now add priority=10 to the repos in /etc/yum.conf that are enabled by default.
cd /etc mv yum.conf yum.conf.sav sed s/enabled=1/enabled=1\\npriority=10/ /etc/yum.conf.sav > yum.conf
Or Modify /etc/yum.conf/* in sme 7.4
create priority db
#!/bin/bash for REPO in smeaddons smecontribs smedev smeextras smeos smetest smeupdates smeupdates-testing addons base centosplus contrib extras updates do db yum_repositories setprop $REPO priority 10 #set to 99 for testing when you want to remove priority done signal-event yum-modify
cp the original and add the following to the bottom of the fragment
nano -w /etc/e-smith/templates-custom/etc/yum.smerepos.d/sme-base.repo/20repositories if (exists $props{priority}) { $OUT .= "priority" . '=' . $props{priority} . "\n"; }
Usage
- if you install any contribs or non-sme packages using any form of --enablerepo=<xxx>, update with yum --enablerepo=* update (or separate --enablerepo=<xxx> arguments for every repo you've ever included using --enablerepo=) to make sure you get any available updates for your extra packages
- If you get a 'missing dependancy error' from yum,
- re-run yum manually using "--exclude <pkgname>" on the command line, replacing <pkgname> with the package that is preventing your update
- If you suspect that the blocked update resolves a security issue, you must decide for yourself whether to compromise the original sme/centos package and force the update of the non-sme/centos package by running yum --noplugins --enablerepo=* update <pkgname>