Bug 991182
Summary: | rpmlint doesn't expand "~" in /home/username | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Germán Racca <gracca> |
Component: | rpmlint | Assignee: | Tom "spot" Callaway <tcallawa> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 19 | CC: | a.badger, gracca, manuel.wolfshant, tcallawa, tmz, twoerner, ville.skytta |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-08-03 07:54:11 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Germán Racca
2013-08-01 19:19:24 UTC
rpmlint can check packages from any dir just fine. The error indicates that it ends up loading some other "calendar" module than the usual one shipping with Python. You don't happen to have a calendar.py (and/or .pyc, .pyo) in ~/Downloads and "." in the PYTHONPATH environment variable? $ ls -la ~/Downloads/*.py* $ env | grep PYTHON Oh yes! You are completely right! german@skytux Downloads $ env | grep PYTHON PYTHONPATH=/home/german/Programs/gildas-exe-feb13b/x86_64-fedora18-gfortran/python:/home/german/Programs/gildas-exe-feb13b/x86_64-fedora18-gfortran/python::/home/german/modules:/home/german/modules german@skytux Downloads $ ls -la ~/Downloads/*.py* | grep cal -rwxrwxr-x. 1 german german 4911 May 3 14:49 /home/german/Downloads/calendar.py -rw-rw-r--. 1 german german 3300 Aug 2 19:03 /home/german/Downloads/calendar.pyo german@skytux Downloads $ rm calendar.pyo german@skytux Downloads $ mv calendar.py ~/Programs/ german@skytux Downloads $ rpmlint ~/repo-local/pekwm-themes-1.0.5-3.noarch.rpm pekwm-themes.noarch: W: invalid-url URL: http://adrinux.wordpress.com/pekwm-themes/ HTTP Error 410: Gone pekwm-themes.noarch: W: no-documentation 1 packages and 0 specfiles checked; 0 errors, 2 warnings. Sorry for the noise and thanks for reading the bug report so quickly. But this is something that shouldn't happen with rpmlint, because it will crash every time the user wants to run rpmlint in a directory in which there is a calendar.py file, don't you think? I mean, this behaviour is awkward. Germán. (In reply to Germán Racca from comment #2) > Oh yes! You are completely right! > > german@skytux Downloads $ env | grep PYTHON > PYTHONPATH=/home/german/Programs/gildas-exe-feb13b/x86_64-fedora18-gfortran/ > python:/home/german/Programs/gildas-exe-feb13b/x86_64-fedora18-gfortran/ > python::/home/german/modules:/home/german/modules > > german@skytux Downloads $ ls -la ~/Downloads/*.py* | grep cal > -rwxrwxr-x. 1 german german 4911 May 3 14:49 > /home/german/Downloads/calendar.py > -rw-rw-r--. 1 german german 3300 Aug 2 19:03 > /home/german/Downloads/calendar.pyo > > german@skytux Downloads $ rm calendar.pyo > german@skytux Downloads $ mv calendar.py ~/Programs/ > german@skytux Downloads $ rpmlint > ~/repo-local/pekwm-themes-1.0.5-3.noarch.rpm > pekwm-themes.noarch: W: invalid-url URL: > http://adrinux.wordpress.com/pekwm-themes/ HTTP Error 410: Gone > pekwm-themes.noarch: W: no-documentation > 1 packages and 0 specfiles checked; 0 errors, 2 warnings. > > Sorry for the noise and thanks for reading the bug report so quickly. > > But this is something that shouldn't happen with rpmlint, because it will > crash every time the user wants to run rpmlint in a directory in which there > is a calendar.py file, don't you think? I mean, this behaviour is awkward. > > Germán. This happens every time: german@skytux ~ $ touch calendar.py german@skytux ~ $ rpmlint repo-local/pekwm-themes-1.0.5-3.noarch.rpm Traceback (most recent call last): File "/usr/bin/rpmlint", line 378, in <module> main() File "/usr/bin/rpmlint", line 89, in main loadCheck(c) File "/usr/bin/rpmlint", line 73, in loadCheck imp.load_module(name, fobj, pathname, description) File "/usr/share/rpmlint/TagsCheck.py", line 431, in <module> oldest_changelog_timestamp = calendar.timegm(time.strptime("1995-01-01", "%Y-%m-%d")) AttributeError: 'module' object has no attribute 'timegm' german@skytux ~ $ ll calendar* -rw-rw-r--. 1 german german 0 Aug 2 19:33 calendar.py -rw-rw-r--. 1 german german 111 Aug 2 19:33 calendar.pyo (In reply to Germán Racca from comment #2) > But this is something that shouldn't happen with rpmlint, because it will > crash every time the user wants to run rpmlint in a directory in which there > is a calendar.py file, don't you think? No, I don't. It's not limited to calendar.py, it's the same thing with all python modules, and it's not even limited to rpmlint, this affects practically every python program out there. Just be careful with PYTHONPATH. (In reply to Ville Skyttä from comment #4) > (In reply to Germán Racca from comment #2) > > But this is something that shouldn't happen with rpmlint, because it will > > crash every time the user wants to run rpmlint in a directory in which there > > is a calendar.py file, don't you think? > > No, I don't. It's not limited to calendar.py, it's the same thing with all > python modules, and it's not even limited to rpmlint, this affects > practically every python program out there. Just be careful with PYTHONPATH. You are right once again :) As I'm learning Python, I realized later that it will happen with other python programs as well, because reading the source code of rpmlint, I could see that it imports calendar, and if there is a calendar.py in my Python path, it will import it first. And this is not restricted to rpmlint. Well, thanks for everything, I'm closing this bug. All the best, Germán. |