Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-29561

[RHEL-9]A gui index error in _remove_treeinfo_repositories()

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-9.5
    • CentOS Stream 9
    • anaconda
    • None
    • anaconda-34.25.5.1-1.el9
    • Normal
    • sst_installer
    • ssg_front_door
    • 12
    • False
    • Hide

      None

      Show
      None
    • No
    • CentOS Stream
    • Unspecified Release Note Type - Unknown
    • Unspecified

      Hello, I am using the Centos Stream 9 with anaconda-34.25.3.8
      Now I try to built my own Linux distribution with lorax and genisoimage try to built my own Linux distribution with lorax and genisoimage (The difference from Centos Stream is that in my iso treeinfo, I added an additional local repo of my own in addition to the AppStream),and when I entered the installation interface and clicked the Installation Source button, an index error was triggered, view the traceback in /tmp/anaconda.log as follows :

      Traceback (most recent call last):

        File "/usr/lib64/python3.9/site-packages/pyanaconda/ui/gui/spokes/installation_source.py", line 1495, in on_protocol_changed
          self._remove_treeinfo_repositories()

        File "/usr/lib64/python3.9/site-packages/pyanaconda/ui/gui/spokes/installation_source.py", line 1662, in _remove_treeinfo_repositories
          self._remove_repository(path)

        File "/usr/lib64/python3.9/site-packages/pyanaconda/ui/gui/spokes/installation_source.py", line 1794, in _remove_repository
          itr = self._repo_store[repo_model_path].iter

        File "/usr/lib/python3.9/site-packages/gi/overrides/Gtk.py", line 851, in _getitem_
          aiter = self._getiter(key)

        File "/usr/lib/python3.9/site-packages/gi/overrides/Gtk.py", line 834, in _getiter
          raise IndexError("could not find tree path '%s'" % key)

      IndexError: could not find tree path '1'

       
      The pdb debugger backtrace:
       
      Entering debugger...
      Use 'continue' command to quit the debugger and get back to the main window
      > /usr/lib/python3.9/site-packages/gi/overrides/Gtk.py(834)getiter()
      -> raise IndexError("could not find tree path '%s'" % key)
      (Pdb) bt
      /usr/lib64/python3.9/site-packages/pyanaconda/ui/gui/spokes/installation_source.py(1495)on_protocol_changed()
      -> self._remove_treeinfo_repositories()
      /usr/lib64/python3.9/site-packages/pyanaconda/ui/gui/spokes/installation_source.py(1662)_remove_treeinfo_repositories()
      -> self._remove_repository(path)
      /usr/1ib64/python3.9/site-packages/pyanaconda/ui/gui/spokesinstallation_source.py (1794)_remove_repository()
      -> itr = self._repo_store[repo_model_path].iter
      /usr/lib/python3.9/site-packages/gi/overrides/Gtk.py(851)_getitem_()
      -> aiter = self._getiter(key)
      > /usr/lib/python3.9/site-packages/gi/overrides/Gtk.py(834)_getiter()
      -> raise IndexError("could not find tree path '%s'" % key)
       
      Now I have solved the issue and made a patch,and made this pull request:
      https://github.com/rhinstaller/anaconda/pull/5520
       
      CentOS Stream 9 doesn't have this problem because only the AppStream repository in the treeinfo is added to _repo_store[].

      However, in my Linux distribution iso, in addition to AppStream, there are some other local repositories and are recorded to the iso treeinfo file. That would trigger this error when I enter the installation selection interface.

            jkonecny@redhat.com Jiri Konecny
            lwenyu0311@gmail.com Wenyu Liu
            Jiri Konecny Jiri Konecny
            Release Test Team Release Test Team
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: