Bug 709865

Summary: .discinfo file format has changed
Product: [Fedora] Fedora Reporter: Chris Lumens <clumens>
Component: PackageKitAssignee: Richard Hughes <richard>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: duffy, jonathan, rhughes, richard, smparrish
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: PackageKit-0.6.17-2.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-19 08:54:25 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 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 @@
             else:
                 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 @@
             f.close()
 
             # not enough lines to be a valid .discinfo
-            if len(lines) < 4:
+            if len(lines) < 3:
                 continue
 
             # check this is the right disk
@@ -3517,15 +3517,6 @@
             if cmp(media_id_tmp, media_id) != 0:
                 continue
 
-            # 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.
https://admin.fedoraproject.org/updates/PackageKit-0.6.17-1.fc15

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.
https://admin.fedoraproject.org/updates/PackageKit-0.6.17-2.fc16

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.