Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 57030 - add --nospinner to esync
Summary: add --nospinner to esync
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-14 08:12 UTC by Thomas Buntrock
Modified: 2004-10-04 16:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for --nospinner (esync.diff,1.27 KB, patch)
2004-07-14 08:17 UTC, Thomas Buntrock
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Buntrock 2004-07-14 08:12:01 UTC
Hi,

in order to have esync run by cron I have added a --nospinner option,
turning off the remaining index update spinner. 

Here is the diff:

--- esync.orig  2004-07-14 15:24:28.035572645 +0200
+++ esync       2004-07-14 16:45:21.222994489 +0200
@@ -28,6 +28,7 @@
 sys.path.append("/tmp")
 
 eoptions = ""
+eupdatedb_extra_options = ""
 showtitles = True
 verbose = False
 
@@ -47,12 +48,15 @@
     print ""
     print darkgreen("  --verbose") + ", " + darkgreen("-v")
     print "    Verbose output"
+    print ""
+    print darkgreen("  --nospinner")
+    print "    Don't display the remaining index count"
 
 
     sys.exit(0)
 
 try:
-    opts = getopt(sys.argv[1:], "hwnv", ["help", "webrsync", "nocolor", "verbose"])
+    opts = getopt(sys.argv[1:], "hwnv", ["help", "webrsync", "nocolor", "verbose", "nospinner"])
 except GetoptError, error:
     print red(" * Error:"), error, "(see", darkgreen("--help"), "for all options)"
     print
@@ -71,6 +75,9 @@
         showtitles = False
     elif arg in ("-v", "--verbose"):
         verbose = True
+    elif arg in ("--nospinner"):
+       eupdatedb_extra_options = "-q"
+
 
 def emsg(msg):
     global showtitles
@@ -117,7 +124,7 @@
 
 emsg("Doing 'eupdatedb' now")
 print ""
-if os.system("/usr/sbin/eupdatedb " + eoptions) != 0:
+if os.system("/usr/sbin/eupdatedb " + eoptions + " " + eupdatedb_extra_options) != 0:
     print ""
     print red(" * Error:"), "eupdatedb failed"
     sys.exit(1)
Comment 1 Thomas Buntrock 2004-07-14 08:17:20 UTC
Created attachment 35398 [details, diff]
patch for --nospinner
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2004-07-14 08:17:43 UTC
Please send it to the esearch author.
Comment 3 SpanKY gentoo-dev 2004-08-18 08:36:29 UTC
david seems to be alive again :)
Comment 4 David Peter 2004-09-15 03:21:14 UTC
The patch is included now (back from 7 week-holidays). It will be released with esearch-0.7.

Thanks,
David
Comment 5 Marius Mauch (RETIRED) gentoo-dev 2004-10-04 16:32:28 UTC
esearch 0.7 in CVS