This patch should fix the case of people calling doPluginSetup() etc.
with a non-list argument ... the big problem being calling like:

  self.doPluginSetup(types=(yum.plugins.TYPE_CORE))

...which actually silently does all types, due to the missing comma,
see:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=199863


...I've done the patch against yum because this'll prevent future
problems, and I have a git repo. on hand for yum ;).


 I've attached it and it can be merged from:

git pull http://people.redhat.com/jantill/gits/yum plugin-types-check


-- 
James Antill <[EMAIL PROTECTED]>
diff --git a/yum/plugins.py b/yum/plugins.py
index a216599..3269525 100644
--- a/yum/plugins.py
+++ b/yum/plugins.py
@@ -129,8 +129,10 @@ class YumPlugins:
         self.cmdline = (None, None)
         self.verbose_logger = logging.getLogger("yum.verbose.YumPlugins")
         self.disabledPlugins = disabled
-        if not types:
+        if types is None:
             types = ALL_TYPES
+        if not isinstance(types, (list, tuple)):
+            types = (types,)
 
         if id(TYPE_INTERFACE) in [id(t) for t in types]:
             self.verbose_logger.log(logginglevels.INFO_2,

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to