repos.conf should support attributes specifying options for VCS programs. One attribute with options for `cvs checkout`/`svn checkout`/`git clone`/`hg clone` and another attribute with options for `cvs update`/`svn update`/`git pull`/`hg pull` should suffice. Possible names of attributes: sync-vcs-checkout-args sync-vcs-update-args I suggest to support 2 variants of syntax: attribute = arg1 arg2 arg3 ... attribute = ["arg1", "arg2", "arg3", ...] This will allow to embed spaces in arguments. Example use case: Funtoo wants to use `git clone --depth=1` for the merged tree.
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #0) > > Possible names of attributes: > sync-vcs-checkout-args > sync-vcs-update-args YUK! There is no need to individualize them in the new sync code. checkout-args update-args Then the config check can be standardized in pym/portage/sync/config_checks.py's CheckSyncConfig base class. Then a sync module only needs to use it or override that check with custom code if need be. These variables would need to be defined in each repo's section, not global in nature. Of course their absence would default to '' or None. It should also be do-able for layman to extend it's capabilities similarly for all those repo types that are capable. So far there is only global repo type options for those, but individualized repo options were always planned. > I suggest to support 2 variants of syntax: > attribute = arg1 arg2 arg3 ... > attribute = ["arg1", "arg2", "arg3", ...] > This will allow to embed spaces in arguments. > I don't know that the python standard configparser can handle python arrays like that. I believe that required an add on python module to support that. > > Example use case: > Funtoo wants to use `git clone --depth=1` for the merged tree.
(In reply to Brian Dolbec from comment #1) > (In reply to Arfrever Frehtes Taifersar Arahesis from comment #0) > > Possible names of attributes: > > sync-vcs-checkout-args > > sync-vcs-update-args > > There is no need to individualize them in the new sync code. > > checkout-args > update-args I think that synchronization-related attributes should have "sync-" prefix. > > I suggest to support 2 variants of syntax: > > attribute = arg1 arg2 arg3 ... > > attribute = ["arg1", "arg2", "arg3", ...] > > This will allow to embed spaces in arguments. > > I don't know that the python standard configparser can handle python arrays > like that. I believe that required an add on python module to support that. It can be done manually in very easy way: >>> value = '["arg1", "arg2", "arg3"]' >>> value '["arg1", "arg2", "arg3"]' >>> if value.startswith("[") and value.endswith("]"): ... value = eval(value) ... >>> value ['arg1', 'arg2', 'arg3'] >>>
I think we'd use some design that would allow us to keep the repository at --depth=1. Specifically: 1. clone with --depth=N, 2. fetch normally, 3. strip history after fetching. Not sure if the usual dedicated option for adjusting everything nonsense is the best way to achieve this.
How is the status here?
sync-depth has been added so far and will be in the 2.2.16 release.
I was look for a way to add "-q" to git pull as some "normal" output goes to stderr which is not nice if you run sync processes via cron and only like to get real errors by mail.