Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 9222 - lintool enhancements
Summary: lintool enhancements
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Karl Trygve Kalleberg (RETIRED)
URL:
Whiteboard:
Keywords:
: 9296 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-10-16 18:11 UTC by SpanKY
Modified: 2002-11-28 07:55 UTC (History)
2 users (show)

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 SpanKY gentoo-dev 2002-10-16 18:11:46 UTC
traditionally with linux, you can put cmdline options anywhere on the cmdline 
and the binary will parse it ... you use -- to flag when to stop parsing ... 
 
also, typing `lintool --show-details <ebuild>` is a real pita ... i would love 
like `lintool -sd <ebuild>` ;) 
 
but nice work as it is, its slick
Comment 1 SpanKY gentoo-dev 2002-10-16 18:19:41 UTC
also i noticed that lintool doesnt pick up on when you have excess spaces after 
'function() {' statements ... 
 
i had an ebuild that looked like: 
function() {\t\t\t\t\t 
and it was not caught ... 
Comment 2 SpanKY gentoo-dev 2002-10-16 18:37:03 UTC
strings are not parsed correctly sometimes ... 
 
 - (W) Has illegal white space (marked by %), only one space character allowed:    
 |      einfo "*%%%%%%%\  
  
the line is:  
einfo "*         \"man wine\"           *" 
Comment 3 SpanKY gentoo-dev 2002-10-16 19:34:57 UTC
multiple LICENSES arent supported ... 
right now we use these 2 convections: 
LICENSE="GPL-2 LGPL-2" 
LICENSE="GPL-2 | LGPL-2" 
Comment 4 SpanKY gentoo-dev 2002-10-16 19:36:52 UTC
and lintool doesnt like it if you mess with the destination of a pipe ...  
  
root@rux0r app-misc # lintool --show-details --show-separate */*.ebuild | ASFD  
bash: ASFD: command not found  
Traceback (most recent call last):  
  File "/usr/bin/lintool", line 317, in ?  
    main()  
  File "/usr/bin/lintool", line 301, in main  
    showStatus(options,tests,formatter,fn)  
  File "/usr/bin/lintool", line 103, in showStatus  
    formatter.bullet(formatter.div(j.getDesc(), ": " + j.getStatus()))  
  File "/usr/bin/lintool", line 28, in bullet  
    print "* " + s  
IOError: [Errno 32] Broken pipe  
Comment 5 SpanKY gentoo-dev 2002-10-16 19:59:22 UTC
LICENSE="freedist" # Readme.txt says "BLAHBLAH"  
  
* Testing for proper LICENSE                                : failed  
- (E) License 'freedist" # Readme.txt says "BLAHBLAH' is not known  
 
doesnt ignore stuff past comments correctly ... 
Comment 6 SpanKY gentoo-dev 2002-10-17 08:46:05 UTC
also would be nice if lintool would check for outdated SRC_URI ...

you could parse /usr/portage/profiles/thirdpartymirrors for the base URL's
and then suggest what it should be ...
Comment 7 SpanKY gentoo-dev 2002-10-17 09:42:43 UTC
also, lintool only parses USE flags that match the regex [a-z0-9] ...

what about 'libg++' ? :)
Comment 8 Nicolas Kaiser 2002-10-17 12:15:09 UTC
I think I found a little bug in Lintool 0.2.3: 
Warnings may disappear when checking multiple ebuilds: 
 
lucky sys-apps # lintool --show-details powerprefs/powerprefs-0.2.ebuild 
 
------------------------------------------------------------------------------- 
 Status for powerprefs/powerprefs-0.2.ebuild 
 
* Testing for correct formatting                                        : 
passed 
* Testing for malformed headers                                         : 
passed 
* Testing for occurence of deprecated try                               : 
passed 
* Testing for superfluous A=${P}.tar.gz                                 : 
passed 
* Testing for empty DEPEND                                              : 
passed 
* Testing for empty HOMEPAGE                                            : 
passed 
* Testing for empty DESCRIPTION                                         : 
passed 
* Testing for presence of env vars                                      : 
passed 
- (W) Missing RDEPEND= 
* Testing for sane USE flag usage                                       : 
passed 
* Testing for proper LICENSE                                            : 
passed 
 
------------------------------------------------------------------------------- 
 Summary for all 1 ebuild(s) checked                              
#errors/warns 
 
Testing for correct formatting                                     :   0 /   0 
Testing for malformed headers                                      :   0 /   0 
Testing for occurence of deprecated try                            :   0 /   0 
Testing for superfluous A=${P}.tar.gz                              :   0 /   0 
Testing for empty DEPEND                                           :   0 /   0 
Testing for empty HOMEPAGE                                         :   0 /   0 
Testing for empty DESCRIPTION                                      :   0 /   0 
Testing for presence of env vars                                   :   0 /   1 
Testing for sane USE flag usage                                    :   0 /   0 
Testing for proper LICENSE                                         :   0 /   0 
Total number of ebuilds with errors                                   0 (  0%) 
Total number of ebuilds with warnings                                 1 (100%) 
lucky sys-apps # lintool --show-details powerprefs/powerprefs-0.* 
 
------------------------------------------------------------------------------- 
 Status for powerprefs/powerprefs-0.2.1.ebuild 
 
* Testing for correct formatting                                        : 
passed 
* Testing for malformed headers                                         : 
passed 
* Testing for occurence of deprecated try                               : 
passed 
* Testing for superfluous A=${P}.tar.gz                                 : 
passed 
* Testing for empty DEPEND                                              : 
passed 
* Testing for empty HOMEPAGE                                            : 
passed 
* Testing for empty DESCRIPTION                                         : 
passed 
* Testing for presence of env vars                                      : 
passed 
* Testing for sane USE flag usage                                       : 
passed 
* Testing for proper LICENSE                                            : 
passed 
 
------------------------------------------------------------------------------- 
 Status for powerprefs/powerprefs-0.2.ebuild 
 
* Testing for correct formatting                                        : 
passed 
* Testing for malformed headers                                         : 
passed 
* Testing for occurence of deprecated try                               : 
passed 
* Testing for superfluous A=${P}.tar.gz                                 : 
passed 
* Testing for empty DEPEND                                              : 
passed 
* Testing for empty HOMEPAGE                                            : 
passed 
* Testing for empty DESCRIPTION                                         : 
passed 
* Testing for presence of env vars                                      : 
passed 
* Testing for sane USE flag usage                                       : 
passed 
* Testing for proper LICENSE                                            : 
passed 
 
------------------------------------------------------------------------------- 
 Status for powerprefs/powerprefs-0.3.1.ebuild 
 
* Testing for correct formatting                                        : 
passed 
* Testing for malformed headers                                         : 
passed 
* Testing for occurence of deprecated try                               : 
passed 
* Testing for superfluous A=${P}.tar.gz                                 : 
passed 
* Testing for empty DEPEND                                              : 
passed 
* Testing for empty HOMEPAGE                                            : 
passed 
* Testing for empty DESCRIPTION                                         : 
passed 
* Testing for presence of env vars                                      : 
passed 
* Testing for sane USE flag usage                                       : 
passed 
* Testing for proper LICENSE                                            : 
passed 
 
------------------------------------------------------------------------------- 
 Summary for all 3 ebuild(s) checked                              
#errors/warns 
 
Testing for correct formatting                                     :   0 /   0 
Testing for malformed headers                                      :   0 /   0 
Testing for occurence of deprecated try                            :   0 /   0 
Testing for superfluous A=${P}.tar.gz                              :   0 /   0 
Testing for empty DEPEND                                           :   0 /   0 
Testing for empty HOMEPAGE                                         :   0 /   0 
Testing for empty DESCRIPTION                                      :   0 /   0 
Testing for presence of env vars                                   :   0 /   0 
Testing for sane USE flag usage                                    :   0 /   0 
Testing for proper LICENSE                                         :   0 /   0 
Total number of ebuilds with errors                                   0 (  0%) 
Total number of ebuilds with warnings                                 0 (  0%) 
Comment 9 Nicolas Kaiser 2002-10-17 14:07:42 UTC
and I think this one does not need any comment ;-) 
 
lucky sys-apps # lintool --show-details 
/usr/portage/sys-apps/tar/tar-1.13.25-r3.ebuild 
 
------------------------------------------------------------------------------- 
 Status for /usr/portage/sys-apps/tar/tar-1.13.25-r3.ebuild 
 
* Testing for correct formatting                                        : 
passed 
* Testing for malformed headers                                         : 
passed 
* Testing for occurence of deprecated try                               : 
failed 
- (E) Uses try, which is deprecated 
 |DESCRIPTION="Use this to try make tarballs :)" 
* Testing for superfluous A=${P}.tar.gz                                 : 
passed 
* Testing for empty DEPEND                                              : 
passed 
* Testing for empty HOMEPAGE                                            : 
passed 
* Testing for empty DESCRIPTION                                         : 
passed 
* Testing for presence of env vars                                      : 
passed 
* Testing for sane USE flag usage                                       : 
passed 
* Testing for proper LICENSE                                            : 
passed 
 
------------------------------------------------------------------------------- 
 Summary for all 1 ebuild(s) checked                              
#errors/warns 
 
Testing for correct formatting                                     :   0 /   0 
Testing for malformed headers                                      :   0 /   0 
Testing for occurence of deprecated try                            :   1 /   0 
Testing for superfluous A=${P}.tar.gz                              :   0 /   0 
Testing for empty DEPEND                                           :   0 /   0 
Testing for empty HOMEPAGE                                         :   0 /   0 
Testing for empty DESCRIPTION                                      :   0 /   0 
Testing for presence of env vars                                   :   0 /   0 
Testing for sane USE flag usage                                    :   0 /   0 
Testing for proper LICENSE                                         :   0 /   0 
Total number of ebuilds with errors                                   1 (100%) 
Total number of ebuilds with warnings                                 0 (  0%) 
Comment 10 SpanKY gentoo-dev 2002-10-17 17:38:26 UTC
yeah, ive noticed the problem when passing multiple ebuilds ... 
when a bug was submitted about lintool, i would do like: 
cd /usr/portage/sys-apps 
lintool --show-details */*.ebuild 
 
and i wouldnt get the same results as the reporter ... he had more warnings 
than i did ... (RDEPEND being the biggest one i think ... then again it could 
be that there are a lot of ebuild's that dont define that ...) 
Comment 11 SpanKY gentoo-dev 2002-10-18 15:27:57 UTC
when running `lintool --show-separate --show-details`, i find it pretty useful 
to parse out the 'passed' lines ...

lintool --show-separate --show-details */*.ebuild | grep -v passed | more

it makes going through the ebuilds a lot faster because i get output that only 
shows errors ...

-------------------------------------------------------------------------------
 Status for feh/feh-1.2.0.ebuild


-------------------------------------------------------------------------------
 Status for gimp-freetype/gimp-freetype-0.2-r2.ebuild

- (W) Has illegal white space (marked by %), only one space character allowed:
 |      --sysconfdir=/etc/gimp/1.2/%\

-------------------------------------------------------------------------------
 Status for gimp-print/gimp-print-4.2.1.ebuild


-------------------------------------------------------------------------------
 Status for gimp-print/gimp-print-4.2.2.ebuild
Comment 12 SpanKY gentoo-dev 2002-10-18 15:35:59 UTC
not sure whats causing this, but when you use lintool on the ebuild 
media-gfx/povray/povray-3.1g-r5.ebuild, you get this error:

 Status for povray/povray-3.1g-r5.ebuild

* Testing for sane USE flag usage                                       : failed
- (E) Unknown USE flag 'version'
Comment 13 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-10-18 15:44:22 UTC
Should add tests for IUSE and sanctioned KEYWORDS.
Comment 14 Nicolas Kaiser 2002-10-18 15:55:24 UTC
Awareness of environment variables that are inherited from eclasses would be 
nice as well. 
Comment 15 SpanKY gentoo-dev 2002-10-18 18:07:26 UTC
*** Bug 9296 has been marked as a duplicate of this bug. ***
Comment 16 SpanKY gentoo-dev 2002-10-18 21:33:09 UTC
multi-line strings might want to be handled too ...

echo "
what a use with test blalasdfasdf
"

this gets detected as having invalid USE variable 'with'
Comment 17 SpanKY gentoo-dev 2002-10-18 21:44:54 UTC
are variables parsed correctly if they arent padded with "" ?

i had an ebuild that was 'LICENSE=GPL' and it wasnt detected as being 
invalid ... but another ebuild that was 'LICENSE="GPL"' was detected as invalid
Comment 18 Nicolas Kaiser 2002-10-20 15:43:36 UTC
Lintool 0.2.3, "lintool --changelog" has problems with categories that contain
numbers, like "x11-plugins".
Do you like this patch?

diff -u /usr/lib/python2.2/site-packages/lintool/test.py.orig
/usr/lib/python2.2/site-packages/lintool/test.py
--- /usr/lib/python2.2/site-packages/lintool/test.py.orig       2002-10-20
22:33:56.000000000 +0200
+++ /usr/lib/python2.2/site-packages/lintool/test.py    2002-10-20
21:34:58.000000000 +0200
@@ -26,5 +26,5 @@
   PN       = "[a-zA-Z_.-]+"
   PV       = "[a-z0-9A-Z_.-]+"
   P        =  PN + "-" + PV + "(-r[0-9]+)?"
-  category = "[a-z]+-[a-z]+"
+  category = "[a-z0-9]+-[a-z0-9]+"
   full     = category + "/" + P
Comment 19 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-10-30 17:38:41 UTC
Some of these issues are fixed in lintool-0.2.4. I'm not sure I'll bother
handling all, but the easiest have been fixed.
Comment 20 Zach Welch (RETIRED) gentoo-dev 2002-11-28 07:55:45 UTC
This bug is a complete abuse of Bugzilla.  Given that Karl has addressed    
some of these issues in 0.2.4. I am resolving this bug, and any remaining    
issues can be reopened as new INDIVIDUAL bugs.  But for everyone's sake (users   
and devs), each bug needs to be reported seperately - not lumped together   
like this.   
   
If someone forwards me a mail of which Comment's are still valid, I would be  
happy to do this administrivia myself.  But please use Bugzilla properly or  
this kind of chaos will spread. :)  Reasoning: searching is ruined like this, 
and things will end up sliping through the cracks.  If you really want a 
problem solved, make it stand on its own.  Dependency tracking would have 
been the best way to have dealt with these bugs; starting one bug and  
making all others parented from it.  I'll do that too, if someone desires.