Be aware that I have not read over the diff very much yet.  

On Wed, 17 Jun 2015 20:40:30 +0200
Étienne Buira <[email protected]> wrote:

> ---
>  man/portage.5                             |  5 +++
>  pym/portage/package/ebuild/config.py      |  2 +
>  pym/portage/repository/config.py          | 24 +++++++---
>  pym/portage/sync/modules/rsync/rsync.py   |  6 ++-
>  pym/portage/tests/sync/test_sync_local.py | 73
> ++++++++++++++++++++++++++++--- 5 files changed, 95 insertions(+), 15
> deletions(-)
> 

...

> diff --git a/pym/portage/package/ebuild/config.py
> b/pym/portage/package/ebuild/config.py index 3a4007b..08db363 100644
> --- a/pym/portage/package/ebuild/config.py
> +++ b/pym/portage/package/ebuild/config.py
> @@ -515,6 +515,8 @@ class config(object):
>                               v = confs.get("SYNC")
>                               if v is not None:
>                                       portdir_sync = v
> +                             if 'PORTAGE_RSYNC_EXTRA_OPTS' in
> confs:
> +
> self['PORTAGE_RSYNC_EXTRA_OPTS'] = confs['PORTAGE_RSYNC_EXTRA_OPTS'] 
>                       self["PORTDIR"] = portdir
>                       self["PORTDIR_OVERLAY"] = portdir_overlay

Not sure why ebuild/config.py needs changes... will look at it more



> diff --git a/pym/portage/repository/config.py
> b/pym/portage/repository/config.py index b7c969d..196b87a 100644
> --- a/pym/portage/repository/config.py
> +++ b/pym/portage/repository/config.py


This approach is not wanted, it means hard coding any sync module
options in the main loader that might be sync-type specific.

We want to make it generic so any arbitrary sync-type options (more
than the base required options) can be added for any module without the
need to change this. Those options are not used anywhere else other
than the sync module.

One method might be to replace the copying of the configparser options
into python variables.  Instead change it to look for the option in the
configparser instance.  And only maintain some base options or
functions which pull from the config instance.






-- 
Brian Dolbec <dolsen>


Reply via email to