Bug 709865 - .discinfo file format has changed
Summary: .discinfo file format has changed
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: 15
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-06-01 19:44 UTC by Chris Lumens
Modified: 2011-08-22 15:15 UTC (History)
5 users (show)

Fixed In Version: PackageKit-0.6.17-2.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-07-19 08:54:25 UTC
Type: ---

Attachments (Terms of Use)

Description Chris Lumens 2011-06-01 19:44:20 UTC
backends/yum/yumBackend.py assumes that .discinfo is four lines long and contains a disc number.  The disc number is gone in F15, so as a result the backend will throw out valid media because it doesn't understand the new format.  See:  http://git.fedorahosted.org/git/?p=lorax.git;a=blob;f=src/pylorax/discinfo.py;h=24f435f4d8a8accf4804a21381c5e35b484a651c;hb=HEAD

I'd think the following patch would fix it up, though I have not tested it to be sure.

diff -ruN PackageKit-0.6.14/backends/yum/yumBackend.py PackageKit-0.6.14.new/backends/yum/yumBackend.py
--- PackageKit-0.6.14/backends/yum/yumBackend.py        2011-06-01 14:43:00.000000000 -0400
+++ PackageKit-0.6.14.new/backends/yum/yumBackend.py    2011-06-01 14:42:54.000000000 -0400
@@ -3488,7 +3488,7 @@
                 raise PkError(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
-    def _media_find_root(self, media_id, disc_number=-1):
+    def _media_find_root(self, media_id):
         """ returns the root "/media/Fedora Extras" or None """
         # search all the disks
@@ -3509,7 +3509,7 @@
             # not enough lines to be a valid .discinfo
-            if len(lines) < 4:
+            if len(lines) < 3:
             # check this is the right disk
@@ -3517,15 +3517,6 @@
             if cmp(media_id_tmp, media_id) != 0:
-            # disc number can be random things like 'ALL'
-            if disc_number != -1:
-                disc_number_tmp = 1
-                try:
-                    disc_number_tmp = int(lines[3].strip())
-                except ValueError, e:
-                    pass
-                if disc_number_tmp != disc_number:
-                    continue
             return root
         # nothing remaining

Comment 1 Máirín Duffy 2011-06-09 20:36:56 UTC
Just wanted to note the impact on users here is that users with no or poor internet connections won't be able to install additional software post-install. (we are looking at removing individual package selection from the installer in the future which would greatly exacerbate the problem)

Comment 2 Richard Hughes 2011-07-19 08:54:25 UTC
I've made a small fix to your patch, and pushed it to git master. Thanks.

Comment 3 Fedora Update System 2011-08-01 12:40:11 UTC
PackageKit-0.6.17-1.fc15 has been submitted as an update for Fedora 15.

Comment 4 Fedora Update System 2011-08-02 11:06:03 UTC
PackageKit-0.6.17-2.fc16 has been submitted as an update for Fedora 16.

Comment 5 Fedora Update System 2011-08-09 01:36:58 UTC
PackageKit-0.6.17-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2011-08-22 15:15:03 UTC
PackageKit-0.6.17-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

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