I use PORTAGE_RSYNC_EXTRA_OPTS='--delete-excluded --prune-empty-dirs --filter=". /etc/portage/rsync.filter"' with rsync.filter being a list of portage directories I want, like so: + /www-misc/*** + /www-servers/*** + */ - * Works like a charm in portage-2.1.1-r2. In later versions (tested: portage-2.1.2.7) this results in: # emerge --sync >>> Starting rsync with rsync://212.79.254.44/gentoo-portage... >>> Checking server timestamp ... unexpected end of filter rule: . rsync error: syntax or usage error (code 1) at exclude.c(846) [client=2.6.9] !!! Rsync has reported that there is a syntax error. Please ensure !!! that your SYNC statement is proper. !!! SYNC=rsync://rsync5.nl.gentoo.org/gentoo-portage Reproducible: Always Steps to Reproduce: 1. Install >=sys-apps/portage-2.1.2-r9 2. Use PORTAGE_RSYNC_EXTRA_OPTS='--delete-excluded --prune-empty-dirs --filter=". /etc/portage/rsync.filter"' and SYNC="rsync://rsync5.nl.gentoo.org/gentoo-portage" in make.conf 3. Make file /etc/portage/rsync.filter containing + /www-misc/*** + /www-servers/*** + */ - * 5. Run 'emerge --sync' Actual Results: The sync fails with: >>> Checking server timestamp ... unexpected end of filter rule: . rsync error: syntax or usage error (code 1) at exclude.c(846) [client=2.6.9] !!! Rsync has reported that there is a syntax error. Please ensure !!! that your SYNC statement is proper. !!! SYNC=rsync://rsync5.nl.gentoo.org/gentoo-portage Expected Results: Should sync the directories listed in /etc/portage/rsync.filter .
emerge --oneshot rsync *** This bug has been marked as a duplicate of bug 167668 ***
1) Remerging rsync does not solve this 2) How is this related to #167668 ?
This is fixed in svn r6491:6493 and released in portage-2.1.2.7. Please reopen if 2.1.2.7 doesn't work for you.
Reopening because 2.1.2.7 doesn't work for me ;-)
(In reply to comment #0) > I use PORTAGE_RSYNC_EXTRA_OPTS='--delete-excluded --prune-empty-dirs > --filter=". /etc/portage/rsync.filter"' At the moment, the cleanest way to do it is to use --filter=._/etc/portage/rsync.filter since rsync supports using an underscore instead of a space there. You could use \" to escape the quotes but that's not ideal because we'd like make.conf to be a bash compatible subset of standard shell syntax.
Created attachment 118605 [details, diff] do not remove quotes when expanding make.conf variables This patch will make it behave in a more shell-compatible manner. Instead of removing quotes during variable expansion, it will preserve them. The quotes will be removed later when the command is split into arguments for execution.
--filter=._/etc/portage/rsync.filter works wonders. Thanks man! Didn't try the patch though.
This has been released in 2.1.2.8.