Bug 595320 - Getter does not work in firstboot's Interface, modulesets show the top level screens again
Getter does not work in firstboot's Interface, modulesets show the top level ...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: firstboot (Show other bugs)
6.0
All Linux
high Severity high
: beta
: ---
Assigned To: Martin Gracik
Release Test Team
:
: 635738 (view as bug list)
Depends On:
Blocks: 585188
  Show dependency treegraph
 
Reported: 2010-05-24 07:29 EDT by Jan Pazdziora
Modified: 2013-07-04 08:50 EDT (History)
6 users (show)

See Also:
Fixed In Version: firstboot-1.110.4-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-02 16:51:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Pazdziora 2010-05-24 07:29:45 EDT
Description of problem:

While trying to find a way to implement RHN register part of firstboot, I came across a problem that ModuleSet modules did not show the screens of its modules, but started with the Welcome page again.

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

# rpm -q firstboot
firstboot-1.110.3-1.el6.i686

How reproducible:

Deterministic.

Steps to Reproduce:
1. Have firstboot on RHEL 6 (and Fedora 12).
2. Create ModuleSet module.
3. Try to hit Forward to get to it.
  
Actual results:

Once you hit the moduleset, the first module screen is shown again.

Expected results:

Forward should just walk through the screens of modules of that moduleset.

Additional info:
Comment 1 Jan Pazdziora 2010-05-24 07:30:25 EDT
If we decide to implement RHN Register part of firstboot for RHEL 6 using the ModuleSets, this bugzilla will become a Beta 2 blocker.
Comment 2 Jan Pazdziora 2010-05-24 07:31:06 EDT
The following patch seems to fix the problem and makes walking through the pages working:

--- /usr/lib/python2.6/site-packages/firstboot/interface.py.orig	2010-05-14 13:31:19.000000000 +0200
+++ /usr/lib/python2.6/site-packages/firstboot/interface.py	2010-05-24 13:22:59.157335561 +0200
@@ -34,7 +34,7 @@
         self.history = []
         self.moduleList = []
 
-class Interface:
+class Interface(object):
     def __init__(self, autoscreenshot=False, moduleList=[], testing=False):
         """Create a new Interface instance.  Instance attributes:
Comment 3 Jan Pazdziora 2010-05-24 07:31:38 EDT
However, this patch breaks that sidebar arrow.

In Fedora 12, the arrow is there just fine, even with this patch.
Comment 4 Jan Pazdziora 2010-05-24 07:33:12 EDT
Actually, the sidebar arrow brakage seems to be kinda random in RHEL 6, sometimes it works and sometimes it does not.
Comment 5 Jan Pazdziora 2010-05-24 07:35:36 EDT
Please note that if you set priority = 0 in your moduleset module, running firstboot will still fail, with

firstboot 1.110 exception report
Traceback (most recent call last):
  File "/usr/sbin/firstboot", line 199, in <module>
    config.interface.run()
  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 421, in run
    self.displayModule()
  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 337, in displayModule
    currentModule.focus()
AttributeError: moduleClass instance has no attribute 'focus'
Comment 7 Jan Pazdziora 2010-05-25 07:14:02 EDT
Another bug in the firstboot code: if the number of modules in your moduleset it greater than the number of the top level modules, stepping to the moduleset shows exception window with

firstboot 1.110.3 exception report
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 105, in _nextClicked
    self.advance()
  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 158, in advance
    self.moveToPage(pageNum=self._control.currentPage+1)
  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 412, in moveToPage
    self._setPointer(self._controlStack[0].currentPage)
  File "/usr/lib/python2.6/site-packages/firstboot/interface.py", line 116, in _setPointer
    (alignment, label) = self.sidebar.get_children()[i].get_children()
IndexError: list index out of range
Comment 8 Jan Pazdziora 2010-05-25 07:15:58 EDT
The following patch is needed to fix the problem:

--- /usr/lib/python2.6/site-packages/firstboot/interface.py.orig	2010-05-14 13:31:19.000000000 +0200
+++ /usr/lib/python2.6/site-packages/firstboot/interface.py	2010-05-25 13:12:04.663294374 +0200
@@ -111,7 +111,7 @@
         # The sidebar pointer only works in terms of the top-level module list
         # as we don't display anything on the side for a ModuleSet and making
         # the pointer move around then would be confusing.
-        for i in range(len(self.moduleList)):
+        for i in range(len(self.sidebar.get_children())):
             (alignment, label) = self.sidebar.get_children()[i].get_children()
             pix = alignment.get_children()[0]
 

In short, the self.moduleList now (correctly, with the patch from comment 2) points to the list of modules in the moduleset, not to the list of top level modules.

That's why we will just loop over the sidebar children because that's what we essentially care about anyway.
Comment 10 Martin Gracik 2010-05-25 13:21:53 EDT
Fixed in version firstboot-1.110.4-1
Comment 15 releng-rhel@redhat.com 2010-07-02 16:51:11 EDT
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.
Comment 16 Adrian Likins 2010-09-21 10:02:19 EDT
*** Bug 635738 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.