Bug 421961

Summary: Traceback from yum-priorities when using non-CLI based frontends
Product: [Fedora] Fedora Reporter: Zdenek Kabelac <zkabelac>
Component: yum-utilsAssignee: Seth Vidal <skvidal>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: ben.engbers, biggles58, chrisbullas, dacdsdep, daniel.clarke.42, danieldk, debabrata.deb, dietmar-s, fedora-bugs, gc1111, geek, geert, gilbrice, guy.leaver, hcgp, james.antill, jeff, josemgil78, jukka.ahlgren, ketahazure, linuxproblemer, mask, max, michael_d_duvall, nicolae, oldmantrafford, olof.tangrot, pete6150, pfuhrer, pmatilai, postmaster, pravat.borisut, red.hell, roger, sam.fortson, stefanescuradu, stefan, talpa_sai, tim.lauridsen, varma.santhosh, xristian_believer, yesno, yuerlong, zazo5100
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.1.9-2.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-28 17:15:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zdenek Kabelac 2007-12-12 16:57:16 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:

Starting pirut (after the latest greatest update when halve of Fedora basicaly
got broken) gives me this - 

Component: pirut
Summary: TBaa979ac4 priorities.py:88:exclude_hook:AttributeError: 'NoneType'
object has no attribute 'samearch'

Traceback (most recent call last):
  File "/usr/sbin/pirut", line 483, in <module>
    main()
  File "/usr/sbin/pirut", line 479, in main
    pm.run()
  File "/usr/sbin/pirut", line 407, in run
    self.doRefresh()
  File "/usr/sbin/pirut", line 423, in doRefresh
    self.doRefreshRepos(self._onlyrepo)
  File "/usr/lib/python2.5/site-packages/pirut/__init__.py", line 339, in
doRefreshRepos
    self.reposSetup(pbar, thisrepo)
  File "/usr/lib/python2.5/site-packages/pirut/__init__.py", line 303, in reposSetup
    self.doTsSetup()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 72, in doTsSetup
    return self._getTs()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 85, in _getTs
    self._getTsInfo()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 91, in _getTsInfo
    self._tsInfo.setDatabases(self.rpmdb, self.pkgSack)
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 529, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 396, in _getSacks
    self.plugins.run('exclude')
  File "/usr/lib/python2.5/site-packages/yum/plugins.py", line 169, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/priorities.py", line 88, in exclude_hook
    if opts.samearch:
AttributeError: 'NoneType' object has no attribute 'samearch'

Local variables in innermost frame:
conduit: <yum.plugins.MainPluginConduit instance at 0x1169a70>
commands: None
opts: None





Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:

100% working installation tool all the time ??

Additional info:

Comment 1 Seth Vidal 2007-12-12 18:18:09 UTC
Adding daniel so he knows what's going on with this plugin.

Comment 2 Seth Vidal 2007-12-12 18:22:12 UTC
proposed patch:
diff --git a/plugins/priorities/priorities.py b/plugins/priorities/priorities.py
index fd33591..2d6ca5a 100644
--- a/plugins/priorities/priorities.py
+++ b/plugins/priorities/priorities.py
@@ -82,10 +82,11 @@ def config_hook(conduit):
 
 def exclude_hook(conduit):
     global only_samearch
+    only_samearch = False
 
     # Check whether the user specified the --samearch option.
     opts, commands = conduit.getCmdLine()
-    if opts.samearch:
+    if opts and opts.samearch:
         only_samearch = True
 
     cnt = 0


Comment 3 Daniel de Kok 2007-12-12 19:07:15 UTC
The second change seems ok to me, we have that in CentOS 5.1, but I forgot to
open a bug report for that in the yum bugzilla (sorry!).

Wrt. to the first change: only_samearch is potentially set before through a
confBool in the config_hook.

Comment 4 Seth Vidal 2007-12-17 14:57:54 UTC
okay - I applied the second patch, not the first.

closing as upstream

Comment 5 Jeremy Katz 2007-12-26 18:52:03 UTC
*** Bug 426491 has been marked as a duplicate of this bug. ***

Comment 6 Jeremy Katz 2007-12-26 18:52:29 UTC
*** Bug 426709 has been marked as a duplicate of this bug. ***

Comment 7 Jeremy Katz 2007-12-26 18:52:57 UTC
*** Bug 292561 has been marked as a duplicate of this bug. ***

Comment 8 Jeremy Katz 2007-12-26 18:53:17 UTC
*** Bug 426716 has been marked as a duplicate of this bug. ***

Comment 9 Jeremy Katz 2007-12-26 18:53:34 UTC
*** Bug 426725 has been marked as a duplicate of this bug. ***

Comment 10 Jeremy Katz 2007-12-26 18:53:49 UTC
*** Bug 426726 has been marked as a duplicate of this bug. ***

Comment 11 Jeremy Katz 2007-12-26 18:54:03 UTC
*** Bug 426734 has been marked as a duplicate of this bug. ***

Comment 12 Jeremy Katz 2007-12-26 18:55:13 UTC
*** Bug 426787 has been marked as a duplicate of this bug. ***

Comment 13 Jeremy Katz 2007-12-26 18:59:54 UTC
For those hitting this, I've put the fixed file up at
http://katzj.fedorapeople.org/priorities.py.  You can download this and copy it
to /usr/lib/yum-plugins/priorities.py and it should fix things.

Comment 14 Jeremy Katz 2007-12-26 19:21:15 UTC
*** Bug 426811 has been marked as a duplicate of this bug. ***

Comment 15 Jeremy Katz 2007-12-27 01:06:35 UTC
*** Bug 426815 has been marked as a duplicate of this bug. ***

Comment 16 Jeremy Katz 2007-12-27 01:06:47 UTC
*** Bug 426819 has been marked as a duplicate of this bug. ***

Comment 17 Jeremy Katz 2007-12-27 01:07:03 UTC
*** Bug 426821 has been marked as a duplicate of this bug. ***

Comment 18 Jeremy Katz 2007-12-27 01:07:09 UTC
*** Bug 426824 has been marked as a duplicate of this bug. ***

Comment 19 Jeremy Katz 2007-12-27 01:07:30 UTC
*** Bug 426826 has been marked as a duplicate of this bug. ***

Comment 20 Jeremy Katz 2007-12-27 14:16:20 UTC
*** Bug 365421 has been marked as a duplicate of this bug. ***

Comment 21 Jeremy Katz 2007-12-27 15:11:43 UTC
*** Bug 426856 has been marked as a duplicate of this bug. ***

Comment 22 Jeremy Katz 2007-12-27 19:57:45 UTC
*** Bug 426870 has been marked as a duplicate of this bug. ***

Comment 23 Jeremy Katz 2007-12-28 13:46:52 UTC
*** Bug 426843 has been marked as a duplicate of this bug. ***

Comment 24 Jeremy Katz 2007-12-28 13:46:58 UTC
*** Bug 426900 has been marked as a duplicate of this bug. ***

Comment 25 Jeremy Katz 2007-12-28 13:47:08 UTC
*** Bug 426921 has been marked as a duplicate of this bug. ***

Comment 26 Jeremy Katz 2007-12-28 13:48:15 UTC
*** Bug 426693 has been marked as a duplicate of this bug. ***

Comment 27 Need Real Name 2007-12-28 13:54:30 UTC
Given the clearly widespread nature of the bug, can we assume that an updated
rpm will soon be available in fedora updates?

thanks

Comment 28 James Antill 2007-12-28 14:07:56 UTC
 See: https://admin.fedoraproject.org/updates/yum-utils ... I've requested they
go straight to stable, so as soon as they are approved it'll fix itself.
 Jeremy was also talking about doing pirut/pup update, as that's where people
think the problem is.


Comment 29 David Ward 2007-12-28 15:56:12 UTC
Is there a ETA for the rpm fix mentioned for this?  Also, since this kills the
graphical Software Updater, I assume people would have to "yum update yum-utils"
on the command line when the fix is ready?  Last, why is the priority/severity
"low" when it seems like a pretty major breakage?  (Just trying to understand.)
 Thanks.



Comment 30 Jeremy Katz 2007-12-28 17:03:28 UTC
*** Bug 426936 has been marked as a duplicate of this bug. ***

Comment 31 Fedora Update System 2007-12-28 17:14:58 UTC
yum-utils-1.1.9-2.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 32 Fedora Update System 2007-12-28 17:18:18 UTC
yum-utils-1.1.9-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 33 Jeremy Katz 2007-12-28 17:59:33 UTC
*** Bug 426940 has been marked as a duplicate of this bug. ***

Comment 34 David Ward 2007-12-28 20:19:42 UTC
Success on FC8!  Thank you.  :)

Comment 35 Jeremy Katz 2007-12-29 14:50:54 UTC
*** Bug 426981 has been marked as a duplicate of this bug. ***

Comment 36 Jeremy Katz 2007-12-29 14:51:12 UTC
*** Bug 426982 has been marked as a duplicate of this bug. ***

Comment 37 Jeremy Katz 2007-12-29 22:35:18 UTC
*** Bug 427002 has been marked as a duplicate of this bug. ***

Comment 38 Jeremy Katz 2007-12-29 23:51:02 UTC
*** Bug 427008 has been marked as a duplicate of this bug. ***

Comment 39 Jeremy Katz 2007-12-30 04:08:49 UTC
*** Bug 412281 has been marked as a duplicate of this bug. ***

Comment 40 XmaskX 2007-12-30 12:47:24 UTC
bug fixed with patch of comment #13

Comment 41 Jeremy Katz 2007-12-30 18:47:26 UTC
*** Bug 427045 has been marked as a duplicate of this bug. ***

Comment 42 Jeremy Katz 2007-12-31 14:44:31 UTC
*** Bug 294131 has been marked as a duplicate of this bug. ***

Comment 43 Jeremy Katz 2007-12-31 14:44:50 UTC
*** Bug 427094 has been marked as a duplicate of this bug. ***

Comment 44 Jeremy Katz 2007-12-31 14:45:20 UTC
*** Bug 427095 has been marked as a duplicate of this bug. ***

Comment 45 Jeremy Katz 2008-01-01 15:22:00 UTC
*** Bug 427125 has been marked as a duplicate of this bug. ***

Comment 46 Jeremy Katz 2008-01-01 15:23:15 UTC
*** Bug 426894 has been marked as a duplicate of this bug. ***

Comment 47 Jon Stanley 2008-01-02 01:12:44 UTC
*** Bug 427179 has been marked as a duplicate of this bug. ***

Comment 48 Jeremy Katz 2008-01-02 14:26:08 UTC
*** Bug 427188 has been marked as a duplicate of this bug. ***

Comment 49 Jeremy Katz 2008-01-02 22:02:20 UTC
*** Bug 427305 has been marked as a duplicate of this bug. ***

Comment 50 Fedora Update System 2008-01-07 01:16:25 UTC
yum-utils-1.1.10-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-utils'

Comment 51 Fedora Update System 2008-01-07 01:21:03 UTC
yum-utils-1.1.10-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-utils'

Comment 52 James Antill 2008-01-10 14:17:22 UTC
*** Bug 428240 has been marked as a duplicate of this bug. ***

Comment 53 Fedora Update System 2008-01-15 22:53:29 UTC
yum-utils-1.1.10-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 54 Fedora Update System 2008-01-15 23:12:32 UTC
yum-utils-1.1.10-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 55 Jeremy Katz 2008-01-19 19:45:33 UTC
*** Bug 429409 has been marked as a duplicate of this bug. ***

Comment 56 Jeremy Katz 2008-01-20 21:19:19 UTC
*** Bug 429470 has been marked as a duplicate of this bug. ***

Comment 57 Jeremy Katz 2008-01-29 03:38:24 UTC
*** Bug 430332 has been marked as a duplicate of this bug. ***

Comment 58 Jeremy Katz 2008-01-29 03:47:02 UTC
*** Bug 430443 has been marked as a duplicate of this bug. ***

Comment 59 Jeremy Katz 2008-02-07 14:40:25 UTC
*** Bug 431853 has been marked as a duplicate of this bug. ***

Comment 60 Jeremy Katz 2008-02-08 22:45:56 UTC
*** Bug 432072 has been marked as a duplicate of this bug. ***