From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-portage-dev+bounces-3442-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 88A58138A1F for <garchives@archives.gentoo.org>; Fri, 31 Jan 2014 05:31:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9A1DDE0C18; Fri, 31 Jan 2014 05:31:42 +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 0090BE0C13 for <gentoo-portage-dev@lists.gentoo.org>; Fri, 31 Jan 2014 05:31:41 +0000 (UTC) Received: from big_daddy.dol-sen.ca (S010600222de111ff.vc.shawcable.net [96.49.5.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0131C33F881 for <gentoo-portage-dev@lists.gentoo.org>; Fri, 31 Jan 2014 05:31:40 +0000 (UTC) Date: Thu, 30 Jan 2014 21:27:29 -0800 From: Brian Dolbec <dolsen@gentoo.org> To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] New proposed modular sync system Message-ID: <20140130212729.4826fc2f@big_daddy.dol-sen.ca> In-Reply-To: <1389288831.7103.75.camel@big_daddy.dol-sen.ca> References: <1389288831.7103.75.camel@big_daddy.dol-sen.ca> Organization: Gentoo X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; x86_64-pc-linux-gnu) Precedence: bulk List-Post: <mailto:gentoo-portage-dev@lists.gentoo.org> List-Help: <mailto:gentoo-portage-dev+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-portage-dev+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-portage-dev+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-portage-dev.gentoo.org> 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=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 68945781-dc9f-4662-9685-a00f9530eb6a X-Archives-Hash: 6414358abbe7dc583659cae4b823c49f On Thu, 09 Jan 2014 09:33:51 -0800 Brian Dolbec <dolsen@gentoo.org> wrote: > > I have started a Proposals sub-page under the Portage project page in > the wiki. It has a link to a diagram I made showing how the plug-in > system is laid out. This thread will be used to discuss the proposal > and the details needed for the module_spec dictionary that is used to > provide the manager with the details of what a module provides, > options, etc.. > > For a working example of the system in action, just try out emaint -h, > and some other actions it provides. Then move one of it's modules out > of the the emaint/modules/ directory and re-try emaint -h. You will > see the options for that module and it's actions are no longer > available. No code editing was required, no errors occurred,... Put > it back, retry... > > The modular sync system I propose would re-use that plug-in manager to > interface the sync manager code with the modules that perform the sync > actions. This sytem is easily extended with new modules for different > transfer methods or VCS specific modules. > STATUS UPDATE: I have pushed the plugin-sync branch to the main portage.git repo on g.o.g.o [1]. It has working and tested code for the rsync and git modules. The CVS module I have not yet tested or done any debugging on. First off, let me state that this is only minimally changed code to make it function. It is by no means ready for any code review other than for general program structure and the data that we need/want to pass between the controller and the modules. I have updated the Proposal page [2] with more things to do as well as some insights I discovered during the initial porting. Next up for discussion is what additional functionality should a module supply? I think it should provide a list or dictionary of the repos.conf variables it needs or uses. I also think that the module should provide a function for validating the conf variables meet some minimum standard/obvious error checking. For a more involved example of the types of information that can be passed through the module_spec see the working emaint logs module file [3]. The information required/provided does not affect the plugin system. It is a standard set up by the controller and the modules requirements. So, please look over the code, avoid commenting on the poor code quality just yet. Before I work on cleaning up/improving the code I wanted to establish what we feel the requirements should be. [1] http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=shortlog;h=refs/heads/plugin-sync [2] https://wiki.gentoo.org/wiki/Project:Portage/Proposals [3] http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=blob;f=pym/portage/emaint/modules/logs/__init__.py;h=0407efe2bef19f2f815c53790e1ea790366b9967;hb=HEAD -- Brian Dolbec <dolsen>