Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 20323 Details for
Bug 32853
eupdatedb output is cluttered when used with cron (or piped) - patch included
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to enable quiet switch
eupdatedb-quiet.patch (text/plain), 1.71 KB, created by
Eldad Zack (RETIRED)
on 2003-11-06 00:01:09 UTC
(
hide
)
Description:
patch to enable quiet switch
Filename:
MIME Type:
Creator:
Eldad Zack (RETIRED)
Created:
2003-11-06 00:01:09 UTC
Size:
1.71 KB
patch
obsolete
>--- /usr/sbin/eupdatedb 2003-11-03 09:06:19.000000000 +0200 >+++ eupdatedb 2003-11-06 09:46:36.000000000 +0200 >@@ -4,7 +4,8 @@ > > start = time() > >-from output import red, darkgreen, green, bold >+from output import red, darkgreen, green, bold, nocolor >+from getopt import * > from os import stat, unlink > from os.path import dirname > from shutil import copyfile >@@ -14,6 +15,36 @@ > esearchdbfile = "/var/cache/edb/esearchdb.py" > tmpfile = "/tmp/esearchdb.py.tmp" > >+try: >+ opts = getopt(sys.argv[1:], "qh", ["help","quiet"]) >+except GetoptError, error: >+ print red(" * Error:"), error, "(see", darkgreen("--help"), "for all options)" >+ print >+ sys.exit(1) >+ >+def usage(): >+ print "eupdatedb (0.4.1) - Updates esearch index" >+ print "" >+ print bold("Usage:"), "esearch [", darkgreen("options"), "] pattern" >+ print "" >+ print bold("Options:") >+ print darkgreen(" --help -h") >+ print " Print this help message" >+ print "" >+ print darkgreen(" --quiet -q") >+ print " Suppress messages and color" >+ print "" >+ >+ sys.exit(0) >+ >+for arg in opts[0]: >+ arg = arg[0] >+ if arg in ("-q", "--quiet"): >+ quiet = True >+ nocolor() >+ if arg in ("-h", "--help"): >+ usage() >+ > vartree = portage.vartree() > > def version(pkg): >@@ -68,10 +99,11 @@ > nr += 1 > masked = False > >- s = str(numebuilds - nr) + " ebuilds to go" >- sys.stdout.write((nrchars * "\b \b") + s) >- sys.stdout.flush() >- nrchars = len(s) >+ if (not quiet): >+ s = str(numebuilds - nr) + " ebuilds to go" >+ sys.stdout.write((nrchars * "\b \b") + s) >+ sys.stdout.flush() >+ nrchars = len(s) > > pkgv = portage.portdb.xmatch("bestmatch-visible", pkg) > if not pkgv:
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 32853
: 20323