Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 5095 Details for
Bug 9788
patch to allow lintool to include inherited eclasses
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to parse parent classes for ebuilds
lint.patch (text/plain), 1.54 KB, created by
Jonathan Nall
on 2002-10-27 16:55:24 UTC
(
hide
)
Description:
patch to parse parent classes for ebuilds
Filename:
MIME Type:
Creator:
Jonathan Nall
Created:
2002-10-27 16:55:24 UTC
Size:
1.54 KB
patch
obsolete
>--- /usr/bin/lintool 2002-10-27 15:54:51.000000000 -0600 >+++ /tmp/lintool 2002-10-27 16:52:33.000000000 -0600 >@@ -324,13 +324,46 @@ > def extractFilename(path): > return path > >-def runTests(tests,results,ins): >- for j in tests: >- j.reset() >+def runTests(tests,results,ins,recurse = 0,seen_base_classes=[]): >+ inh_re = re.compile("^inherit (.*)") > >- for i in ins.readlines(): >+ # don't reset things if we're an included parent class >+ if recurse == 0: > for j in tests: >- j.checkLine(i) >+ j.reset() >+ >+ for i in ins.readlines(): >+ >+ # check to see if this is an inherit instruction >+ # if it is, recurse into this function >+ # this causes the "include" behavior >+ inh = inh_re.match(i); >+ if inh: >+ base_classes = inh.group(1).split(" ") >+ for base_class in base_classes: >+ # make sure we haven't seen this guy before >+ # i don't think we should include things twice >+ # should this ever even happen? >+ ok_to_include = 1 >+ for already_seen in seen_base_classes: >+ if base_class == already_seen: >+ ok_to_include = 0 >+ >+ if ok_to_include == 1: >+ inh_file = open("/usr/portage/eclass/" + base_class + ".eclass","r") >+ seen_base_classes.append(base_class) >+ runTests(tests,results,inh_file,1,seen_base_classes) >+ #else: >+ # print "NOT RE-INHERITING: " + base_class >+ >+ # or maybe this is a regular line. if so just parse it >+ else: >+ for j in tests: >+ j.checkLine(i) >+ >+ # bug out if we're just an included parent class >+ if recurse == 1: >+ return > > hasWarning = 0 > hasError = 0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 9788
:
5095
|
5235