[yum-commits] 2 commits - plugins/changelog plugins/downloadonly plugins/nofsync plugins/priorities plugins/protect-packages plugins/remove-with-leaves plugins/tmprepo yum-utils.spec

James Antill james at osuosl.org
Tue Mar 31 15:39:30 UTC 2009


 plugins/changelog/changelog.py                   |    2 ++
 plugins/downloadonly/downloadonly.py             |    3 +++
 plugins/nofsync/nofsync.py                       |    2 ++
 plugins/priorities/priorities.py                 |    2 ++
 plugins/protect-packages/protect-packages.py     |    2 ++
 plugins/remove-with-leaves/remove-with-leaves.py |    3 +++
 plugins/tmprepo/tmprepo.py                       |    3 +++
 yum-utils.spec                                   |   18 ------------------
 8 files changed, 17 insertions(+), 18 deletions(-)

New commits:
commit 6d7879b844f6c9557f8a6260ab27d4a1af56e3ff
Author: James Antill <james at and.org>
Date:   Tue Mar 31 11:39:20 2009 -0400

    Use plugin_option_group if available, on the easy cases

diff --git a/plugins/changelog/changelog.py b/plugins/changelog/changelog.py
index fd28f95..1e58b8c 100644
--- a/plugins/changelog/changelog.py
+++ b/plugins/changelog/changelog.py
@@ -246,6 +246,8 @@ def config_hook(conduit):
             updateinfo = True
         if changelog and (not also_updateinfo or updateinfo):
             return
+        if hasattr(parser, 'plugin_option_group'):
+            parser = parser.plugin_option_group
         parser.add_option('--changelog', action='store_true', 
                       help='Show changelog delta of updated packages')
 
diff --git a/plugins/downloadonly/downloadonly.py b/plugins/downloadonly/downloadonly.py
index b3348d6..8486bb0 100644
--- a/plugins/downloadonly/downloadonly.py
+++ b/plugins/downloadonly/downloadonly.py
@@ -23,6 +23,9 @@ plugin_type = (TYPE_INTERACTIVE,)
 
 def config_hook(conduit):
     parser = conduit.getOptParser()
+    if hasattr(parser, 'plugin_option_group'):
+        parser = parser.plugin_option_group
+
     parser.add_option('', '--downloadonly', dest='dlonly', action='store_true',
            default=False, help="don't update, just download")
     parser.add_option('', '--downloaddir', dest='dldir',
diff --git a/plugins/nofsync/nofsync.py b/plugins/nofsync/nofsync.py
index 6018eae..5a9d460 100644
--- a/plugins/nofsync/nofsync.py
+++ b/plugins/nofsync/nofsync.py
@@ -21,6 +21,8 @@ plugin_type = (TYPE_INTERACTIVE,)
 def init_hook(conduit):
     parser = conduit.getOptParser()
     if parser:
+        if hasattr(parser, 'plugin_option_group'):
+            parser = parser.plugin_option_group
         parser.add_option('--nofsync', dest='nofsync',
                default=False, action='store_true',
                help='Disable database syncing during transaction (DANGEROUS)')
diff --git a/plugins/priorities/priorities.py b/plugins/priorities/priorities.py
index 1e45f04..8dae1df 100644
--- a/plugins/priorities/priorities.py
+++ b/plugins/priorities/priorities.py
@@ -76,6 +76,8 @@ def config_hook(conduit):
     # Command-line options.
     parser = conduit.getOptParser()
     if parser:
+        if hasattr(parser, 'plugin_option_group'):
+            parser = parser.plugin_option_group
         parser.add_option('', '--samearch-priorities', dest='samearch',
             action='store_true', default = False,
             help="Priority-exclude packages based on name + arch")
diff --git a/plugins/protect-packages/protect-packages.py b/plugins/protect-packages/protect-packages.py
index f98c290..4cf50a2 100644
--- a/plugins/protect-packages/protect-packages.py
+++ b/plugins/protect-packages/protect-packages.py
@@ -44,6 +44,8 @@ plugin_type = (TYPE_CORE, TYPE_INTERACTIVE)
 
 def config_hook(conduit):
     parser = conduit.getOptParser()
+    if hasattr(parser, 'plugin_option_group'):
+        parser = parser.plugin_option_group
     parser.add_option("", "--override-protection", dest='override', 
                       action="append", default=[], metavar='[package]',
                       help="remove package from the list of protected packages")
diff --git a/plugins/remove-with-leaves/remove-with-leaves.py b/plugins/remove-with-leaves/remove-with-leaves.py
index 3b26914..f4e3d03 100644
--- a/plugins/remove-with-leaves/remove-with-leaves.py
+++ b/plugins/remove-with-leaves/remove-with-leaves.py
@@ -111,6 +111,9 @@ def config_hook(conduit):
     remove_always = conduit.confBool('main', 'remove_always', default=False)
     parser = conduit.getOptParser()
     if parser:
+        if hasattr(parser, 'plugin_option_group'):
+            parser = parser.plugin_option_group
+
         parser.add_option("", "--leaves-exclude-bin", dest="exclude_bin",
                 action="store_true", default=False, 
                 help="do not remove leaf packages which contain executable binaries")
diff --git a/plugins/tmprepo/tmprepo.py b/plugins/tmprepo/tmprepo.py
index fd38eed..5d081c2 100644
--- a/plugins/tmprepo/tmprepo.py
+++ b/plugins/tmprepo/tmprepo.py
@@ -173,6 +173,9 @@ def config_hook(conduit):
     if not parser:
         return
 
+    if hasattr(parser, 'plugin_option_group'):
+        parser = parser.plugin_option_group
+
     parser.values.tmp_repos = []
     parser.add_option("--tmprepo", action='append',
                       type='string', dest='tmp_repos', default=[],
commit e12f0e33583cb0a5149bf3f947ed2e836e3032a7
Author: James Antill <james at and.org>
Date:   Tue Mar 31 11:39:01 2009 -0400

    Remove allow-downgrade, as it's in core now

diff --git a/yum-utils.spec b/yum-utils.spec
index 15f3ed7..b2b126d 100644
--- a/yum-utils.spec
+++ b/yum-utils.spec
@@ -107,18 +107,6 @@ Requires: yum >= 3.0
 This plugin adds a --downloadonly flag to yum so that yum will only download
 the packages and not install/update them.
 
-%package -n yum-plugin-allowdowngrade
-Summary: Yum plugin to enable manual downgrading of packages
-Group: System Environment/Base
-Provides: yum-allowdowngrade = %{version}-%{release}
-Obsoletes: yum-allowdowngrade < 1.1.20-0
-Conflicts: yum-allowdowngrade < 1.1.20-0
-Requires: yum >= 3.0
-
-%description -n yum-plugin-allowdowngrade
-This plugin adds a --allow-downgrade flag to yum to make it possible to
-manually downgrade packages to specific versions.
-
 %package -n yum-plugin-priorities
 Summary: plugin to give priorities to packages from different repos
 Group: System Environment/Base
@@ -371,7 +359,6 @@ plugins="\
  versionlock \
  tsflags \
  downloadonly \
- allowdowngrade \
  priorities \
  refresh-updatesd \
  merge-conf \
@@ -492,11 +479,6 @@ fi
 %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/downloadonly.conf
 /usr/lib/yum-plugins/downloadonly.*
 
-%files -n yum-plugin-allowdowngrade
-%defattr(-, root, root)
-%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/allowdowngrade.conf
-/usr/lib/yum-plugins/allowdowngrade.*
-
 %files -n yum-plugin-priorities
 %defattr(-, root, root)
 %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/priorities.conf


More information about the Yum-commits mailing list