Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39727 - emerge sync is too noisy for scripts
Summary: emerge sync is too noisy for scripts
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-01-28 23:08 UTC by Andrea Cerrito
Modified: 2004-10-22 08:48 UTC (History)
0 users

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


Attachments
rsync-noprogress.patch (made against _pre208) (rsync-noprogress.patch,351 bytes, patch)
2004-02-04 14:33 UTC, TGL
Details | Diff
rsync-noprogress.patch (rsync-noprogress.patch,383 bytes, patch)
2004-02-05 13:59 UTC, TGL
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Cerrito 2004-01-28 23:08:47 UTC
If a sysadmin try to automate the sync of his workstations, he may note that emerge sync is not so useful with simple bash scripts.

Sync must have a "quiet" option, to permit the admin to see what's going on even when no errors occurred. Think about a situation where the admin wants to see the sync procedure without reading all the verbose output from the rsync command. I mean:

--- snip
> A dutch RSYNC mirror @ the Leiden University [ gentoo@rsync4.nl.gentoo.org ]

Have fun with Gentoo!

receiving file list ...
1 file to consider
timestamp.chk
          32 100%    0.00kB/s    0:00:00

Number of files: 1
Number of files transferred: 1
Total file size: 32 bytes
Total transferred file size: 32 bytes
Literal data: 32 bytes
Matched data: 0 bytes
File list size: 32
Total bytes written: 205
Total bytes read: 243

wrote 205 bytes  read 243 bytes  99.56 bytes/sec
total size is 32  speedup is 0.07
> A dutch RSYNC mirror @ the Leiden University [ gentoo@rsync4.nl.gentoo.org ]

Have fun with Gentoo!

receiving file list ...
 100 files...
 200 files...
 300 files...
 400 files...
 500 files...
 600 files...
 700 files...
 800 files...
 900 files...
---snip
and so on...
I think that there might be a variable to set the rsync command in make.conf.

Reproducible: Always
Steps to Reproduce:
1. emerge sync 2>&1 > log
2. cat log
3.
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2004-02-01 11:39:59 UTC
emerge -q sync
emerge    sync
emerge -v sync

2.0.50_pre22
Comment 2 TGL 2004-02-04 14:33:34 UTC
Created attachment 24961 [details, diff]
rsync-noprogress.patch (made against _pre208)

Nick, could you also consider this one line change please? I think it's useful
when you call emerge sync from a script and want to filter the normal output,
for instance to list new ebuilds or things like that. In that case, the
--progress output with all its escape codes is real garbage. Thanks.
Comment 3 Andrea Cerrito 2004-02-05 00:32:40 UTC
Great job.
Two other things:

* -q should automatically include --nospinner;
* what about emerge -qs package
Searching...
[ Results for search key : package ]
[ Applications found : 2 ]

*  media-libs/package-lib : Installed: 1.2, Available: 1.3
*  media-plugins/package-plugin : Not installed
Comment 4 TGL 2004-02-05 13:59:48 UTC
Created attachment 25033 [details, diff]
rsync-noprogress.patch

Talking about --nospinner, it should also disable rsync "--progress".
Comment 5 Nicholas Jones (RETIRED) gentoo-dev 2004-10-22 08:48:12 UTC
Bug has been fixed and released in stable portages on or before 2.0.51-r2