1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
Luis Francisco Araujo schrieb: |
5 |
> Brian wrote: |
6 |
>> One of the things that I did was to create a separate db module. In the |
7 |
>> past much of it was incorporated into our portagelib. That makes it |
8 |
>> more difficult to change back-end, package managers and update code for |
9 |
>> changes from upstream. So far your catapult back-end is creating a |
10 |
>> package object for your front-end. That may be fine for a fully |
11 |
>> integrated program, but now you are separating it out into it's own |
12 |
>> process and passing that structure to your front-end. I don't know if |
13 |
>> dbus is passing references (pointers) or making copies. I think that |
14 |
>> there is potential for large memory leaks that way. Also portholes |
15 |
>> definition of a package object is different than portato's as I'm sure |
16 |
>> kuroo's and himerge's is. I believe that the back-end should be |
17 |
>> restricted to only interfacing the front-end to the package manager |
18 |
>> enquiries along with some utility code for odds and ends to provide a |
19 |
>> more complete back-end service. By odds and ends I mean code chunks |
20 |
>> needed to be able to provide missing features/functions of the different |
21 |
>> package managers we may support. |
22 |
> |
23 |
> |
24 |
> That's right, different front-ends have different package object |
25 |
> representation. One of my idea was to write an initial library (probably |
26 |
> on C so it can easily be used through many languages) , creating a set |
27 |
> of sharable procedures between front-ends, this also could give us some |
28 |
> ideas of how far a general package object representation is possible |
29 |
> between the different front-ends ; i think that'd be a good way to start |
30 |
> building this project. |
31 |
|
32 |
This is the thing I'm waiting for atm ... the functions to implement (ie |
33 |
the API)... I think, that it should be done in a functional way is |
34 |
general consensus, isn't it? |
35 |
|
36 |
> |
37 |
>> I think that pothole's potagelib.py contents is more of what a back-end |
38 |
>> should provide. I'll be the first to admit (I'm biased) it needs work |
39 |
>> and cleanup and there is room for it to grow/improve. I do not think |
40 |
>> that it should be providing package structures with embedded package |
41 |
>> manager calls. I think it should be restricted to the basic data types |
42 |
>> returned by the package managers. Any more complex structures should be |
43 |
>> handled by the front-end code or any intermediate code it uses. |
44 |
> |
45 |
> |
46 |
> Right, I also agree that this back-end should only generate general data |
47 |
> that can be easily shared by many front-ends so they can handle these |
48 |
> objects in whatever way fits better for each one. Now, the question is, |
49 |
> what kind of data exactly would this be?, it's here where i think the |
50 |
> library project would help to figure this out. But as to give an initial |
51 |
> idea, this library could be usable by any kind of portage front-end (no |
52 |
> only graphical) and should be easily used through different tools. |
53 |
|
54 |
This is the point where dbus comes in handy ... it can be used by all |
55 |
languages having dbus bindings (and if you don't have them - use the |
56 |
ones in C and do some wrapping) -- even in shell scripts (using the |
57 |
program "dbus-send"). But all depends on one thing: a stable API (sorry |
58 |
if I'm repeating myself ...). |
59 |
|
60 |
And we should not forget to implement the API in a way to allow |
61 |
API-versioning (i.e. to be able to say: "I'm using Catapult-APIv0" and |
62 |
the provider behaves in the right way). |
63 |
|
64 |
Regards, |
65 |
- - Necoro |
66 |
-----BEGIN PGP SIGNATURE----- |
67 |
Version: GnuPG v1.4.7 (GNU/Linux) |
68 |
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org |
69 |
|
70 |
iD8DBQFHC/ir4UOg/zhYFuARAohJAJ0e7BLLh9M+0csd12XKiqyu44o0VQCdHD1k |
71 |
4spX4jB9eUN482eICrnSCoM= |
72 |
=Qbfd |
73 |
-----END PGP SIGNATURE----- |
74 |
-- |
75 |
gentoo-guis@g.o mailing list |