Bug 613399 - packagekit-media.repo crashes yum
Summary: packagekit-media.repo crashes yum
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit   
(Show other bugs)
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-11 09:49 UTC by Muayyad Alsadi
Modified: 2014-01-21 23:15 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-20 17:51:38 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Muayyad Alsadi 2010-07-11 09:49:30 UTC
Description of problem:
latest PK generates a file in /etc/yum.repos.d/
called packagekit-media.repo
this files makes yum 

Version-Release number of selected component (if applicable):
yum-3.2.27-4.fc13.noarch
PackageKit-0.6.6-1.fc13.x86_64

How reproducible:
always

Steps to Reproduce:
1. insert F13 DVD
2. wait or open PK software sources
3. make sure you see /etc/yum.repos.d/packagekit-media.repo 
4. type
  yum list '*yumex*'
or
  yum --noplugins list '*yumex*'
  
or any yum query

Actual results:
Error: Cannot retrieve repository metadata (repomd.xml) for
repository: InstallMedia. Please verify its path and try again

Expected results:
disable that repo or better prompt the user to insert it

Comment 1 Tim Lauridsen 2010-07-12 09:11:26 UTC
This is not a problem in yum, if a enabled repo, can't be populated with metadata, then yum will bail out as expected.

I think that the packagekit-media.repo should be disabled by default, and enabled by packagekit when needed.

Comment 2 Richard Hughes 2010-07-12 10:36:26 UTC
(In reply to comment #1)
> This is not a problem in yum, if a enabled repo, can't be populated with
> metadata, then yum will bail out as expected.
> 
> I think that the packagekit-media.repo should be disabled by default, and
> enabled by packagekit when needed.    

That's exactly what we're doing now.

Comment 3 Tim Lauridsen 2010-07-12 12:30:23 UTC
(In reply to comment #2)
> That's exactly what we're doing now.    
For the current session only ?

Comment 4 Richard Hughes 2010-07-12 13:17:34 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > That's exactly what we're doing now.    
> For the current session only ?    

Just when PK is using it. See http://cgit.freedesktop.org/packagekit/plain/docs/media-repo.txt

Comment 5 Muayyad Alsadi 2010-07-12 15:55:24 UTC
> This is not a problem in yum, if a enabled repo, can't be populated with
metadata, then yum will bail out as expected.

according to how I understand yum, it (or what is based on it like yum-cli or yumex or yum backend in PK) should either being able to handle media or treat it as disabled even if enabled

check this line
http://yum.baseurl.org/gitweb?p=yum.git;a=blob;f=yum/yumRepo.py;h=f7257d1c1ccb743fbc2ffb5611596698137387b5;hb=HEAD#l413

if len(self._urls) < 1 and not self.mediaid: raise Errors.RepoError, ...etc.

abd this line
http://yum.baseurl.org/gitweb?p=yum.git;a=blob;f=yum/yumRepo.py;h=f7257d1c1ccb743fbc2ffb5611596698137387b5;hb=HEAD#l740

if url and scheme != "media":

in other words, it's clear that in many places of the code, yum treats media repos differently and fails gracefully

while the message comes from

http://yum.baseurl.org/gitweb?p=yum.git;a=blob;f=yum/yumRepo.py;h=f7257d1c1ccb743fbc2ffb5611596698137387b5;hb=HEAD#l1336

which seems to mean that although yum handles packages gracefully but not meta data with regard to media repos

Comment 6 seth vidal 2010-07-20 17:51:38 UTC
patch sent upstream to fix this.

tested with this .repo stanza:
[mediaid]
name = mediaid repo
#baseurl=media:///mnt/path/of/doom/
enabled=1
gpgcheck=0
mediaid=133345505.0
metadata_expire=-1
gpgcheck=0


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