Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] conf: Enable to set rsync extra opts per repository
Date: Wed, 17 Jun 2015 20:32:24
Message-Id: 20150617133217.303b3b68.dolsen@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] conf: Enable to set rsync extra opts per repository by "Étienne Buira"
1 Be aware that I have not read over the diff very much yet.
2
3 On Wed, 17 Jun 2015 20:40:30 +0200
4 Étienne Buira <etienne.buira@×××××.com> wrote:
5
6 > ---
7 > man/portage.5 | 5 +++
8 > pym/portage/package/ebuild/config.py | 2 +
9 > pym/portage/repository/config.py | 24 +++++++---
10 > pym/portage/sync/modules/rsync/rsync.py | 6 ++-
11 > pym/portage/tests/sync/test_sync_local.py | 73
12 > ++++++++++++++++++++++++++++--- 5 files changed, 95 insertions(+), 15
13 > deletions(-)
14 >
15
16 ...
17
18 > diff --git a/pym/portage/package/ebuild/config.py
19 > b/pym/portage/package/ebuild/config.py index 3a4007b..08db363 100644
20 > --- a/pym/portage/package/ebuild/config.py
21 > +++ b/pym/portage/package/ebuild/config.py
22 > @@ -515,6 +515,8 @@ class config(object):
23 > v = confs.get("SYNC")
24 > if v is not None:
25 > portdir_sync = v
26 > + if 'PORTAGE_RSYNC_EXTRA_OPTS' in
27 > confs:
28 > +
29 > self['PORTAGE_RSYNC_EXTRA_OPTS'] = confs['PORTAGE_RSYNC_EXTRA_OPTS']
30 > self["PORTDIR"] = portdir
31 > self["PORTDIR_OVERLAY"] = portdir_overlay
32
33 Not sure why ebuild/config.py needs changes... will look at it more
34
35
36
37 > diff --git a/pym/portage/repository/config.py
38 > b/pym/portage/repository/config.py index b7c969d..196b87a 100644
39 > --- a/pym/portage/repository/config.py
40 > +++ b/pym/portage/repository/config.py
41
42
43 This approach is not wanted, it means hard coding any sync module
44 options in the main loader that might be sync-type specific.
45
46 We want to make it generic so any arbitrary sync-type options (more
47 than the base required options) can be added for any module without the
48 need to change this. Those options are not used anywhere else other
49 than the sync module.
50
51 One method might be to replace the copying of the configparser options
52 into python variables. Instead change it to look for the option in the
53 configparser instance. And only maintain some base options or
54 functions which pull from the config instance.
55
56
57
58
59
60
61 --
62 Brian Dolbec <dolsen>

Replies

Subject Author
Re: [gentoo-portage-dev] [PATCH] conf: Enable to set rsync extra opts per repository "Étienne Buira" <etienne.buira@×××××.com>
[gentoo-portage-dev] [PATCH v2 1/2] sync: allow sync modules to have specific options "Étienne Buira" <etienne.buira@×××××.com>