Bug 1401264 - LibrepoException is unclear when a repository cannot be downloaded
Summary: LibrepoException is unclear when a repository cannot be downloaded
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: rpmdeplint
Classification: Community
Component: cli
Version: unreleased
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 1.3
Assignee: Jon Orris
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: 1423678
TreeView+ depends on / blocked
 
Reported: 2016-12-04 05:45 UTC by Roman Joost
Modified: 2017-04-28 05:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-28 05:31:03 UTC
Embargoed:


Attachments (Terms of Use)

Description Roman Joost 2016-12-04 05:45:01 UTC
Description of problem:

I ran rpmdeplint against a package using the --repos-from-system option. The command ran for awhile until it ended in a Traceback:

bin/rpmdeplint check-upgrade /tmp/ghc-cassava-0.4.5.1-1.fc24.x86_64.rpm --repos-fr
om-system
Traceback (most recent call last):
  File "bin/rpmdeplint", line 15, in <module>
    sys.exit(rpmdeplint.cli.main())
  File "/home/rjoost/works/rpmdeplint/rpmdeplint/cli.py", line 224, in main
    return args.func(args)
  File "/home/rjoost/works/rpmdeplint/rpmdeplint/cli.py", line 95, in cmd_check_upgrad
e
    with dependency_analyzer_from_args(args) as analyzer:
  File "/home/rjoost/works/rpmdeplint/rpmdeplint/cli.py", line 153, in dependency_anal
yzer_from_args
    return DependencyAnalyzer(repos, rpms, arch=arch)
  File "/home/rjoost/works/rpmdeplint/rpmdeplint/__init__.py", line 127, in __init__
    repo.download_repodata()
  File "/home/rjoost/works/rpmdeplint/rpmdeplint/repodata.py", line 138, in download_r
epodata
    h.perform(r)
  File "/usr/lib64/python2.7/site-packages/librepo/__init__.py", line 1506, in perform
    _librepo.Handle.perform(self, result)
librepo.LibrepoException: (19, u'Cannot download repomd.xml: Cannot download repodata/
repomd.xml: All mirrors were tried', u'Usable URL not found')

After debugging I realised that one of my repositories was pointing to a URL which was returning a 404. It seems DNF handles the exception in a more user friendly way:

Failed to synchronize cache for repo 'Dropbox', disabling.


Version-Release number of selected component (if applicable):

develop

How reproducible:

100%

Steps to Reproduce:
1. Create a (system) repo with a URL returning a 404
2. Run rpmdeplint against the repo
3. profit

Actual results:

Traceback (example see above)

Expected results:

Either ignore, log and continue or at least tell me which repo is b0rked.

Additional info:

none

Comment 1 Roman Joost 2016-12-05 23:53:45 UTC
Course of action:

* fail
* print the broken repository

Comment 2 Jon Orris 2016-12-06 22:09:25 UTC
https://gerrit.beaker-project.org/#/c/5510/

Comment 3 Dan Callaghan 2017-02-17 14:18:48 UTC
FAF is hassling me about this same exception: https://retrace.fedoraproject.org/faf/reports/1436495/

but the patch we have already merged only tweaks the exception message to be more helpful -- it still raises out as an unhandled exception which means abrt will still try to report it.

We will probably need to introduce some handling for "expected" error conditions, including the new exception type introduced here, and explicitly print and exit instead of letting them go unhandled.

Not sure if I should file a new bug for it or re-use this one...

Comment 4 Dan Callaghan 2017-02-17 14:20:22 UTC
FAF also didn't like the fact that this bug is not filed in the Fedora product, so I let it create a separate one: bug 1423678.

Comment 5 Dan Callaghan 2017-04-28 05:31:03 UTC
rpmdeplint 1.3 has been released.


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