| diff -ru esearch-0.7.1-r6/en/esync.1 esearch-0.7.1-r7/en/esync.1 |
| --- esearch-0.7.1-r6/en/esync.1 2009-01-02 10:53:39.000000000 -0600 |
| +++ esearch-0.7.1-r7/en/esync.1 2009-01-02 10:45:03.000000000 -0600 |
| @@ -1,34 +1,36 @@ |
| -.TH esearch 1 "February 13, 2005" "esync" |
| - |
| +.TH "esearch" "1" "February 13, 2005" "esync" "" |
| .SH "NAME" |
| -esync \- Calls 'emerge --sync' and 'eupdatedb' and shows updates |
| +esync \- Calls 'emerge \-\-sync' and 'eupdatedb' and shows updates |
| |
| .SH "SYNOPSIS" |
| .B esync |
| [ options ] |
| |
| .SH "DESCRIPTION" |
| -esync first imports the old esearch index, then calls 'emerge --sync' |
| +esync first imports the old esearch index, then calls 'emerge \-\-sync' |
| (or an alternative command: see options) and 'eupdatedb'. Then it |
| shows the new and the updated packages. |
| |
| .SH "OPTIONS" |
| -.TP |
| +.TP |
| .B \-\-help, \-h |
| Print help message |
| -.TP |
| +.TP |
| .B \-\-webrsync, \-w |
| -Use 'emerge-webrsync' instead of 'emerge --sync' |
| -.TP |
| +Use 'emerge\-webrsync' instead of 'emerge \-\-sync' |
| +.TP |
| .B \-\-metadata, \-m |
| -Use 'emerge --metadata' instead of 'emerge --sync' |
| -.TP |
| +Use 'emerge \-\-metadata' instead of 'emerge \-\-sync' |
| +.TP |
| .B \-\-nocolor, \-n |
| Don't use ANSI codes for colored output |
| -.TP |
| +.TP |
| +.B \-\-quiet, \\-q |
| +Less output (implies \-\-nospinner) |
| +.TP |
| .B \-\-verbose, \-v |
| Verbose output |
| -.TP |
| +.TP |
| .B \-\-nospinner, \s |
| Don't display the remaining index count |
| |
| diff -ru esearch-0.7.1-r6/esync.py esearch-0.7.1-r7/esync.py |
| --- esearch-0.7.1-r6/esync.py 2009-01-02 10:53:40.000000000 -0600 |
| +++ esearch-0.7.1-r7/esync.py 2009-01-02 10:50:59.000000000 -0600 |
| @@ -35,6 +35,7 @@ |
| eupdatedb_extra_options = "" |
| showtitles = "notitles" not in portage.features |
| verbose = False |
| +quiet = False |
| |
| def usage(): |
| print "esync (0.7.1) - Calls 'emerge sync' and 'eupdatedb' and shows updates" |
| @@ -53,6 +54,9 @@ |
| print darkgreen(" --nocolor") + ", " + darkgreen("-n") |
| print " Don't use ANSI codes for colored output" |
| print "" |
| + print darkgreen(" --quiet") + ", " + darkgreen("-q") |
| + print " Less output (implies --nospinner)" |
| + print "" |
| print darkgreen(" --verbose") + ", " + darkgreen("-v") |
| print " Verbose output" |
| print "" |
| @@ -63,7 +67,7 @@ |
| sys.exit(0) |
| |
| try: |
| - opts = getopt(sys.argv[1:], "hwmnvs", ["help", "webrsync", "nocolor", "verbose", "metadata", "nospinner"]) |
| + opts = getopt(sys.argv[1:], "hwmnvs", ["help", "webrsync", "nocolor", "quiet", "verbose", "metadata", "nospinner"]) |
| except GetoptError, error: |
| print red(" * Error:"), error, "(see", darkgreen("--help"), "for all options)" |
| print |
| @@ -82,8 +86,13 @@ |
| eoptions = "-n" |
| nocolor() |
| showtitles = False |
| + elif arg in ("-q", "--quiet"): |
| + eupdatedb_extra_options = "-q" |
| + quiet = True |
| + verbose = False |
| elif arg in ("-v", "--verbose"): |
| verbose = True |
| + quiet = False |
| elif arg in ("-s", "--nospinner"): |
| eupdatedb_extra_options = "-q" |
| |
| @@ -92,6 +101,7 @@ |
| global showtitles |
| if showtitles: |
| xtermTitle(msg) |
| + if quiet: return |
| print green(" *"), msg |
| |
| def outofdateerror(): |
| @@ -131,9 +141,9 @@ |
| |
| tree_old = gettree("old") |
| |
| -emsg("Doing '" + syncprogram + "' now") |
| +if not quiet: emsg("Doing '" + syncprogram + "' now") |
| |
| -if verbose == True: |
| +if verbose: |
| errorcode = os.system(syncprogram + " | tee " + logfile_sync + " 2>&1") |
| else: |
| errorcode = os.system(syncprogram + " > " + logfile_sync + " 2>&1") |
| @@ -143,16 +153,17 @@ |
| print "" |
| sys.exit(1) |
| |
| -print "" |
| +if not quiet: |
| + print "" |
| + emsg("Doing 'eupdatedb' now") |
| + print "" |
| |
| -emsg("Doing 'eupdatedb' now") |
| -print "" |
| if os.system("/usr/sbin/eupdatedb " + eoptions + " " + eupdatedb_extra_options) != 0: |
| print "" |
| print red(" * Error:"), "eupdatedb failed" |
| sys.exit(1) |
| |
| -print "" |
| +if not quiet: print "" |
| |
| tree_new = gettree("new") |
| |
| @@ -181,6 +192,7 @@ |
| if (pkg not in old_keys) or (old[pkg] != new[pkg]): |
| os.system("/usr/bin/esearch " + eoptions + " -Fc ^" + pkg + "$ | head -n1") |
| haspkg = True |
| + break |
| |
| if not haspkg: |
| emsg("No updates found") |