Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 24094 Details for
Bug 32737
Compiling external kernel modules with 2.6 kernels
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to get KV set using /usr/src/linux/Makefile
portage.py-KV-method.diff (text/plain), 1.42 KB, created by
Peter Johanson (RETIRED)
on 2004-01-19 13:13:52 UTC
(
hide
)
Description:
Patch to get KV set using /usr/src/linux/Makefile
Filename:
MIME Type:
Creator:
Peter Johanson (RETIRED)
Created:
2004-01-19 13:13:52 UTC
Size:
1.42 KB
patch
obsolete
>--- portage.py.orig 2004-01-18 05:41:58.991245096 -0500 >+++ portage.py 2004-01-18 06:36:29.424063736 -0500 >@@ -922,30 +922,40 @@ > # version is None and error is a string > # > def ExtractKernelVersion(base_dir): >- pathname = os.path.join(base_dir, 'include/linux/version.h') >+ lines = [] >+ pathname = os.path.join(base_dir, 'Makefile') > try: >- lines = open(pathname, 'r').readlines() >+ f = open(pathname, 'r') > except OSError, details: > return (None, str(details)) > except IOError, details: > return (None, str(details)) > >+ try: >+ for i in range(4): >+ lines.append(f.readline()) >+ except OSError, details: >+ return (None, str(details)) >+ except IOError, details: >+ return (None, str(details)) >+ > lines = map(string.strip, lines) > > version = '' > > for line in lines: >- items = string.split(line, ' ', 2) >- if items[0] == '#define' and \ >- items[1] == 'UTS_RELEASE': >- version = items[2] # - may be wrapped in quotes >- break >- >- if version == '': >- return (None, "Unable to locate UTS_RELEASE in %s" % (pathname)) >+ items = string.split(line, ' ') >+ if items[0] == 'VERSION' or \ >+ items[0] == 'PATCHLEVEL': >+ version += items[2] >+ version += "." >+ elif items[0] == 'SUBLEVEL': >+ version += items[2] >+ elif items[0] == 'EXTRAVERSION' and \ >+ items[-1] != '=': >+ version += "-" >+ version += items[2] > >- if version[0] == '"' and version[-1] == '"': >- version = version[1:-1] > return (version,None) > > aumtime=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 32737
:
23927
|
24094
|
24095
|
24096
|
24131
|
24646
|
24647
|
24649
|
24650
|
24651
|
25235
|
25237
|
25238
|
25239
|
25279
|
25280
|
25281
|
25282
|
25283
|
25363
|
25453
|
25454
|
25497
|
26588
|
26635
|
26643
|
27538
|
30030
|
31314
|
31315
|
31317
|
31345
|
31346
|
31347
|
32935
|
33123
|
33124
|
33125
|
33356
|
36615