Thursday, May 28, 2015

less portage rsync output

Ever thought how to silence rsync when doing emerge --sync (or eix-sync). Sure, it's nice when we get lots of information. But it's like with compiling packages - The first few years it's amazing looking at the terminal while it's compiling the latest stuff. However, after a while these things become a bit boring.
While we have --quite-build for emerge, rsync per default outputs every single file which gets transferred and deleted. Luckily, recent versions of rsync, which also went already stable, support new ways of progress output and since i use them already on other scripts i decided to modify my portage rsync settings a bit:


The output looks similar like that:

Neat, isn't it?
BTW, in order this works correctly - the remote rsync server need to run a recent version of rsync as well.


  1. Nice! Unfortunately out of the 85 rsync mirrors only 30 have new enough rsync daemon to support this. 47 have too old rsync, and 8 of them didn't work for me.

    BTW, I didn't want do parse the xml myself, but mirrorselect doesn't output more than 1 rsync mirror, so I snapped this together:

    #!/usr/bin/env python3

    from mirrorselect.mirrorparser3 import MIRRORS_RSYNC_DATA
    from mirrorselect.main import MirrorSelect
    from mirrorselect.extractor import Extractor
    from mirrorselect.output import Output

    ms = MirrorSelect()
    options = ms._parse_args([], '/dev/null')
    extractor = Extractor(MIRRORS_RSYNC_DATA, options, Output())
    hosts = extractor.unfiltered_hosts
    for host,_ in hosts:
    # etc

  2. Wow, i haven't checked the public rsync mirrors (i use my own mirror which sync once a day at night), but i'm a bit surprised that so few have a recent version.
    Anyway i think it will get better over time.
    BTW, thx for the script :)