From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B92B1138CEB for ; Wed, 17 Jun 2015 20:32:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E9A6914042; Wed, 17 Jun 2015 20:32:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 714691403F for ; Wed, 17 Jun 2015 20:32:21 +0000 (UTC) Received: from big_daddy.dol-sen.ca (S010634bdfa9ecf80.vc.shawcable.net [96.49.31.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id 6FBD5340A4A for ; Wed, 17 Jun 2015 20:32:20 +0000 (UTC) Date: Wed, 17 Jun 2015 13:32:17 -0700 From: Brian Dolbec To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH] conf: Enable to set rsync extra opts per repository Message-ID: <20150617133217.303b3b68.dolsen@gentoo.org> In-Reply-To: <20150617184030.GC26811@rcKGHUlyQfVFW> References: <20150617184030.GC26811@rcKGHUlyQfVFW> Organization: Gentoo Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 8d3be02c-bce5-4d00-817c-9e78497ecd0c X-Archives-Hash: 95b343cf86fcdda3a36448be4b52f89e Be aware that I have not read over the diff very much yet. =20 On Wed, 17 Jun 2015 20:40:30 +0200 =C3=89tienne Buira 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(-) >=20 ... > 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 =3D confs.get("SYNC") > if v is not None: > portdir_sync =3D v > + if 'PORTAGE_RSYNC_EXTRA_OPTS' in > confs: > + > self['PORTAGE_RSYNC_EXTRA_OPTS'] =3D confs['PORTAGE_RSYNC_EXTRA_OPTS']=20 > self["PORTDIR"] =3D portdir > self["PORTDIR_OVERLAY"] =3D 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. --=20 Brian Dolbec