Bug 615640

Summary: AttributeError: 'PreUpgradeCli' object has no attribute
Product: [Fedora] Fedora Reporter: Andrew Meredith <andrew>
Component: preupgradeAssignee: Richard Hughes <richard>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: bkelly, martin, rhughes, richard, sergio.pasra
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 18:15:24 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Andrew Meredith 2010-07-17 13:43:13 EDT
Description of problem:

The preupgrade-cli tool has a coding error that prevents it from running. It exits giving error info:

  AttributeError: 'PreUpgradeCli' object has no attribute

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

 preupgrade-1.1.5-1

How reproducible:

 Every time

Steps to Reproduce:

 1. Invoke the command line tool.

Additional info:

This problem also exists in a number of previous versions, notably Fedora 11, 10 and 9. It would be of great benefit to those maintaining remote machines and headless servers if a patched version could be back-ported to those releases.

Please see http://www.wilyness.com/blog/?p=137 for further info and a fix that I have tested across several versions as well as i386 & x86_64. (Cheers Daniel)

I note that some commentators feel that preupgrade is a noddy tool for the masses rather than "the sort of thing a proper sysadmin should use", but I totally disagree. It analysis the quickest path from here to a properly updated and patched instance of the new release, downloads everything needed to a hard drive cache and so allows the fastest possible (remote or local) reboot/upgrade/reboot cycle. This is exactly what I, as a professional Linux sysadmin need.
Comment 1 Richard Hughes 2010-09-20 07:31:40 EDT
I think the new 1.1.7 version should work for you. Can you please verify. Thanks.
Comment 2 Bug Zapper 2010-11-03 07:51:17 EDT
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 3 Boyd 2010-11-12 12:49:57 EST
I am getting this error on Fedora 13, wishing to upgrade to Fedora 14.  I have a headless system, and don't want to use the gui.

preupgrade-1.1.8-1.fc13.noarch installed.
Comment 4 Bug Zapper 2010-12-03 08:12:02 EST
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 5 Martin Dengler 2011-05-08 06:08:20 EDT
This bug still exists.  Please re-open and assign to F14 (my system, reproducible) or F15 or Rawhide, all of which have the affected version (1.1.9) according to http://pkgs.fedoraproject.org/gitweb/?p=preupgrade.git and http://git.fedorahosted.org/git/?p=preupgrade.git;a=summary, as you wish.

Attached is the patch from http://www.wilyness.com/blog/?p=137 :


diff --git a/preupgrade-cli.py b/preupgrade-cli.py
index 67683fe..580e9a0 100755
--- a/preupgrade-cli.py
+++ b/preupgrade-cli.py
@@ -44,12 +44,13 @@ from yum.misc import setup_locale
 from optparse import OptionValueError
 setup_locale(override_codecs=False)

-class PreUpgradeCli(PreUpgrade, YumUtilBase):
+class PreUpgradeCli(PreUpgrade, YumUtilBase, YumBaseCli):
     NAME = 'PreUpgrade'
     USAGE = _('usage: preupgrade [options] release')

     def __init__(self):
         PreUpgrade.__init__(self)
+        YumBaseCli.__init__(self)
         YumUtilBase.__init__(self,
                              PreUpgradeCli.NAME,
                              preupgrade_version,
Comment 6 Richard Hughes 2011-05-21 10:51:32 EDT
Applied to git master. Thanks.
Comment 7 Sergio Pascual 2011-09-06 07:10:27 EDT
Reopening, since this is still broken in F-14: preupgrade-1.1.9-1.fc14

Could you push an update to F-14?
Comment 8 Martin Dengler 2011-12-07 15:16:03 EST
Sorry, my comment was wrong but my upstream patch was right, but looks like the code from my comment #5 got committed.  I will prepare a new upstream patch.
Comment 9 Martin Dengler 2011-12-07 15:30:46 EST
I have prepared a new upstream patch at https://fedorahosted.org/preupgrade/ticket/66#comment:3
Comment 10 Martin Dengler 2012-05-26 11:53:47 EDT
upstream is still wrong.  I have tickled them at https://fedorahosted.org/preupgrade/ticket/66#comment:4
Comment 11 Fedora End Of Life 2012-08-16 18:15:27 EDT
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 12 Martin Dengler 2012-08-16 19:23:12 EDT
Please reopen and assign to rawhide.  Bug still present.