Bug 567887 - repoclosure breaks with relative paths
repoclosure breaks with relative paths
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
12
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
abrt_hash:66407244
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2010-02-24 04:20:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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
kernel: 2.6.31.12-174.2.3.fc12.x86_64
package: yum-utils-1.1.25-1.fc12
release: Fedora release 12 (Constantine)

backtrace
-----
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>
    main()
  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
2.
3.
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
  --repofrompath=REPOFROMPATH
                        specify repoid & paths of additional repositories -
                        unique repoid and complete path required, can be
                        specified multiple times. Example.
                        --repofrompath=myrepo,/path/to/repo

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
http://yum.baseurl.org/gitweb?p=yum-utils.git;a=commitdiff;h=b15cb0760c864cadc5029474d07cc38882ec1815

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
http://yum.baseurl.org/gitweb?p=yum-utils.git;a=commitdiff;h=94b52cb5499b47cb4e2b64c8a2e4e7863b2e965e

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.