1 |
Sebastian Pipping wrote: |
2 |
> Hello! |
3 |
> |
4 |
> |
5 |
> In my current code for GSoC/Gentoo/Smolt I access the list of folders |
6 |
> that /etc/make.profile and parents are resolved to: |
7 |
> |
8 |
> portage.settings.profiles |
9 |
> |
10 |
> I do this to be able access |
11 |
> |
12 |
> - profile package.mask, |
13 |
> - user package.mask, and |
14 |
> - user package.unmask |
15 |
> |
16 |
> independently, which |
17 |
> |
18 |
> portage.settings._getMaskAtom |
19 |
> portage.settings._getProfileMaskAtom |
20 |
> |
21 |
> seem not be able to at the moment, besides looking quite private :-) |
22 |
> |
23 |
> Rationale: |
24 |
> Among other things I want to find out if the user unmasked a certain |
25 |
> package in the past even if the related mask entry for it was removed |
26 |
> in the meantime. Also, I want to be able to distinct between a |
27 |
> a "stable on stable package" and an "unmasked masked package". |
28 |
> |
29 |
> |
30 |
> What I would like to ask for is we could decide that |
31 |
> |
32 |
> portage.settings.profiles is declared part of the public |
33 |
> API and not allow to change anymore |
34 |
|
35 |
Go ahead and use it. It's safe. Most attributes that aren't marked |
36 |
with an underscore are pretty safe. If there has to be a change then |
37 |
typically I do it under a new name and leave the old one for |
38 |
compatibility. |
39 |
|
40 |
> or |
41 |
> |
42 |
> if we could introduce some getter for now so I could surround |
43 |
> the current access to <portage.settings.profiles> by a portage |
44 |
> API version check and use the getter from a certain version on. |
45 |
> |
46 |
> |
47 |
> Integrating my code for portage related code into smolt does not seem |
48 |
> reasonable to me as it would require depending on a version of portage |
49 |
> that will not be stable before 2010 or so. |
50 |
> |
51 |
> Please share your thoughts with me. |
52 |
> |
53 |
> |
54 |
> |
55 |
> Sebastian |
56 |
> |
57 |
|
58 |
|
59 |
-- |
60 |
Thanks, |
61 |
Zac |