Gentoo Archives: gentoo-soc

From: Detlev Casanova <detlev.casanova@×××××.com>
To: gentoo-soc@l.g.o
Subject: [gentoo-soc] Rework Porthole to use the new public portage API -- Weekly report #4
Date: Mon, 20 Jun 2011 09:47:08
Message-Id: 201106201146.47660.detlev.casanova@gmail.com
1 Hello everyone !
2
3 This week, I almost finished working on the portage_2_2 backend's access
4 functions.
5 Thos functions are used to get information on packages and on the environment
6 from the plugin (in this case, Portage 2.2).
7 There is an exception for get_property() which currently loads up all
8 properties for all packages and returns the one asked for.
9
10 The next step for this backend is to implement actions : install, uninstall
11 and update a package.
12
13 The implementation of those actions in the portage API being not ready yet,
14 I've also started working on the pkgcore plugin.
15 Here, I have some troubles as to some functionalities are not present in
16 pkgcore. Or at least, not accessible. To name a few, versions comparison, hard
17 masking reason, package size. And I certainly haven't got into other ones. So
18 the question is : do I use portage API's functions to do this or do I
19 reimplement those ?
20
21 Another possiblity could be to have functionalities not implemented in a
22 backend and make porthole aware of it. Messages like "The Pkgcore backend does
23 not support this feature" would be shown instead of the masking reason. Of
24 course, functions like version comparison must be implemented.
25
26 The API being a lot different from portage's, I found some functions that
27 could be simplifyed or even removed, because they where doing something
28 similar.
29
30 As the project is reworking porthole (and not just interface qith a new
31 backend system), there will be rework to remove and improve some functions
32 too. Particularly, the best() methode which compares a list of versions (with
33 no package name). Pkgcore allows me to compare versions with package name. I
34 don't see the point in keeping the function that way.
35
36 This week, I'll spend some time on studying for my last exam (Friday) and
37 continue working on the pkgcore module.
38
39
40 Detlev.

Attachments

File name MIME type
signature.asc application/pgp-signature