1 |
-----BEGIN PGP SIGNED MESSAGE-----
|
2 |
Hash: SHA512
|
3 |
|
4 |
On Thu, 20 Feb 2014 11:58:32 +0100
|
5 |
Alexander Berntsen <bernalex@g.o> wrote:
|
6 |
|
7 |
> > |
8 |
> If you want consistency, feel free to fix the other docstrings. ;-) |
9 |
> |
10 |
> >> 'module1' ? |
11 |
> > All the other modules did it this way, so I wanted consistency. |
12 |
> Same. |
13 |
> |
14 |
>> - -- |
15 |
> Alexander |
16 |
> |
17 |
|
18 |
Alexander, did you NOT read my other reply about 'module1'?
|
19 |
|
20 |
While the name is not important, it is a requirement to have a
|
21 |
placeholder identifier of some sort. The plug-in system requires it.
|
22 |
There must be a way for the module_spec to group the individual modules
|
23 |
that a plug-in module can provide. While most modules only supply 1
|
24 |
command. A plug-in module can in fact supply many module
|
25 |
commands, capabilities.
|
26 |
|
27 |
What if a module supplied 10 different command capabilities?
|
28 |
What do you propose as a grouping name method? It must be unique to
|
29 |
the plug-in module. It could be a duplicate of the name field it
|
30 |
contains, but then someone is liable to say that it then doesn't need
|
31 |
the name field. But it really does, it must pass along all the data
|
32 |
that the sub-module currently has within it.
|
33 |
|
34 |
Actually, the plug-in manager, nor the emaint controller never actually
|
35 |
displays it. So it can be an sha hash just like git uses for
|
36 |
commits. So, please suggest something.
|
37 |
|
38 |
Here is an real module spec example:
|
39 |
|
40 |
#!/usr/bin/python -O
|
41 |
# vim: noet :
|
42 |
#
|
43 |
# Copyright 2010 Gentoo Technologies, Inc.
|
44 |
# Distributed under the terms of the GNU General Public License v2 or later
|
45 |
#
|
46 |
# $Header$
|
47 |
|
48 |
"""'This emaint module provides checks and maintenance for:
|
49 |
1) "Performing package move updates for installed packages",
|
50 |
2)"Perform package move updates for binary packages"
|
51 |
"""
|
52 |
|
53 |
|
54 |
module_spec = {
|
55 |
'name': 'move',
|
56 |
'description': "Provides functions to check for and move packages " +\
|
57 |
"either installed or binary packages stored on this system",
|
58 |
'provides':{
|
59 |
'module1': {
|
60 |
'name': "moveinst",
|
61 |
'class': "MoveInstalled",
|
62 |
'description': "Perform package move updates for installed packages",
|
63 |
'options': ['check', 'fix'],
|
64 |
'functions': ['check', 'fix'],
|
65 |
'func_desc': {
|
66 |
}
|
67 |
},
|
68 |
'module2':{
|
69 |
'name': "movebin",
|
70 |
'class': "MoveBinary",
|
71 |
'description': "Perform package move updates for binary packages",
|
72 |
'functions': ['check', 'fix'],
|
73 |
'func_desc': {
|
74 |
}
|
75 |
}
|
76 |
}
|
77 |
}
|
78 |
|
79 |
|
80 |
- ------------------------
|
81 |
/* Sorry for the rant */
|
82 |
|
83 |
Pavel is trying to learn the plug-in system, so that he can better help
|
84 |
with the new plug-in sync system. So doing what other modules did is
|
85 |
not a crime.
|
86 |
- --
|
87 |
Brian Dolbec <dolsen>
|
88 |
|
89 |
-----BEGIN PGP SIGNATURE-----
|
90 |
Version: GnuPG v2.0.22 (GNU/Linux)
|
91 |
|
92 |
iQF8BAEBCgBmBQJTBgoIXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
|
93 |
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4Njg4RkQxQ0M3MUMxQzA0RUFFQTQyMzcy
|
94 |
MjE0RDkwQTAxNEYxN0NCAAoJECIU2QoBTxfLsnsH/RpPMwSY9t6kpJwv37v/JSBX
|
95 |
thk0jBikUytW2OmbyuASilEb5VQwL9sYpCcGK0EHgMCaUDwm/GhK3L1k6Qlzwf4i
|
96 |
zSPX3cnKB5EU4OuXY5B+8FuOn1U2MJz6TAlArCvMRTXe/pwbnaVC8kXJctvZCCy4
|
97 |
ISblnLAYyxH0Uun1BdPy9zFjBuwHc1G9ZKZtNBIvaoIKHlQArtUwwSxr6DIt1cG4
|
98 |
X6WEEs+ZJrsAD+SbjxpqvGmmSP8NDXfeiJOUVKJ6PIJybnCZHZVZnwHdd5tHKBjY
|
99 |
Fsx3yKzjOGCM1fN950XASHG6TNAW9nvGjRXBjMdVOZ0LImBR3Y6Q6ewqnlEd2S4=
|
100 |
=gHPH
|
101 |
-----END PGP SIGNATURE----- |