Bug 919365 - librepo error messages can be unhelpful
Summary: librepo error messages can be unhelpful
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: librepo
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Mlcoch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-08 09:23 UTC by Ales Kozumplik
Modified: 2014-09-30 23:41 UTC (History)
2 users (show)

Fixed In Version: librepo-1.0.0-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-05 01:28:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ales Kozumplik 2013-03-08 09:23:11 UTC
Suppose the following:

#! /usr/bin/python

import librepo

MIRROR="""https://mirrors.fedoraproject.org/metalink?repo=fedora-17&arch=x86_64"""
PKG="Packages/p/pakchois-0.4-5.x86_64.rpm"

if __name__ == "__main__":
    h = librepo.Handle()
    destdir="./out"

    h.setopt(librepo.LRO_MIRRORLIST, MIRROR)
    h.setopt(librepo.LRO_REPOTYPE, librepo.LR_YUMREPO)
    h.setopt(librepo.LRO_DESTDIR, destdir)
    h.download(PKG)

It is going to download PKG into the "out" directory below the current working directory. If this directory exists, the .rpm is downloaded there. If the directory doesn't exist or if the current user doesn't have the necessary rights to it, librepo fails in both cases with:

Traceback (most recent call last):
  File "./download.py", line 15, in <module>
    h.download(PKG)
  File "/home/akozumpl/repos/librepo/build/librepo/python/librepo/__init__.py", line 708, in download
    self.download_package(url, dest, checksum_type, checksum, base_url, resume)
_librepo.Exception: (14, 'Input/Output error', None)

And it is very hard for the client programmer to debug what the exact cause is. Could you please provide the more detailed I/O error in the error message too?

Comment 1 Fedora End Of Life 2013-04-03 17:53:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 2 Tomas Mlcoch 2013-09-03 08:46:15 UTC
Librepo 1.0.0 has a more detailed error messages. Moreover since 1.0.0 there is possibility to set a own debug log handler https://github.com/Tojaj/librepo/wiki/Debugging-applications-using-Librepo

Comment 3 Fedora Update System 2013-09-03 08:47:10 UTC
librepo-1.0.0-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/librepo-1.0.0-1.fc19

Comment 4 Fedora Update System 2013-09-03 22:31:47 UTC
Package librepo-1.0.0-1.fc19, dnf-0.3.11-2.git54f55e0.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing librepo-1.0.0-1.fc19 dnf-0.3.11-2.git54f55e0.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-15734/dnf-0.3.11-2.git54f55e0.fc19,librepo-1.0.0-1.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-09-05 01:28:48 UTC
librepo-1.0.0-1.fc19, dnf-0.3.11-2.git54f55e0.fc19 has been pushed to the Fedora 19 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.