Ejemplo n.º 1
0
 def _parse_overlay_meta(self, filename):
     parser = OverlayParser()
     file = open(filename, 'r')
     parser.parse(file.read())
     file.close()
     return parser.get()
Ejemplo n.º 2
0
 def _parse_overlay_meta(self, filename):
     parser = OverlayParser()
     file = open(filename, 'r')
     parser.parse(file.read())
     file.close()
     return parser.get()
Ejemplo n.º 3
0
import ConfigParser
import os
import sys

layman_config = ConfigParser.ConfigParser()
layman_config.read('/etc/layman/layman.cfg')
layman_storage_path = layman_config.get('MAIN', 'storage')
if not layman_storage_path.endswith('/'):
    layman_storage_path = layman_storage_path + '/'

sync_file = SyncFile(
    'http://www.gentoo.org/proj/en/overlays/layman-global.txt',
    'layman-global.txt')
parser = OverlayParser()
file = open(sync_file.path(), 'r')
parser.parse(file.read())
file.close()

legend_printed = False
for i in parser.get().keys():
    layman_global_name = i
    overlay_folder = os.path.join(layman_storage_path, layman_global_name)
    if not os.path.exists(overlay_folder):
        sys.stderr.write('ERROR: Overlay "%s" not found\n' %
                         layman_global_name)
        continue
    filename = os.path.join(overlay_folder, 'profiles', 'repo_name')
    if not os.path.exists(filename):
        sys.stderr.write('ERROR: Overlay "%s" lacks repo_name entry\n' % \
            layman_global_name)
        continue
Ejemplo n.º 4
0
import ConfigParser
import os
import sys

layman_config = ConfigParser.ConfigParser()
layman_config.read('/etc/layman/layman.cfg')
layman_storage_path = layman_config.get('MAIN', 'storage')
if not layman_storage_path.endswith('/'):
    layman_storage_path = layman_storage_path + '/'

sync_file = SyncFile(
        'http://www.gentoo.org/proj/en/overlays/layman-global.txt',
        'layman-global.txt')
parser = OverlayParser()
file = open(sync_file.path(), 'r')
parser.parse(file.read())
file.close()

legend_printed = False
for i in parser.get().keys():
    layman_global_name = i
    overlay_folder = os.path.join(layman_storage_path, layman_global_name)
    if not os.path.exists(overlay_folder):
        sys.stderr.write('ERROR: Overlay "%s" not found\n' % layman_global_name)
        continue
    filename = os.path.join(overlay_folder, 'profiles', 'repo_name')
    if not os.path.exists(filename):
        sys.stderr.write('ERROR: Overlay "%s" lacks repo_name entry\n' % \
            layman_global_name)
        continue
    try: