Bug 613399 - packagekit-media.repo crashes yum
packagekit-media.repo crashes yum
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: PackageKit (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-11 05:49 EDT by Muayyad Alsadi
Modified: 2014-01-21 18:15 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-20 13:51:38 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 Muayyad Alsadi 2010-07-11 05:49:30 EDT
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 05:11:26 EDT
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 06:36:26 EDT
(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 08:30:23 EDT
(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 09:17:34 EDT
(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 11:55:24 EDT
> 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 13:51:38 EDT
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.