[Spacewalk-list] yum-priorities with Spacewalk [SEC=UNCLASSIFIED]

Anthony Moore Anthony.Moore at bom.gov.au
Wed May 6 00:36:25 UTC 2015


If anyone is interested in using yum-plugin-priorities with Spacewalk channels, I've attached a small patch for the yum-utils RPM that implements this. Priorities can be added in /etc/yum/pluginconf.d/priorities.conf per-channel. Happy to post the RPM if desired.

Anthony Moore | Systems Administrator

ISS | ITS | Platform Services
Head Office, Level 8 North
Bureau of Meteorology
GPO Box 1289 Melbourne VIC 3001
700 Collins Street, Docklands VIC 3008
Tel: +61 3 9616 8441 | ajm at bom.gov.au

--

diff -ubBr yum-utils.orig/plugins/priorities/ChangeLog yum-utils/plugins/priorities/ChangeLog
--- yum-utils.orig/plugins/priorities/ChangeLog 2011-01-13 07:00:20.000000000 +0000
+++ yum-utils/plugins/priorities/ChangeLog      2015-04-02 04:10:55.000000000 +0000
@@ -1,3 +1,7 @@
+* Thu Apr 2 Anthony Moore <ajm at bom.gov.au> - 0.0.8
+- Add a feature to allow setting the priority of Spacewalk and Satellite
+  channels.
+
 * Thu Nov 8 Daniel de Kok <daniel at centos.org> - 0.0.7
 - Only add an option if an option parser is returned.
 
diff -ubBr yum-utils.orig/plugins/priorities/priorities.py yum-utils/plugins/priorities/priorities.py
--- yum-utils.orig/plugins/priorities/priorities.py     2011-01-13 07:00:20.000000000 +0000
+++ yum-utils/plugins/priorities/priorities.py  2015-04-02 04:32:10.000000000 +0000
@@ -98,6 +98,9 @@
 
     allrepos = conduit.getRepos().listEnabled()
 
+    for repo in allrepos:
+        repo.priority = conduit.confInt(repo.id, "priority", repo.priority)
+
     # If they haven't done anything, don't do any work
     if _all_repo_priorities_same(allrepos):
         return
diff -ubBr yum-utils.orig/plugins/priorities/README yum-utils/plugins/priorities/README
--- yum-utils.orig/plugins/priorities/README    2011-01-13 07:00:20.000000000 +0000
+++ yum-utils/plugins/priorities/README 2015-04-02 04:10:05.000000000 +0000
@@ -40,6 +40,18 @@
 priority for repositories is 99. The repositories with the lowest
 number have the highest priority.
 
+* Repositories in Spacewalk / Satellite *
+
+This feature was added by Anthony Moore <ajm at bom.gov.au>
+
+If the repository is a channel in Spacewalk or Satellite then there
+will be no .repo file in the yum.repos.d directory. In this case you
+can specify the priority in the /etc/yum/pluginconf.d/priorities.conf
+file, for example:
+
+[my-custom-channel-x86_64]
+priority = 5
+
 * Bugs *
 
 Please report errors to Daniel de Kok <daniel at centos.org>




More information about the Spacewalk-list mailing list