1 |
On Thu, 09 Jan 2014 09:33:51 -0800 |
2 |
Brian Dolbec <dolsen@g.o> wrote: |
3 |
|
4 |
> |
5 |
> I have started a Proposals sub-page under the Portage project page in |
6 |
> the wiki. It has a link to a diagram I made showing how the plug-in |
7 |
> system is laid out. This thread will be used to discuss the proposal |
8 |
> and the details needed for the module_spec dictionary that is used to |
9 |
> provide the manager with the details of what a module provides, |
10 |
> options, etc.. |
11 |
> |
12 |
> For a working example of the system in action, just try out emaint -h, |
13 |
> and some other actions it provides. Then move one of it's modules out |
14 |
> of the the emaint/modules/ directory and re-try emaint -h. You will |
15 |
> see the options for that module and it's actions are no longer |
16 |
> available. No code editing was required, no errors occurred,... Put |
17 |
> it back, retry... |
18 |
> |
19 |
> The modular sync system I propose would re-use that plug-in manager to |
20 |
> interface the sync manager code with the modules that perform the sync |
21 |
> actions. This sytem is easily extended with new modules for different |
22 |
> transfer methods or VCS specific modules. |
23 |
> |
24 |
|
25 |
STATUS UPDATE: |
26 |
|
27 |
I have pushed the plugin-sync branch to the main portage.git repo on |
28 |
g.o.g.o [1]. It has working and tested code for the rsync and git |
29 |
modules. The CVS module I have not yet tested or done any debugging on. |
30 |
|
31 |
First off, let me state that this is only minimally changed code to |
32 |
make it function. It is by no means ready for any code review other |
33 |
than for general program structure and the data that we need/want to |
34 |
pass between the controller and the modules. |
35 |
|
36 |
I have updated the Proposal page [2] with more things to do as well as |
37 |
some insights I discovered during the initial porting. |
38 |
|
39 |
Next up for discussion is what additional functionality should a module |
40 |
supply? |
41 |
|
42 |
I think it should provide a list or dictionary of the repos.conf |
43 |
variables it needs or uses. I also think that the module should |
44 |
provide a function for validating the conf variables meet some minimum |
45 |
standard/obvious error checking. |
46 |
|
47 |
For a more involved example of the types of information that can be |
48 |
passed through the module_spec see the working emaint logs module file |
49 |
[3]. The information required/provided does not affect the plugin |
50 |
system. It is a standard set up by the controller and the modules |
51 |
requirements. |
52 |
|
53 |
So, please look over the code, avoid commenting on the poor code |
54 |
quality just yet. Before I work on cleaning up/improving the code I |
55 |
wanted to establish what we feel the requirements should be. |
56 |
|
57 |
|
58 |
|
59 |
[1] |
60 |
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=shortlog;h=refs/heads/plugin-sync |
61 |
[2] https://wiki.gentoo.org/wiki/Project:Portage/Proposals |
62 |
[3] |
63 |
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=blob;f=pym/portage/emaint/modules/logs/__init__.py;h=0407efe2bef19f2f815c53790e1ea790366b9967;hb=HEAD |
64 |
|
65 |
|
66 |
-- |
67 |
Brian Dolbec <dolsen> |