Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 14644 Details for
Bug 24684
ebuild python script clean-up
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
ebuild.diff (text/plain), 1.41 KB, created by
Jason A. Mobarak (RETIRED)
on 2003-07-17 17:12:53 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Jason A. Mobarak (RETIRED)
Created:
2003-07-17 17:12:53 UTC
Size:
1.41 KB
patch
obsolete
>--- ebuild 2003-07-09 00:02:06.000000000 -0700 >+++ /usr/sbin/ebuild 2003-07-17 18:04:45.000000000 -0700 >@@ -5,38 +5,30 @@ > > import os > import sys >+import output > > def getroot(): > try: >- a=os.environ["ROOT"] >- except: >- return "/" >- return os.path.normpath(a+"/") >- >-os.environ["PORTAGE_CALLER"]="ebuild" >- >-if len(sys.argv)<=2: >- print "expecting two arguments." >- sys.exit(1) >+ root_dir = os.environ['ROOT'] >+ except KeyError: >+ return '/' >+ return os.path.normpath(root_dir + '/') >+ >+err = lambda S: output.red('Error: ') + output.bold(S) >+ >+os.environ['PORTAGE_CALLER']='ebuild' >+if len(sys.argv) <= 2: raise SystemExit, err('expecting two arguments.') > > import portage > import getopt > >-debug=0 >- >-opts,pargs=getopt.getopt(sys.argv[1:],'',['debug']) >-for opt in opts: >- if opt[0]=='--debug': >- debug=1 >- >+debug = False >+opts, pargs = getopt.getopt(sys.argv[1:], '', ['debug']) >+if '--debug' in map(lambda L: L[0], opts): debug = True > for x in pargs[1:]: > try: >- a=portage.doebuild(pargs[0],x,getroot(),debug=debug) >+ portage.doebuild(pargs[0],x,getroot(),debug=debug) > except KeyboardInterrupt: >- print "(interrupted by user -- ctrl-C?)" >- a=1 >+ raise SystemExit, err('interrupted by user -- ctrl-C?') > except IOError: >- a=1 >- print "ebuild: this ebuild generated output during the depend phase (bad)" >- if a: >- sys.exit(a) >+ raise SystemExit, err('ebuild: this ebuild generated output during the depend phase (bad)')
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 24684
:
14636
|
14637
|
14638
| 14644