Bug 1034607 - dnf does not work with media repo
dnf does not work with media repo
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
20
Unspecified Linux
unspecified Severity medium
: ---
: ---
Assigned To: Zdeněk Pavlas
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-26 03:26 EST by Cristian Ciupitu
Modified: 2014-02-02 17:29 EST (History)
5 users (show)

See Also:
Fixed In Version: dnf-0.4.9-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-13 21:45:28 EST
Type: Bug
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 Cristian Ciupitu 2013-11-26 03:26:02 EST
Description of problem:
dnf can't use the install DVD (Fedora-20-Beta-x86_64-DVD.iso) as a
repository.

Version-Release number of selected component (if applicable):
dnf-0.4.8-1.fc20.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Create /etc/yum.repos.d/media-x86_64.repo with this contents:
[media-x86_64]
name=Fedora $releasever - $basearch media
baseurl=file:///mnt/misc/Fedora-DVDs/$releasever/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
metadata_expire=-1
protect=yes
cost=500
#async=0
2. Run dnf install gcc (or any other package available on the DVD).

Actual results:
Fedora 20 - x86_64 media                        223 MB/s | 4.7 MB     00:00    
Resolving dependencies
--> Starting dependency resolution
---> Package gcc.x86_64 4.8.2-1.fc20 will be installed
---> Package cpp.x86_64 4.8.2-1.fc20 will be installed
---> Package glibc-devel.x86_64 2.18-11.fc20 will be installed
---> Package libmpc.x86_64 1.0.1-2.fc20 will be installed
---> Package glibc-headers.x86_64 2.18-11.fc20 will be installed
---> Package kernel-headers.x86_64 3.11.9-300.fc20 will be installed
--> Finished dependency resolution
Dependencies resolved.

================================================================================
 Package            Arch       Version                Repository           Size
================================================================================
Installing:
 gcc                x86_64     4.8.2-1.fc20           fedora               16 M
 cpp                x86_64     4.8.2-1.fc20           fedora              5.9 M
 glibc-devel        x86_64     2.18-11.fc20           media-x86_64        1.0 M
 libmpc             x86_64     1.0.1-2.fc20           media-x86_64         50 k
 glibc-headers      x86_64     2.18-11.fc20           media-x86_64        647 k
 kernel-headers     x86_64     3.11.9-300.fc20        updates-testing     897 k

Transaction Summary
================================================================================
Install  6 Packages

Total size: 25 M
Total download size: 1.7 M
Installed size: 25 M
Is this ok [y/N]: y
Downloading Packages:
[SKIPPED] gcc-4.8.2-1.fc20.x86_64.rpm: Already downloaded                      
[SKIPPED] cpp-4.8.2-1.fc20.x86_64.rpm: Already downloaded                      
[SKIPPED] kernel-headers-3.11.9-300.fc20.x86_64.rpm: Already downloaded        
--------------------------------------------------------------------------------
Total                                           247 MB/s |  23 MB     00:00     
Traceback (most recent call last):
  File "/usr/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 279, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 192, in _main
    return_code, resultmsgs = base.do_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 202, in do_transaction
    return_code, resultmsgs = super(BaseCli, self).do_transaction(display)
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 627, in do_transaction
    self.transaction.populate_rpm_ts(self.ts)
  File "/usr/lib/python2.7/site-packages/dnf/transaction.py", line 177, in populate_rpm_ts
    hdr = tsi.installed.header
  File "/usr/lib/python2.7/site-packages/dnf/package.py", line 71, in header
    raise RuntimeError("Rpm file does not exist: '%s'", rpmfile)
RuntimeError: ("Rpm file does not exist: '%s'", '/mnt/misc/Fedora-DVDs/20/x86_64/glibc-devel-2.18-11.fc20.x86_64.rpm')

Expected results:
No errors

Additional info:
The sha256sum of the DVD is
04e76a36eb97d6fcdc35e6a2ecdb7b7631a4d220cf70cfbffd0f17db000ae3ac.

yum-3.4.3-106.fc20.noarch works fine:
# yum install gcc
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.8.2-1.fc20 will be installed
--> Processing Dependency: cpp = 4.8.2-1.fc20 for package: gcc-4.8.2-1.fc20.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.2-1.fc20.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.2-1.fc20.x86_64
--> Running transaction check
---> Package cpp.x86_64 0:4.8.2-1.fc20 will be installed
---> Package glibc-devel.x86_64 0:2.18-11.fc20 will be installed
--> Processing Dependency: glibc-headers = 2.18-11.fc20 for package: glibc-devel-2.18-11.fc20.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.18-11.fc20.x86_64
---> Package libmpc.x86_64 0:1.0.1-2.fc20 will be installed
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.18-11.fc20 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.18-11.fc20.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.18-11.fc20.x86_64
--> Running transaction check
---> Package kernel-headers.x86_64 0:3.11.9-300.fc20 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch        Version                Repository         Size
================================================================================
Installing:
 gcc                 x86_64      4.8.2-1.fc20           fedora             16 M
Installing for dependencies:
 cpp                 x86_64      4.8.2-1.fc20           fedora            5.9 M
 glibc-devel         x86_64      2.18-11.fc20           media-x86_64      1.0 M
 glibc-headers       x86_64      2.18-11.fc20           media-x86_64      647 k
 kernel-headers      x86_64      3.11.9-300.fc20        fedora            897 k
 libmpc              x86_64      1.0.1-2.fc20           media-x86_64       50 k

Transaction Summary
================================================================================
Install  1 Package (+5 Dependent packages)

Total size: 25 M
Total download size: 1.7 M
Installed size: 58 M
Is this ok [y/d/N]: y
Downloading packages:
--------------------------------------------------------------------------------
Total                                           144 MB/s | 1.7 MB     00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libmpc-1.0.1-2.fc20.x86_64                                   1/6 
  Installing : cpp-4.8.2-1.fc20.x86_64                                      2/6 
  Installing : kernel-headers-3.11.9-300.fc20.x86_64                        3/6 
  Installing : glibc-headers-2.18-11.fc20.x86_64                            4/6 
  Installing : glibc-devel-2.18-11.fc20.x86_64                              5/6 
  Installing : gcc-4.8.2-1.fc20.x86_64                                      6/6 
  Verifying  : libmpc-1.0.1-2.fc20.x86_64                                   1/6 
  Verifying  : gcc-4.8.2-1.fc20.x86_64                                      2/6 
  Verifying  : glibc-headers-2.18-11.fc20.x86_64                            3/6 
  Verifying  : glibc-devel-2.18-11.fc20.x86_64                              4/6 
  Verifying  : kernel-headers-3.11.9-300.fc20.x86_64                        5/6 
  Verifying  : cpp-4.8.2-1.fc20.x86_64                                      6/6 

Installed:
  gcc.x86_64 0:4.8.2-1.fc20                                                     

Dependency Installed:
  cpp.x86_64 0:4.8.2-1.fc20            glibc-devel.x86_64 0:2.18-11.fc20       
  glibc-headers.x86_64 0:2.18-11.fc20  kernel-headers.x86_64 0:3.11.9-300.fc20 
  libmpc.x86_64 0:1.0.1-2.fc20        

Complete!
Comment 1 Ales Kozumplik 2013-11-26 03:31:33 EST
Zdenek can you please check this out?
Comment 2 Zdeněk Pavlas 2013-11-26 08:59:01 EST
This looks like a a packaging error- a package is present in metadata, but the RPM file is not there..  The downloader skips rpms from "local" repositories, so it proceeds without detecting the problem.  I'm downloading the ISO atm, and will check if it's indeed the case.
Comment 3 Cristian Ciupitu 2013-11-26 09:18:46 EST
# ls /mnt/misc/Fedora-DVDs/20/x86_64/glibc-devel-2.18-11.fc20.x86_64.rpm
ls: cannot access /mnt/misc/Fedora-DVDs/20/x86_64/glibc-devel-2.18-11.fc20.x86_64.rpm: No such file or directory

# ls /mnt/misc/Fedora-DVDs/20/x86_64/Packages/g/glibc-devel-2.18-11.fc20.x86_64.rpm
/mnt/misc/Fedora-DVDs/20/x86_64/Packages/g/glibc-devel-2.18-11.fc20.x86_64.rpm
Comment 4 Zdeněk Pavlas 2013-11-26 10:13:05 EST
Indeed a bug in dnf.. Fixed with https://github.com/zde/dnf/commit/396ad9
Comment 5 Fedora Update System 2013-12-03 11:40:10 EST
dnf-0.4.9-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.9-1.fc20
Comment 6 Fedora Update System 2013-12-03 13:20:52 EST
Package dnf-0.4.9-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.9-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-22638/dnf-0.4.9-1.fc20
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2013-12-13 21:45:28 EST
dnf-0.4.9-1.fc20 has been pushed to the Fedora 20 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.