Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 57335 - app-portage/lintool assumes portage is located in /usr/portage
Summary: app-portage/lintool assumes portage is located in /usr/portage
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-16 15:27 UTC by Aaron Walker (RETIRED)
Modified: 2004-07-17 10:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Walker (RETIRED) gentoo-dev 2004-07-16 15:28:00 UTC
app-portage/lintool makes the assumption that portage is located in /usr/portage.  Since portage allows PORTDIR to be set to anything, lintool should read make.conf to get the actual location, instead of hardcoding /usr/portage.

Possible offenders:

$ for i in /usr/bin/lintool /usr/lib/python2.3/site-packages/lintool/*.py; do
echo $i: `grep "/usr/portage" $i`; done

/usr/bin/lintool: 'licenseDirs' : [ "/usr/portage/licenses" ],
/usr/lib/python2.3/site-packages/lintool/ebuild.py: ins = open("/usr/portage/profiles/use.desc")



Reproducible: Always
Steps to Reproduce:
1. emerge lintool
2. set PORTDIR to something other than /usr/portage
3. run lintool

Actual Results:  
Traceback (most recent call last):
  File "/usr/bin/lintool", line 319, in ?
    main()
  File "/usr/bin/lintool", line 249, in main
    available_tests = ebuild.getTests(formatter, options)
  File "/usr/lib/python2.3/site-packages/lintool/ebuild.py", line 344, in getTests
    return [ TestSpaces(formatter,options),
  File "/usr/lib/python2.3/site-packages/lintool/ebuild.py", line 297, in __init__
    self.useflags = self.loadUseFlags()
  File "/usr/lib/python2.3/site-packages/lintool/ebuild.py", line 300, in
loadUseFlags
    ins = open("/usr/portage/profiles/use.desc")
IOError: [Errno 2] No such file or directory: '/usr/portage/profiles/use.desc'


Expected Results:  
lintool should dynamically determine PORTDIR and run successfully
Comment 1 Brian Harring (RETIRED) gentoo-dev 2004-07-16 15:36:17 UTC
You really should be using repoman rather then lintool, not even sure if lintool has been updated for portage changes (going by this bug, I'd suspect not).
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2004-07-16 16:06:19 UTC
lintool? updated?
'll probably put it in package.mask in the next days after checking with the original author (g2boojum I believe).
Comment 3 Aaron Walker (RETIRED) gentoo-dev 2004-07-17 09:36:07 UTC
ferrinb,

Thanks for the tip.  I was under the impression that repoman was for devs when commiting to CVS.  If this isn't soley the case, then maybe the repoman's manual page should be updated, as it says:

"repoman is meant for Gentoo developers only due to the fact it does not  work  on  a  per-ebuild  basis.   It  checks  the quality of CVS repositories.  If you want some utility to check out the quality of ebuilds, emerge app-portage/lintool.  Note: repoman only runs inside local CVS repositories."

Is repoman now allowed to work outside of a CVS repos?  If this is the case, let me know, and I'll file another bug regarding the manual page.

Thanks
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2004-07-17 10:46:41 UTC
no need to file a bug, I'll update it now.
As for lintool, I'll remove it from the tree at the end of next week if noone objects and stands up to be its maintainer.