Bug 567887 - repoclosure breaks with relative paths
repoclosure breaks with relative paths
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-02-24 03:34 EST by Kamil Páral
Modified: 2014-01-21 18:13 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-02-24 04:20:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
File: backtrace (725 bytes, text/plain)
2010-02-24 03:34 EST, Kamil Páral
no flags Details

  None (edit)
Description Kamil Páral 2010-02-24 03:34:57 EST
abrt 1.0.6 detected a crash.

architecture: x86_64
cmdline: /usr/bin/python -t /usr/bin/repoclosure --repofrompath myrepo,. -t -r myrepo
comment: I ran repoclosure with "." denoting current directory. Maybe it's a bad syntax, but it should not certainly trigger ABRT showing crash, it should just report an error in the shell.
component: yum-utils
executable: /usr/bin/repoclosure
package: yum-utils-1.1.25-1.fc12
release: Fedora release 12 (Constantine)

Summary: TB66407244 config.py:94:__set__:ValueError: Error parsing '.': URL must be http, ftp, file or https not ""

Traceback (most recent call last):
  File "/usr/bin/repoclosure", line 276, in <module>
  File "/usr/bin/repoclosure", line 206, in main
    newrepo.baseurl = baseurl
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 94, in __set__
    raise ValueError('Error parsing %r: %s' % (value, str(e)))
ValueError: Error parsing '.': URL must be http, ftp, file or https not ""

Local variables in innermost frame:
obj: <yum.yumRepo.YumRepository object at 0x1308e90>
self: <yum.config.UrlListOption object at 0xf2a9d0>
e: ValueError('URL must be http, ftp, file or https not ""',)
value: '.'

How to reproduce
1. $ repoclosure --repofrompath myrepo,. -t -r myrepo
Comment 1 Kamil Páral 2010-02-24 03:34:59 EST
Created attachment 395955 [details]
File: backtrace
Comment 2 Tim Lauridsen 2010-02-24 04:20:20 EST
                        specify repoid & paths of additional repositories -
                        unique repoid and complete path required, can be
                        specified multiple times. Example.

You need to use the full path to the repo
Comment 3 Kamil Páral 2010-02-24 04:38:03 EST
Yeah, I know now. The funny thing is that now that ABRT is widely deployed, Python developers will receive quite a lot automated bug reports if they keep not catching exceptions. I am just beginner in Python, but I also use tracebacks as an error output quite often. It's easier than to catch the exception and end the program anyway, and still it's readable. But it seems it will be necessary to catch all those exception for which you don't want to receive bug reports.

Just a thought, I'm not an expert in this.
Comment 4 seth vidal 2010-03-01 15:04:03 EST

committed a change to catch these errors and tested it w/the above.

you're right, abrt will cause us more irritation and this is an easy catch.
Comment 5 Tim Lauridsen 2010-03-02 06:20:57 EST

And i have fixed repoclosure to work with relative paths, really easy to fix :)

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