1 |
Robin H. Johnson wrote: |
2 |
> 1. That's not the only location used for layman. |
3 |
> - At home: /code/gentoo/layman/ |
4 |
> - At work: /usr/local/portage-layman/ |
5 |
> - Gentoo Infra: /usr/portage/local/layman/ |
6 |
> |
7 |
> 2. Just because an overlay is distributed by layman does NOT mean that |
8 |
> it's safe to disclose the existence of, within Gentoo infra, we do |
9 |
> this in layman.cfg: |
10 |
> overlays : http://www.gentoo.org/proj/en/overlays/layman-global.txt |
11 |
> file:///etc/layman/infra-overlays.xml |
12 |
> |
13 |
> While I don't mind disclosing the list of overlays we have in infra, |
14 |
> other large-scale use of layman might not be happy to disclose it. |
15 |
> If it came from the layman-global.txt, sure, it might be ok, but see if there's |
16 |
> a way to filter out others. |
17 |
|
18 |
I have implemented a more sophisticated algorithm by now: |
19 |
|
20 |
def is_global(overlay_location): |
21 |
name = overlay_name(overlay_location) |
22 |
return overlay_location.startswith(layman_storage_path) \ |
23 |
and same_repository( |
24 |
available_installed_overlay_dict[name], |
25 |
global_overlay_dict[name]) |
26 |
|
27 |
The dictonaries in the last two lines are maps from name to url: |
28 |
- available_installed_overlay = from %(local_list)s |
29 |
- global_overlay_dict = from layman-global.txt |
30 |
|
31 |
Please let me know what you think about that approach. |
32 |
To check it out live grab the two python files from |
33 |
http://git.goodpoint.de/?p=smolt-gentoo.git;a=tree;f=client/distros/gentoo;hb=refs/heads/gentoo |
34 |
and run |
35 |
|
36 |
$ python gentoo.py | fgrep 'OVERLAYS' |
37 |
|
38 |
For my current setup it prints |
39 |
|
40 |
NUMBER_OF_PRIVATE_OVERLAYS = 2 |
41 |
NUMBER_OF_PUBLIC_OVERLAYS = 7 |
42 |
OVERLAYS = ['toolchain', 'rbu', 'sunrise', 'zugaina', |
43 |
'berkano', 'python-testing', 'python-experimental'] |
44 |
|
45 |
|
46 |
|
47 |
Sebastian |