1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# Copyright 2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
'''Layman plug-in module for portage.
Performs layman sync actions for layman overlays.
'''
import os
from portage.sync.config_checks import CheckSyncConfig
try:
import layman
config_class = 'PyLayman'
except ImportError:
config_class = 'Layman'
module_spec = {
'name': 'laymanator',
'description': __doc__,
'provides':{
'layman-module': {
'name': 'laymanator',
'class': config_class,
'description': __doc__,
'functions': ['sync', 'new', 'exists'],
'func_desc': {
'sync': 'Performs a layman sync of the specified overlay',
'new': 'Performs a layman add of the specified overlay',
'exists': 'Returns a boolean of whether the specified dir ' +
'exists and is a valid repository',
},
'validate_config': CheckSyncConfig,
},
}
}
|