initial commit
authorabki <amirouche.boubekki@gmail.com>
Wed, 1 Jul 2009 12:09:09 +0000 (1 14:09 +0200)
committerabki <amirouche.boubekki@gmail.com>
Wed, 1 Jul 2009 12:09:09 +0000 (1 14:09 +0200)
38 files changed:
__init__.py [new file with mode: 0644]
commands/__init__.py [new file with mode: 0644]
commands/clean.sh [new file with mode: 0644]
commands/layman [new file with mode: 0755]
commands/lib/__init__.py [new file with mode: 0644]
commands/lib/layman/__init__.py [new file with mode: 0644]
commands/lib/layman/action.py [new file with mode: 0644]
commands/lib/layman/bin/__init__.py [new file with mode: 0644]
commands/lib/layman/config.py [new file with mode: 0644]
commands/lib/layman/db.py [new file with mode: 0644]
commands/lib/layman/debug.py [new file with mode: 0644]
commands/lib/layman/overlay.py [new file with mode: 0644]
commands/lib/layman/overlays/__init__.py [new file with mode: 0644]
commands/lib/layman/overlays/bzr.py [new file with mode: 0644]
commands/lib/layman/overlays/cvs.py [new file with mode: 0644]
commands/lib/layman/overlays/darcs.py [new file with mode: 0644]
commands/lib/layman/overlays/git.py [new file with mode: 0644]
commands/lib/layman/overlays/mercurial.py [new file with mode: 0644]
commands/lib/layman/overlays/overlay.py [new file with mode: 0644]
commands/lib/layman/overlays/rsync.py [new file with mode: 0644]
commands/lib/layman/overlays/svn.py [new file with mode: 0644]
commands/lib/layman/overlays/tar.py [new file with mode: 0644]
commands/lib/layman/utils.py [new file with mode: 0644]
commands/lib/layman/version.py [new file with mode: 0644]
commands/manage_layman.py [new file with mode: 0644]
commands/mylayman.cfg [new file with mode: 0644]
commands/overlays.txt [new file with mode: 0644]
commands/overlays.xml [new file with mode: 0644]
commands/parse.py [new file with mode: 0644]
commands/whoosh_manager.py [new file with mode: 0644]
models.py [new file with mode: 0644]
planet.py [new file with mode: 0644]
templates/ebuildfind/bakup.html [new file with mode: 0644]
templates/ebuildfind/base.html [new file with mode: 0644]
templates/ebuildfind/index.html [new file with mode: 0755]
templates/ebuildfind/search.html [new file with mode: 0644]
urls.py [new file with mode: 0644]
views.py [new file with mode: 0644]

diff --git a/__init__.py b/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/commands/__init__.py b/commands/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/commands/clean.sh b/commands/clean.sh
new file mode 100644 (file)
index 0000000..44a9815
--- /dev/null
@@ -0,0 +1,5 @@
+#!/usr/bin/bash
+
+rm -rf var/layman/$1
+./layman -c mylayman.cfg -a $1
+python parse.py
\ No newline at end of file
diff --git a/commands/layman b/commands/layman
new file mode 100755 (executable)
index 0000000..b0aa4f5
--- /dev/null
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+################################################################################
+# LAYMAN - A UTILITY TO SELECT AND UPDATE GENTOO OVERLAYS
+################################################################################
+# Distributed under the terms of the GNU General Public License v2
+#
+# Copyright:
+#             (c) 2005 Gunnar Wrobel
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#
+
+__version__ = "$Id$"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+from   layman.config            import Config
+from   layman.action            import Actions
+
+#===============================================================================
+#
+# MAIN
+#
+#-------------------------------------------------------------------------------
+
+def main():
+
+    Actions(Config())
+
+if __name__ == "__main__":
+    main()
diff --git a/commands/lib/__init__.py b/commands/lib/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/commands/lib/layman/__init__.py b/commands/lib/layman/__init__.py
new file mode 100644 (file)
index 0000000..792d600
--- /dev/null
@@ -0,0 +1 @@
+#
diff --git a/commands/lib/layman/action.py b/commands/lib/layman/action.py
new file mode 100644 (file)
index 0000000..b7b36b6
--- /dev/null
@@ -0,0 +1,523 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN ACTIONS
+#################################################################################
+# File:       action.py
+#
+#             Handles layman actions.
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#
+''' Provides the different actions that can be performed by layman.'''
+
+__version__ = "$Id: action.py 312 2007-04-09 19:45:49Z wrobel $"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+import os, sys
+
+from   layman.db                import DB, RemoteDB
+
+from   layman.debug             import OUT
+
+#===============================================================================
+#
+# Class Fetch
+#
+#-------------------------------------------------------------------------------
+
+class Fetch:
+    ''' Fetches the overlay listing.
+
+    >>> import os
+    >>> here = os.path.dirname(os.path.realpath(__file__))
+    >>> cache = os.tmpnam()
+    >>> config = {'overlays' :
+    ...           'file://' + here + '/tests/testfiles/global-overlays.xml',
+    ...           'cache' : cache,
+    ...           'nocheck'    : True,
+    ...           'proxy' : None,
+    ...           'quietness':3}
+    >>> a = Fetch(config)
+    >>> a.run()
+    0
+    >>> b = open(a.db.path(config['overlays']))
+    >>> b.readlines()[24]
+    '      A collection of ebuilds from Gunnar Wrobel [wrobel@gentoo.org].\\n'
+
+    >>> b.close()
+    >>> os.unlink(a.db.path(config['overlays']))
+
+    >>> a.db.overlays.keys()
+    [u'wrobel', u'wrobel-stable']
+    '''
+
+    def __init__(self, config):
+        self.db = RemoteDB(config)
+
+    def run(self):
+        '''Fetch the overlay listing.'''
+        try:
+            self.db.cache()
+        except Exception, error:
+            OUT.die('Failed to fetch overlay list!\nError was: '
+                    + str(error))
+
+        return 0
+
+#===============================================================================
+#
+# Class Sync
+#
+#-------------------------------------------------------------------------------
+
+class Sync:
+    ''' Syncs the selected overlays.'''
+
+    def __init__(self, config):
+
+        self.db = DB(config)
+
+        self.rdb = RemoteDB(config)
+
+        self.quiet = int(config['quietness']) < 3
+
+        self.selection = config['sync']
+
+       if config['sync_all'] or 'ALL' in self.selection:
+           self.selection = self.db.overlays.keys()
+
+        enc = sys.getfilesystemencoding()
+        if enc:
+            self.selection = [i.decode(enc) for i in self.selection]
+
+    def run(self):
+        '''Synchronize the overlays.'''
+
+        OUT.debug('Updating selected overlays', 6)
+
+        warnings = []
+        success  = []
+        for i in self.selection:
+            ordb = self.rdb.select(i)
+            odb = self.db.select(i)
+            if ordb and odb and ordb.src != odb.src:
+                warnings.append(
+                    'The source of the overlay "' + i + '" seems to have c'
+                    'hanged. You currently sync from "' + odb.src + '" whi'
+                    'le the global layman list reports "' + ordb.src + '" '
+                    'as correct location. Please consider removing and rea'
+                    'dding the overlay!')
+
+            try:
+                self.db.sync(i, self.quiet)
+                success.append('Successfully synchronized overlay "' + i + '".')
+            except Exception, error:
+                warnings.append(
+                    'Failed to sync overlay "' + i + '".\nError was: '
+                    + str(error))
+
+        if success:
+            OUT.info('\nSuccess:\n------\n', 3)
+            for i in success:
+                OUT.info(i, 3)
+                
+        if warnings:
+            OUT.warn('\nErrors:\n------\n', 2)
+            for i in warnings:
+                OUT.warn(i + '\n', 2)
+            return 1
+
+        return 0
+
+#===============================================================================
+#
+# Class Add
+#
+#-------------------------------------------------------------------------------
+
+class Add:
+    ''' Adds the selected overlays.'''
+
+    def __init__(self, config):
+
+        self.config = config
+
+        self.db = DB(config)
+
+        self.rdb = RemoteDB(config)
+
+        self.quiet = int(config['quietness']) < 3
+
+        self.selection = config['add']
+
+        enc = sys.getfilesystemencoding()
+        if enc:
+            self.selection = [i.decode(enc) for i in self.selection]
+
+        if 'ALL' in self.selection:
+            self.selection = self.rdb.overlays.keys()
+
+    def run(self):
+        '''Add the overlay.'''
+
+        OUT.debug('Adding selected overlays', 6)
+
+        result = 0
+
+        for i in self.selection:
+            overlay = self.rdb.select(i)
+
+            OUT.debug('Selected overlay', 7)
+
+            if overlay:
+                try:
+                    self.db.add(overlay, self.quiet)
+                    OUT.info('Successfully added overlay "' + i + '".', 2)
+                except Exception, error:
+                    OUT.warn('Failed to add overlay "' + i + '".\nError was: '
+                             + str(error), 2)
+                    result = 1
+            else:
+                OUT.warn('Overlay "' + i + '" does not exist!', 2)
+                result = 1
+
+        return result
+
+#===============================================================================
+#
+# Class Delete
+#
+#-------------------------------------------------------------------------------
+
+class Delete:
+    ''' Deletes the selected overlays.'''
+
+    def __init__(self, config):
+
+        self.db = DB(config)
+
+        self.selection = config['delete']
+
+        enc = sys.getfilesystemencoding()
+        if enc:
+            self.selection = [i.decode(enc) for i in self.selection]
+
+        if 'ALL' in self.selection:
+            self.selection = self.db.overlays.keys()
+
+    def run(self):
+        '''Delete the overlay.'''
+
+        OUT.debug('Deleting selected overlays', 6)
+
+        result = 0
+
+        for i in self.selection:
+            overlay = self.db.select(i)
+
+            OUT.debug('Selected overlay', 7)
+
+            if overlay:
+                try:
+                    self.db.delete(overlay)
+                    OUT.info('Successfully deleted overlay "' + i + '".', 2)
+                except Exception, error:
+                    OUT.warn('Failed to delete overlay "' + i + '".\nError was: '
+                             + str(error), 2)
+                    result = 1
+            else:
+                OUT.warn('Overlay "' + i + '" does not exist!', 2)
+                result = 1
+
+        return result
+
+#===============================================================================
+#
+# Class Info
+#
+#-------------------------------------------------------------------------------
+
+class Info:
+    ''' Print information about the specified overlays.
+
+    >>> import os
+    >>> here = os.path.dirname(os.path.realpath(__file__))
+    >>> cache = os.tmpnam()
+    >>> config = {'overlays' :
+    ...           'file://' + here + '/tests/testfiles/global-overlays.xml',
+    ...           'cache'  : cache,
+    ...           'proxy'  : None,
+    ...           'info'   : ['wrobel'],
+    ...           'nocheck'    : False,
+    ...           'verbose': False,
+    ...           'quietness':3}
+    >>> a = Info(config)
+    >>> a.rdb.cache()
+    >>> OUT.color_off()
+    >>> a.run()
+    * wrobel
+    * ~~~~~~
+    * Source  : https://overlays.gentoo.org/svn/dev/wrobel
+    * Contact : nobody@gentoo.org
+    * Type    : Subversion; Priority: 10
+    * 
+    * Description:
+    *   Test
+    * 
+    0
+    '''
+
+    def __init__(self, config):
+
+        OUT.debug('Creating RemoteDB handler', 6)
+
+        self.rdb    = RemoteDB(config)
+        self.config = config
+
+        self.selection = config['info']
+
+        enc = sys.getfilesystemencoding()
+        if enc:
+            self.selection = [i.decode(enc) for i in self.selection]
+
+        if 'ALL' in self.selection:
+            self.selection = self.rdb.overlays.keys()
+
+    def run(self):
+        ''' Print information about the selected overlays.'''
+
+        result = 0
+
+        for i in self.selection:
+            overlay = self.rdb.select(i)
+
+            if overlay:
+                # Is the overlay supported?
+                OUT.info(overlay.__str__(), 1)
+                if not overlay.is_official():
+                    OUT.warn('*** This is no official gentoo overlay ***\n', 1)
+                if not overlay.is_supported():
+                    OUT.error('*** You are lacking the necessary tools to install t'
+                              'his overlay ***\n')
+            else:
+                OUT.warn('Overlay "' + i + '" does not exist!', 2)
+                result = 1
+
+        return result
+
+#===============================================================================
+#
+# Class List
+#
+#-------------------------------------------------------------------------------
+
+class List:
+    ''' Lists the available overlays.
+
+    >>> import os
+    >>> here = os.path.dirname(os.path.realpath(__file__))
+    >>> cache = os.tmpnam()
+    >>> config = {'overlays' :
+    ...           'file://' + here + '/tests/testfiles/global-overlays.xml',
+    ...           'cache'  : cache,
+    ...           'proxy'  : None,
+    ...           'nocheck'    : False,
+    ...           'verbose': False,
+    ...           'quietness':3,
+    ...           'width':80}
+    >>> a = List(config)
+    >>> a.rdb.cache()
+    >>> OUT.color_off()
+    >>> a.run()
+    * wrobel                    [Subversion] (https://o.g.o/svn/dev/wrobel         )
+    0
+    >>> a.config['verbose'] = True
+    >>> a.run()
+    * wrobel
+    * ~~~~~~
+    * Source  : https://overlays.gentoo.org/svn/dev/wrobel
+    * Contact : nobody@gentoo.org
+    * Type    : Subversion; Priority: 10
+    * 
+    * Description:
+    *   Test
+    * 
+    * *** This is no official gentoo overlay ***
+    * 
+    * wrobel-stable
+    * ~~~~~~~~~~~~~
+    * Source  : rsync://gunnarwrobel.de/wrobel-stable
+    * Contact : nobody@gentoo.org
+    * Type    : Rsync; Priority: 50
+    * 
+    * Description:
+    *   A collection of ebuilds from Gunnar Wrobel [wrobel@gentoo.org].
+    * 
+    0
+    '''
+
+    def __init__(self, config):
+
+        OUT.debug('Creating RemoteDB handler', 6)
+
+        self.rdb    = RemoteDB(config)
+        self.config = config
+
+    def run(self):
+        ''' List the available overlays.'''
+
+        for i in self.rdb.list(self.config['verbose'], self.config['width']):
+            # Is the overlay supported?
+            if i[1]:
+                # Is this an official overlay?
+                if i[2]:
+                    OUT.info(i[0], 1)
+                # Unofficial overlays will only be listed if we are not
+                # checking or listing verbose
+                elif self.config['nocheck'] or self.config['verbose']:
+                    # Give a reason why this is marked yellow if it is a verbose
+                    # listing
+                    if self.config['verbose']:
+                        OUT.warn('*** This is no official gentoo overlay ***\n', 1)
+                    OUT.warn(i[0], 1)
+            # Unsupported overlays will only be listed if we are not checking
+            # or listing verbose
+            elif self.config['nocheck'] or self.config['verbose']:
+                # Give a reason why this is marked red if it is a verbose
+                # listing
+                if self.config['verbose']:
+                    OUT.error('*** You are lacking the necessary tools to insta'
+                              'll this overlay ***\n')
+                OUT.error(i[0])
+
+        return 0
+
+#===============================================================================
+#
+# Class ListLocal
+#
+#-------------------------------------------------------------------------------
+
+class ListLocal:
+    ''' Lists the local overlays.'''
+
+    def __init__(self, config):
+        self.db = DB(config)
+        self.config = config
+
+    def run(self):
+        '''List the overlays.'''
+
+        for i in self.db.list(self.config['verbose']):
+
+            OUT.debug('Printing local overlay.', 8)
+
+            # Is the overlay supported?
+            if i[1]:
+                # Is this an official overlay?
+                if i[2]:
+                    OUT.info(i[0], 1)
+                # Unofficial overlays will only be listed if we are not
+                # checking or listing verbose
+                else:
+                    # Give a reason why this is marked yellow if it is a verbose
+                    # listing
+                    if self.config['verbose']:
+                        OUT.warn('*** This is no official gentoo overlay ***\n', 1)
+                    OUT.warn(i[0], 1)
+            # Unsupported overlays will only be listed if we are not checking
+            # or listing verbose
+            else:
+                # Give a reason why this is marked red if it is a verbose
+                # listing
+                if self.config['verbose']:
+                    OUT.error('*** You are lacking the necessary tools to insta'
+                              'll this overlay ***\n')
+                OUT.error(i[0])
+
+        return 0
+
+#===============================================================================
+#
+# Class Actions
+#
+#-------------------------------------------------------------------------------
+
+class Actions:
+    '''Dispatches to the actions the user selected. '''
+
+    # Given in order of precedence
+    actions = [('fetch',      Fetch),
+               ('add',        Add),
+               ('sync',       Sync),
+               ('info',       Info),
+               ('sync_all',   Sync),
+               ('delete',     Delete),
+               ('list',       List),
+               ('list_local', ListLocal),]
+
+    def __init__(self, config):
+
+        # Make fetching the overlay list a default action
+        if not 'nofetch' in config.keys():
+            # Actions that implicitely call the fetch operation before
+            fetch_actions = ['fetch', 'sync', 'sync_all', 'list']
+            for i in fetch_actions:
+                if i in config.keys():
+                    # Implicitely call fetch, break loop
+                    Fetch(config).run()
+                    break
+
+        result = 0
+
+        # Set the umask
+        umask = config['umask']
+        try:
+            new_umask = int(umask, 8)
+            old_umask = os.umask(new_umask)
+        except Exception, error:
+            OUT.die('Failed setting to umask "' + umask + '"!\nError was: ' 
+                    + str(error))
+
+        for i in self.actions:
+
+            OUT.debug('Checking for action', 7)
+
+            if i[0] in config.keys():
+                result += i[1](config).run()
+
+        # Reset umask
+        os.umask(old_umask)
+
+        if not result:
+            sys.exit(0)
+        else:
+            sys.exit(1)
+            
+#===============================================================================
+#
+# Testing
+#
+#-------------------------------------------------------------------------------
+
+if __name__ == '__main__':
+    import doctest, sys
+
+    # Ignore warnings here. We are just testing
+    from warnings     import filterwarnings, resetwarnings
+    filterwarnings('ignore')
+
+    doctest.testmod(sys.modules[__name__])
+
+    resetwarnings()
diff --git a/commands/lib/layman/bin/__init__.py b/commands/lib/layman/bin/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/commands/lib/layman/config.py b/commands/lib/layman/config.py
new file mode 100644 (file)
index 0000000..ba57c81
--- /dev/null
@@ -0,0 +1,325 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN CONFIGURATION
+#################################################################################
+# File:       config.py
+#
+#             Handles layman configuration
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#
+'''Defines the configuration options and provides parsing functionality.'''
+
+__version__ = "$Id: config.py 286 2007-01-09 17:48:23Z wrobel $"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+import sys, ConfigParser
+
+from   optparse                 import OptionParser, OptionGroup
+from   layman.debug             import OUT
+from   layman.version           import VERSION
+
+#===============================================================================
+#
+# Class Config
+#
+#-------------------------------------------------------------------------------
+
+class Config(object):
+    '''Handles the configuration.'''
+
+    def __init__(self):
+        '''
+        Creates and describes all possible polymeraZe options and creates
+        a debugging object.
+
+        >>> import os.path
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> sys.argv.append('--config')
+        >>> sys.argv.append(here + '/../etc/layman.cfg')
+        >>> a = Config()
+        >>> a['overlays']
+        '\\nhttp://www.gentoo.org/proj/en/overlays/layman-global.txt'
+        >>> sorted(a.keys())
+        ['cache', 'config', 'local_list', 'make_conf', 'nocheck', 'overlays', 'proxy', 'quietness', 'storage', 'umask', 'width']
+        '''
+
+        self.defaults = {'config'    : '/etc/layman/layman.cfg',
+                         'storage'   : '/usr/portage/local/layman',
+                         'cache'     : '%(storage)s/cache',
+                         'local_list': '%(storage)s/overlays.xml',
+                         'make_conf' : '%(storage)s/make.conf',
+                         'nocheck'   : 'yes',
+                         'proxy'     : '',
+                         'umask'     : '0022',
+                         'overlays'  :
+                         'http://www.gentoo.org/proj/en/overlays/layman-global.'
+                         'txt',}
+
+
+        self.parser = OptionParser(
+            usage   = '\n\nlayman -a/-d/-S|overlay\nlayman -f [-o url]\nlayman' \
+            ' -l|-L',
+            version = VERSION)
+
+        #-----------------------------------------------------------------
+        # Main Options
+
+        group = OptionGroup(self.parser,
+                            '<Actions>')
+
+        group.add_option('-a',
+                         '--add',
+                         action = 'append',
+                         help = 'Add the given overlay from the cached remote li'
+                         'st to your locally installed overlays.. Specify "ALL" '
+                         'to add all overlays from the remote list.')
+
+        group.add_option('-d',
+                         '--delete',
+                         action = 'append',
+                         help = 'Remove the given overlay from your locally inst'
+                         'alled overlays. Specify "ALL" to remove all overlays')
+
+        group.add_option('-s',
+                         '--sync',
+                         action = 'append',
+                         help = 'Update the specified overlay. Use "ALL" as para'
+                         'meter to synchronize all overlays')
+
+        group.add_option('-i',
+                         '--info',
+                         action = 'append',
+                         help = 'Display information about the specified overlay'
+                         '.')
+
+        group.add_option('-S',
+                         '--sync-all',
+                         action = 'store_true',
+                         help = 'Update all overlays.')
+
+        group.add_option('-L',
+                         '--list',
+                         action = 'store_true',
+                         help = 'List the contents of the remote list.')
+
+        group.add_option('-l',
+                         '--list-local',
+                         action = 'store_true',
+                         help = 'List the locally installed overlays.')
+
+        group.add_option('-f',
+                         '--fetch',
+                         action = 'store_true',
+                         help = 'Fetch a remote list of overlays. This option is'
+                         ' deprecated. The fetch operation will be performed by '
+                         'default when you run sync, sync-all, or list.')
+
+        group.add_option('-n',
+                         '--nofetch',
+                         action = 'store_true',
+                         help = 'Do not fetch a remote list of overlays.')
+
+        group.add_option('-p',
+                         '--priority',
+                         action = 'store',
+                         help = 'Use this with the --add switch to set the prior'
+                         'ity of the added overlay. This will influence the sort'
+                         'ing order of the overlays in the PORTDIR_OVERLAY varia'
+                         'ble.')
+
+        self.parser.add_option_group(group)
+
+        #-----------------------------------------------------------------
+        # Additional Options
+
+        group = OptionGroup(self.parser,
+                            '<Path options>')
+
+        group.add_option('-c',
+                         '--config',
+                         action = 'store',
+                         help = 'Path to the config file [default: '            \
+                         + self.defaults['config'] + '].')
+
+        group.add_option('-o',
+                         '--overlays',
+                         action = 'append',
+                         help = 'The list of overlays [default: '               \
+                         + self.defaults['overlays'] + '].')
+
+        self.parser.add_option_group(group)
+
+        #-----------------------------------------------------------------
+        # Output Options
+
+        group = OptionGroup(self.parser,
+                            '<Output options>')
+
+        group.add_option('-v',
+                         '--verbose',
+                         action = 'store_true',
+                         help = 'Increase the amount of output and describe the '
+                         'overlays.')
+
+        group.add_option('-q',
+                         '--quiet',
+                         action = 'store_true',
+                         help = 'Yield no output. Please be careful with this op'
+                         'tion: If the processes spawned by layman when adding o'
+                         'r synchronizing overlays require any input layman will'
+                         ' hang without telling you why. This might happen for e'
+                         'xample if your overlay resides in subversion and the S'
+                         'SL certificate of the server needs acceptance.')
+
+        group.add_option('-N',
+                         '--nocolor',
+                         action = 'store_true',
+                         help = 'Remove color codes from the layman output.')
+
+        group.add_option('-Q',
+                         '--quietness',
+                         action = 'store',
+                         type = 'int',
+                         default = '4',
+                         help = 'Set the level of output (0-4). Default: 4. Once'
+                         ' you set this below 2 the same warning as given for --'
+                         'quiet applies! ')
+
+        group.add_option('-W',
+                         '--width',
+                         action = 'store',
+                         type = 'int',
+                         default = '0',
+                         help = 'Sets the screen width. This setting is usually '
+                         'not required as layman is capable of detecting the ava'
+                         'available number of columns automatically.')
+
+        group.add_option('-k',
+                         '--nocheck',
+                         action = 'store_true',
+                         help = 'Do not check overlay definitions and do not i'
+                         'ssue a warning if description or contact information'
+                         ' are missing.')
+
+        self.parser.add_option_group(group)
+
+        #-----------------------------------------------------------------
+        # Debug Options
+
+        OUT.cli_opts(self.parser)
+
+        # Parse the command line first since we need to get the config
+        # file option.
+        (self.options, args) = self.parser.parse_args()
+
+        # handle debugging
+        OUT.cli_handle(self.options)
+
+        if self.options.__dict__['nocolor']:
+            OUT.color_off()
+
+        # Fetch only an alternate config setting from the options
+        if not self.options.__dict__['config'] is None:
+            self.defaults['config'] = self.options.__dict__['config']
+
+            OUT.debug('Got config file at ' + self.defaults['config'], 8)
+
+        # Now parse the config file
+        self.config = ConfigParser.ConfigParser(self.defaults)
+        self.config.add_section('MAIN')
+
+        # handle quietness
+        if self['quiet']:
+            OUT.set_info_level(1)
+            OUT.set_warn_level(1)
+            self.defaults['quietness'] = 0
+            
+        elif 'quietness' in self.keys():
+            OUT.set_info_level(int(self['quietness']))
+            OUT.set_warn_level(int(self['quietness']))
+
+        OUT.debug('Reading config file at ' + self.defaults['config'], 8)
+
+        self.config.read(self.defaults['config'])
+
+    def __getitem__(self, key):
+
+        if key == 'overlays':
+            overlays = ''
+            if (key in self.options.__dict__.keys()
+                and not self.options.__dict__[key] is None):
+                overlays = '\n'.join(self.options.__dict__[key])
+            if self.config.has_option('MAIN', 'overlays'):
+                overlays += '\n' + self.config.get('MAIN', 'overlays')
+            if overlays:
+                return  overlays
+
+        OUT.debug('Retrieving option', 8)
+
+        if (key in self.options.__dict__.keys()
+            and not self.options.__dict__[key] is None):
+            return self.options.__dict__[key]
+
+        OUT.debug('Retrieving option', 8)
+
+        if self.config.has_option('MAIN', key):
+            if key == 'nocheck':
+                if self.config.get('MAIN', key).lower() == 'yes':
+                    return True
+                else:
+                    return False
+            return self.config.get('MAIN', key)
+
+        OUT.debug('Retrieving option', 8)
+
+        if key in self.defaults.keys():
+            return self.defaults[key]
+
+        OUT.debug('Retrieving option', 8)
+
+        return None
+
+    def keys(self):
+        '''Special handler for the configuration keys.'''
+
+        OUT.debug('Retrieving keys', 8)
+
+        keys = [i for i in self.options.__dict__.keys()
+                if not self.options.__dict__[i] is None]
+
+        OUT.debug('Retrieving keys', 8)
+
+        keys += [name for name, value in self.config.items('MAIN')
+                 if not name in keys]
+
+        OUT.debug('Retrieving keys', 8)
+
+        keys += [i for i in self.defaults.keys()
+                 if not i in keys]
+
+        OUT.debug('Retrieving keys', 8)
+
+        return keys
+
+
+#===============================================================================
+#
+# Testing
+#
+#-------------------------------------------------------------------------------
+
+if __name__ == '__main__':
+    import doctest
+    doctest.testmod(sys.modules[__name__])
diff --git a/commands/lib/layman/db.py b/commands/lib/layman/db.py
new file mode 100644 (file)
index 0000000..1baeabf
--- /dev/null
@@ -0,0 +1,588 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN OVERLAY DB
+#################################################################################
+# File:       db.py
+#
+#             Access to the db of overlays
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#
+'''Handles different storage files.'''
+
+__version__ = "$Id: db.py 309 2007-04-09 16:23:38Z wrobel $"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+import os, codecs, os.path, urllib2, re, hashlib
+
+from   layman.utils             import path
+from   layman.overlay           import Overlays
+
+from   layman.debug             import OUT
+
+#===============================================================================
+#
+# Class DB
+#
+#-------------------------------------------------------------------------------
+
+class DB(Overlays):
+    ''' Handle the list of local overlays.'''
+
+    def __init__(self, config):
+
+        self.config = config
+
+        self.path = config['local_list']
+
+        if config['nocheck']:
+            ignore = 2
+        else:
+            ignore = 1
+
+        quiet = int(config['quietness']) < 3
+
+        Overlays.__init__(self, 
+                          [config['local_list'], ], 
+                          ignore, 
+                          quiet)
+
+        OUT.debug('DB handler initiated', 6)
+
+    def add(self, overlay, quiet = False):
+        '''
+        Add an overlay to the local list of overlays.
+
+        >>> write = os.tmpnam()
+        >>> write2 = os.tmpnam()
+        >>> write3 = os.tmpnam()
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> config = {'local_list' :
+        ...           here + '/tests/testfiles/global-overlays.xml',
+        ...           'make_conf' : write2,
+        ...           'nocheck'    : True,
+        ...           'storage'   : write3,
+        ...           'quietness':3}
+
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> a = DB(config)
+        >>> config['local_list'] = write
+        >>> b = DB(config)
+        >>> OUT.color_off()
+
+        >>> m = MakeConf(config, b.overlays)
+        >>> m.path = write2
+        >>> m.write()
+
+        Commented out since it needs network access:
+
+        # >>> b.add(a.select('wrobel-stable')) #doctest: +ELLIPSIS
+        # * Running command "/usr/bin/rsync -rlptDvz --progress --delete --delete-after --timeout=180 --exclude="distfiles/*" --exclude="local/*" --exclude="packages/*" "rsync://gunnarwrobel.de/wrobel-stable/*" "/tmp/file.../wrobel-stable""...
+        # >>> c = Overlays([write, ])
+        # >>> c.overlays.keys()
+        # [u'wrobel-stable']
+
+        # >>> m = MakeConf(config, b.overlays)
+        # >>> [i.name for i in m.overlays] #doctest: +ELLIPSIS
+        # [u'wrobel-stable']
+
+
+        # >>> os.unlink(write)
+        >>> os.unlink(write2)
+        >>> import shutil
+
+        # >>> shutil.rmtree(write3)
+        '''
+
+        if overlay.name not in self.overlays.keys():
+            result = overlay.add(self.config['storage'], quiet)
+            if result == 0:
+                if 'priority' in self.config.keys():
+                    overlay.set_priority(self.config['priority'])
+                self.overlays[overlay.name] = overlay
+                self.write(self.path)
+                make_conf = MakeConf(self.config, self.overlays)
+                make_conf.add(overlay)
+            else:
+                raise Exception('Adding the overlay failed! Possible remains of'
+                                ' the opration have NOT been removed and may be'
+                                ' left at ' + path([self.config['storage'],
+                                                  overlay.name]) + '. Please re'
+                                'move them manually if required.')
+        else:
+            raise Exception('Overlay "' + overlay.name + '" already in the loca'
+                            'l list!')
+
+    def delete(self, overlay):
+        '''
+        Add an overlay to the local list of overlays.
+
+        >>> write = os.tmpnam()
+        >>> write2 = os.tmpnam()
+        >>> write3 = os.tmpnam()
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> config = {'local_list' :
+        ...           here + '/tests/testfiles/global-overlays.xml',
+        ...           'make_conf' : write2,
+        ...           'nocheck'    : True,
+        ...           'storage'   : write3,
+        ...           'quietness':3}
+
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> a = DB(config)
+        >>> config['local_list'] = write
+        >>> b = DB(config)
+        >>> OUT.color_off()
+
+        >>> m = MakeConf(config, b.overlays)
+        >>> m.path = here + '/tests/testfiles/make.conf'
+        >>> m.read()
+
+        >>> m.path = write2
+        >>> m.write()
+
+        # >>> b.add(a.select('wrobel-stable')) #doctest: +ELLIPSIS
+        # * Running command "/usr/bin/rsync -rlptDvz --progress --delete --delete-after --timeout=180 --exclude="distfiles/*" --exclude="local/*" --exclude="packages/*" "rsync://gunnarwrobel.de/wrobel-stable/*" "/tmp/file.../wrobel-stable""...
+        # >>> b.add(a.select('wrobel')) #doctest: +ELLIPSIS
+        # * Running command "/usr/bin/svn co "https://overlays.gentoo.org/svn/dev/wrobel/" "/tmp/file.../wrobel""...
+        # >>> c = Overlays([write, ])
+        # >>> c.overlays.keys()
+        # [u'wrobel', u'wrobel-stable']
+
+        # >>> b.delete(b.select('wrobel'))
+        # >>> c = Overlays([write, ])
+        # >>> c.overlays.keys()
+        # [u'wrobel-stable']
+
+        # >>> m = MakeConf(config, b.overlays)
+        # >>> [i.name for i in m.overlays] #doctest: +ELLIPSIS
+        # [u'wrobel-stable']
+
+        # >>> os.unlink(write)
+        >>> os.unlink(write2)
+        >>> import shutil
+
+        # >>> shutil.rmtree(write3)
+        '''
+
+        if overlay.name in self.overlays.keys():
+            make_conf = MakeConf(self.config, self.overlays)
+            overlay.delete(self.config['storage'])
+            del self.overlays[overlay.name]
+            self.write(self.path)
+            make_conf.delete(overlay)
+        else:
+            raise Exception('No local overlay named "' + overlay.name + '"!')
+
+    def sync(self, overlay_name, quiet = False):
+        '''Synchronize the given overlay.'''
+
+        overlay = self.select(overlay_name)
+
+        if overlay:
+            result = overlay.sync(self.config['storage'], quiet)
+            if result:
+                raise Exception('Syncing overlay "' + overlay_name + 
+                                '" returned status ' + str(result) + '!')
+        else:
+            raise Exception('No such overlay ("' + overlay_name + '")!')
+
+#===============================================================================
+#
+# Class RemoteDB
+#
+#-------------------------------------------------------------------------------
+
+class RemoteDB(Overlays):
+    '''Handles fetching the remote overlay list.'''
+
+    def __init__(self, config):
+
+        self.config = config
+
+        self.proxies = {}
+
+        if config['proxy']:
+            self.proxies['http'] = config['proxy']
+        elif os.getenv('http_proxy'):
+            self.proxies['http'] = os.getenv('http_proxy')
+
+        if self.proxies:
+           proxy_handler = urllib2.ProxyHandler(self.proxies)
+           opener = urllib2.build_opener(proxy_handler)
+           urllib2.install_opener(opener)
+
+        self.urls  = [i.strip() for i in config['overlays'].split('\n') if i]
+
+        paths = [self.path(i) for i in self.urls]
+
+        if config['nocheck']:
+            ignore = 2
+        else:
+            ignore = 0
+
+        quiet = int(config['quietness']) < 3
+
+        Overlays.__init__(self, paths, ignore, quiet)
+
+    def cache(self):
+        '''
+        Copy the remote overlay list to the local cache.
+
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> cache = os.tmpnam()
+        >>> config = {'overlays' :
+        ...           'file://' + here + '/tests/testfiles/global-overlays.xml',
+        ...           'cache' : cache,
+        ...           'nocheck'    : True,
+        ...           'proxy' : None,
+        ...           'quietness':3}
+        >>> a = RemoteDB(config)
+        >>> a.cache()
+        >>> b = open(a.path(config['overlays']))
+        >>> b.readlines()[24]
+        '      A collection of ebuilds from Gunnar Wrobel [wrobel@gentoo.org].\\n'
+
+        >>> b.close()
+        >>> os.unlink(a.path(config['overlays']))
+
+        >>> a.overlays.keys()
+        [u'wrobel', u'wrobel-stable']
+        '''
+        for url in self.urls:
+
+            mpath = self.path(url)
+
+            try:
+
+                # Fetch the remote list
+                olist = urllib2.urlopen(url).read()
+
+                # Create our storage directory if it is missing
+                if not os.path.exists(os.path.dirname(mpath)):
+                    try:
+                        os.makedirs(os.path.dirname(mpath))
+                    except OSError, error:
+                        raise OSError('Failed to create layman storage direct'
+                                      + 'ory ' + os.path.dirname(mpath) + '\n'
+                                      + 'Error was:' + str(error))
+
+                # Before we overwrite the old cache, check that the downloaded
+                # file is intact and can be parsed
+                try:
+                    self.read(olist)
+                except Exception, error:
+                    raise IOError('Failed to parse the overlays list fetched fr'
+                                  'om ' + url + '\nThis means that the download'
+                                  'ed file is somehow corrupt or there was a pr'
+                                  'oblem with the webserver. Check the content '
+                                  'of the file. Error was:\n' + str(error))
+
+                # Ok, now we can overwrite the old cache
+                try:
+                    out_file = open(mpath, 'w')
+                    out_file.write(olist)
+                    out_file.close()
+
+                except Exception, error:
+                    raise IOError('Failed to temporarily cache overlays list in'
+                                  ' ' + mpath + '\nError was:\n' + str(error))
+
+
+            except IOError, error:
+                OUT.warn('Failed to update the overlay list from: '
+                         + url + '\nError was:\n' + str(error))
+
+            try:
+                # Finally parse the contents of the cache
+                self.read_file(mpath)
+            except IOError, error:
+                OUT.warn('Failed to read a cached version of the overlay list f'
+                         'rom ' + url + '. You probably did not download the fi'
+                         'le before. The corresponding entry in your layman.cfg'
+                         ' file will be disregarded.\nError was:\n' + str(error)
+                         )
+
+    def path(self, url):
+        '''Return a unique file name for the url.'''
+
+        base = self.config['cache']
+
+        OUT.debug('Generating cache path.', 6)
+
+        return base + '_' + hashlib.md5(url).hexdigest() + '.xml'
+
+#===============================================================================
+#
+# Helper class MakeConf
+#
+#-------------------------------------------------------------------------------
+
+class MakeConf:
+    '''
+    Handles modifications to /etc/make.conf
+
+    Check that an add/remove cycle does not modify the make.conf:
+
+    >>> import hashlib
+    >>> write = os.tmpnam()
+    >>> here = os.path.dirname(os.path.realpath(__file__))
+    >>> config = {'local_list' :
+    ...           here + '/tests/testfiles/global-overlays.xml',
+    ...           'make_conf' : here + '/tests/testfiles/make.conf',
+    ...           'nocheck'    : True,
+    ...           'storage'   : '/usr/portage/local/layman',
+    ...           'quietness':3}
+    >>> b = DB(config)
+    >>> a = MakeConf(config, b.overlays)
+    >>> o_md5 = str(hashlib.md5(open(here + '/tests/testfiles/make.conf').read()).hexdigest())
+    >>> a.path = write
+    >>> a.add(b.overlays['wrobel-stable'])
+    >>> [i.name for i in a.overlays]
+    [u'wrobel-stable', u'wrobel-stable']
+    >>> a.add(b.overlays['wrobel'])
+    >>> [i.name for i in a.overlays]
+    [u'wrobel', u'wrobel-stable', u'wrobel-stable']
+    >>> a.delete(b.overlays['wrobel-stable'])
+    >>> [i.name for i in a.overlays]
+    [u'wrobel']
+    >>> a.add(b.overlays['wrobel-stable'])
+    >>> [i.name for i in a.overlays]
+    [u'wrobel', u'wrobel-stable']
+    >>> a.delete(b.overlays['wrobel'])
+    >>> n_md5 = str(hashlib.md5(open(write).read()).hexdigest())
+    >>> o_md5 == n_md5
+    True
+    >>> os.unlink(write)
+    '''
+
+    my_re = re.compile('PORTDIR_OVERLAY\s*=\s*"([^"]*)"')
+
+    def __init__(self, config, overlays):
+
+        self.path = config['make_conf']
+        self.storage = config['storage']
+        self.data = ''
+        self.db = overlays
+        self.overlays = []
+        self.extra = []
+
+        self.read()
+
+    def add(self, overlay):
+        '''
+        Add an overlay to make.conf.
+
+        >>> write = os.tmpnam()
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> config = {'local_list' :
+        ...           here + '/tests/testfiles/global-overlays.xml',
+        ...           'make_conf' : here + '/tests/testfiles/make.conf',
+        ...           'nocheck'    : True,
+        ...           'storage'   : '/usr/portage/local/layman',
+        ...           'quietness':3}
+        >>> c = DB(config)
+        >>> a = MakeConf(config, c.overlays)
+        >>> a.path = write
+        >>> a.add(c.select('wrobel'))
+        >>> config['make_conf'] = write
+        >>> b = MakeConf(config, c.overlays)
+        >>> [i.name for i in b.overlays]
+        [u'wrobel', u'wrobel-stable']
+        >>> b.extra
+        [u'/usr/portage/local/ebuilds/testing', u'/usr/portage/local/ebuilds/stable', u'/usr/portage/local/kolab2', u'/usr/portage/local/gentoo-webapps-overlay/experimental', u'/usr/portage/local/gentoo-webapps-overlay/production-ready']
+
+        >>> os.unlink(write)
+        '''
+        self.overlays.append(overlay)
+        self.write()
+
+    def delete(self, overlay):
+        '''
+        Delete an overlay from make.conf.
+
+        >>> write = os.tmpnam()
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> config = {'local_list' :
+        ...           here + '/tests/testfiles/global-overlays.xml',
+        ...           'make_conf' : here + '/tests/testfiles/make.conf',
+        ...           'nocheck'    : True,
+        ...           'storage'   : '/usr/portage/local/layman',
+        ...           'quietness':3}
+        >>> c = DB(config)
+        >>> a = MakeConf(config, c.overlays)
+        >>> a.path = write
+        >>> a.delete(c.select('wrobel-stable'))
+        >>> config['make_conf'] = write
+        >>> b = MakeConf(config, c.overlays)
+        >>> [i.name for i in b.overlays]
+        []
+        >>> b.extra
+        [u'/usr/portage/local/ebuilds/testing', u'/usr/portage/local/ebuilds/stable', u'/usr/portage/local/kolab2', u'/usr/portage/local/gentoo-webapps-overlay/experimental', u'/usr/portage/local/gentoo-webapps-overlay/production-ready']
+
+        >>> os.unlink(write)
+        '''
+        self.overlays = [i
+                         for i in self.overlays
+                         if i.name != overlay.name]
+        self.write()
+
+    def read(self):
+        '''
+        Read the list of registered overlays from /etc/make.conf.
+
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> config = {'local_list' :
+        ...           here + '/tests/testfiles/global-overlays.xml',
+        ...           'make_conf' : here + '/tests/testfiles/make.conf',
+        ...           'nocheck'    : True,
+        ...           'storage'   : '/usr/portage/local/layman',
+        ...           'quietness':3}
+        >>> c = DB(config)
+        >>> a = MakeConf(config, c.overlays)
+        >>> [i.name for i in a.overlays]
+        [u'wrobel-stable']
+        >>> a.extra
+        [u'/usr/portage/local/ebuilds/testing', u'/usr/portage/local/ebuilds/stable', u'/usr/portage/local/kolab2', u'/usr/portage/local/gentoo-webapps-overlay/experimental', u'/usr/portage/local/gentoo-webapps-overlay/production-ready']
+        '''
+        if os.path.isfile(self.path):
+            self.content()
+
+            overlays = self.my_re.search(self.data)
+
+            if not overlays:
+                raise Exception('Did not find a PORTDIR_OVERLAY entry in file ' +
+                                self.path +'! Did you specify the correct file?')
+
+            overlays = [i.strip()
+                        for i in overlays.group(1).split('\n')
+                        if i.strip()]
+
+            for i in overlays:
+                if i[:len(self.storage)] == self.storage:
+                    oname = os.path.basename(i)
+                    if  oname in self.db.keys():
+                        self.overlays.append(self.db[oname])
+                    else:
+                        # These are additional overlays that we dont know
+                        # anything about. The user probably added them manually
+                        self.extra.append(i)
+                else:
+                    # These are additional overlays that we dont know anything
+                    # about. The user probably added them manually
+                    self.extra.append(i)
+
+
+        else:
+            self.overlays = []
+            self.data     = 'PORTDIR_OVERLAY="\n"\n'
+
+        self.extra = [i for i in self.extra
+                         if (i != '$PORTDIR_OVERLAY'
+                             and i != '${PORTDIR_OVERLAY}')]
+
+    def write(self):
+        '''
+        Write the list of registered overlays to /etc/make.conf.
+
+        >>> write = os.tmpnam()
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> config = {'local_list' :
+        ...           here + '/tests/testfiles/global-overlays.xml',
+        ...           'make_conf' : here + '/tests/testfiles/make.conf',
+        ...           'nocheck'    : True,
+        ...           'storage'   : '/usr/portage/local/layman',
+        ...           'quietness':3}
+        >>> c = DB(config)
+        >>> a = MakeConf(config, c.overlays)
+        >>> a.path = write
+        >>> a.write()
+        >>> config['make_conf'] = write
+        >>> b = MakeConf(config, c.overlays)
+        >>> [i.name for i in b.overlays]
+        [u'wrobel-stable']
+        >>> b.extra
+        [u'/usr/portage/local/ebuilds/testing', u'/usr/portage/local/ebuilds/stable', u'/usr/portage/local/kolab2', u'/usr/portage/local/gentoo-webapps-overlay/experimental', u'/usr/portage/local/gentoo-webapps-overlay/production-ready']
+
+        >>> os.unlink(write)
+        '''
+        def prio_sort(a, b):
+            '''Sort by priority.'''
+            if a.priority < b.priority:
+                return -1
+            elif a.priority > b.priority:
+                return 1
+            return 0
+
+        self.overlays.sort(prio_sort)
+
+        paths = []
+        for i in self.overlays:
+            paths.append(path((self.storage, i.name, )))
+
+        overlays = 'PORTDIR_OVERLAY="\n'
+        overlays += '\n'.join(paths) + '\n'
+        overlays += '$PORTDIR_OVERLAY\n'
+        overlays += '\n'.join(self.extra)
+        overlays += '"'
+
+        content = self.my_re.sub(overlays, self.data)
+
+        if not self.my_re.search(content):
+            raise Exception('Ups, failed to set a proper PORTDIR_OVERLAY entry '
+                            'in file ' + self.path +'! Did not overwrite the fi'
+                            'le.')
+
+        try:
+            make_conf = codecs.open(self.path, 'w', 'utf-8')
+
+            make_conf.write(content)
+
+            make_conf.close()
+
+        except Exception, error:
+            raise Exception('Failed to read "' + self.path + '".\nError was:\n'
+                            + str(error))
+
+    def content(self):
+        '''
+        Returns the content of the /etc/make.conf file.
+        '''
+        try:
+            make_conf = codecs.open(self.path, 'r', 'utf-8')
+
+            self.data = make_conf.read()
+
+            make_conf.close()
+
+        except Exception, error:
+            raise Exception('Failed to read "' + self.path + '".\nError was:\n'
+                            + str(error))
+
+#===============================================================================
+#
+# Testing
+#
+#-------------------------------------------------------------------------------
+
+if __name__ == '__main__':
+    import doctest, sys
+
+    # Ignore warnings here. We are just testing
+    from warnings     import filterwarnings, resetwarnings
+    filterwarnings('ignore')
+
+    doctest.testmod(sys.modules[__name__])
+
+    resetwarnings()
diff --git a/commands/lib/layman/debug.py b/commands/lib/layman/debug.py
new file mode 100644 (file)
index 0000000..c5cf3a0
--- /dev/null
@@ -0,0 +1,507 @@
+#################################################################################
+# LAYMAN - DEBUGGING FUNCTIONS
+#################################################################################
+# debug.py -- Utility function for debugging
+# Copyright 2005 - 2008 Gunnar Wrobel
+# Distributed under the terms of the GNU General Public License v2
+
+__version__ = "$Id: debug.py 153 2006-06-05 06:03:16Z wrobel $"
+
+#################################################################################
+##
+## Dependancies
+##
+#################################################################################
+
+import sys, inspect, types
+
+from   optparse      import OptionGroup
+
+#################################################################################
+##
+## Color codes (taken from portage)
+##
+#################################################################################
+
+esc_seq = '\x1b['
+
+codes = {}
+codes['reset']     = esc_seq + '39;49;00m'
+codes['red']       = esc_seq + '31;01m'
+codes['green']     = esc_seq + '32;01m'
+codes['yellow']    = esc_seq + '33;01m'
+codes['turquoise'] = esc_seq + '36;01m'
+
+#################################################################################
+##
+## Message Class
+##
+#################################################################################
+
+class Message:
+    #FIXME: Think about some simple doctests before you modify this class the
+    #       next time.
+
+    def __init__(self, module = '',
+                 err = sys.stderr,
+                 dbg = sys.stderr,
+                 debugging_level = 4,
+                 debugging_verbosity = 2,
+                 info_level = 4,
+                 warn_level = 4,
+                 col = True,
+                 mth = ['*'],
+                 obj = ['*'],
+                 var = ['*']):
+
+        # A description of the module that is being debugged
+        self.debug_env = module
+
+        # Where should the debugging output go? This can also be a file
+        self.debug_out = dbg
+
+        # Where should the error output go? This can also be a file
+        self.error_out = err
+
+        # The higher the level the more information you will get
+        self.warn_lev = warn_level
+
+        # The higher the level the more information you will get
+        self.info_lev = info_level
+
+        # The highest level of debugging messages acceptable for output
+        # The higher the level the more output you will get
+        self.debug_lev = debugging_level
+
+        # The debugging output can range from very verbose (3) to
+        # very compressed (1)
+        self.debug_vrb = debugging_verbosity
+
+        # Which methods should actually be debugged?
+        # Use '*' to indicate 'All methods'
+        self.debug_mth = mth
+
+        # Which objects should actually be debugged?
+        # Use '*' to indicate 'All objects'
+        self.debug_obj = obj
+
+        # Which variables should actually be debugged?
+        # Use '*' to indicate 'All variables'
+        self.debug_var = var
+
+        # Exclude class variables by default
+        self.show_class_variables = False
+
+        # Should the output be colored?
+        self.use_color = col
+
+        self.has_error = False
+
+
+    ############################################################################
+    # Add command line options
+
+    def cli_opts(self, parser):
+
+        group = OptionGroup(parser,
+                            '<Debugging options>',
+                            'Control the debugging features of '
+                           + self.debug_env)
+
+        group.add_option('--debug',
+                         action = 'store_true',
+                         help = 'Activates debugging features.')
+
+        group.add_option('--debug-level',
+                         action = 'store',
+                         type = 'int',
+                         help = 'A value between 0 and 10. 0 means no debugging '
+                         'messages will be selected, 10 selects all debugging me'
+                         'ssages. Default is "4".')
+
+        group.add_option('--debug-verbose',
+                         action = 'store',
+                         type = 'int',
+                         help = 'A value between 1 and 3. Lower values yield les'
+                         's verbose debugging output. Default is "2".')
+
+        group.add_option('--debug-methods',
+                         action = 'store',
+                         help = 'Limits the methods that will return debugging o'
+                         'utput. The function name is sufficient and there is no'
+                         'difference between class methods or general functions.'
+                         ' Several methods can be specified by seperating them w'
+                         ' with a comma. Default is "*" which specifies all meth'
+                         'ods.')
+
+        group.add_option('--debug-classes',
+                         action = 'store',
+                         help = 'Limits the classes that will return debugging o'
+                         'utput. Specify only the class name not including the m'
+                         'odules in which the class is defined (e.g. MyModule.ma'
+                         'in.Main should only be represented by "Main"). Several'
+                         'classes can be specified by seperating them with a com'
+                         'ma. Default is "*" which specifies all classes.')
+
+        group.add_option('--debug-variables',
+                         action = 'store',
+                         help = 'Limits the variables that will return debugging'
+                         ' output. Several variables can be specified by seperat'
+                         'ing them with a comma. Default is "*" which specifies '
+                         'all variables.')
+
+        group.add_option('--debug-class-vars',
+                         action = 'store_true',
+                         help = 'In default mode the debugging code will only re'
+                         'turn information on the local variable which does not '
+                         'include the class variables. Use this switch to add al'
+                         'l values that are provided by "self".')
+
+        group.add_option('--debug-nocolor',
+                         action = 'store_true',
+                         help = 'Deactivates colors in the debugging output.')
+
+        parser.add_option_group(group)
+
+
+    #############################################################################
+    # Handle command line options
+
+    def cli_handle(self, options):
+
+        if (options.__dict__.has_key('debug')
+            and options.__dict__['debug']):
+            self.debug_on()
+        else:
+            self.debug_off()
+            return
+
+        if (options.__dict__.has_key('debug_class_vars')
+            and options.__dict__['debug_class_vars']):
+            self.class_variables_on()
+        else:
+            self.class_variables_off()
+
+        if (options.__dict__.has_key('debug_nocolor')
+            and options.__dict__['debug_nocolor']):
+            self.color_off()
+        else:
+            self.color_on()
+
+        if (options.__dict__.has_key('debug_level') and
+            options.__dict__['debug_level']):
+            dbglvl = int(options.__dict__['debug_level'])
+            if dbglvl < 0:
+                dbglvl = 0
+            if dbglvl > 10:
+                dbglvl = 10
+            self.set_debug_level(dbglvl)
+
+        if (options.__dict__.has_key('debug_verbose') and
+            options.__dict__['debug_verbose']):
+            dbgvrb = int(options.__dict__['debug_verbose'])
+            if dbgvrb < 1:
+                dbgvrb = 1
+            if dbgvrb > 3:
+                dbgvrb = 3
+            self.set_debug_verbosity(dbgvrb)
+
+        for i in [('debug_methods',   self.set_debug_methods),
+                  ('debug_classes',   self.set_debug_classes),
+                  ('debug_variables', self.set_debug_variables),]:
+
+            if (options.__dict__.has_key(i[0]) and
+                options.__dict__[i[0]]):
+                i[1](options.__dict__[i[0]])
+
+
+    #############################################################################
+    ## Helper Functions
+
+    def set_module(self, module):
+
+        self.debug_env = module
+
+    def set_debug_methods(self, methods):
+
+        methods = methods.split(',')
+
+        if methods:
+            self.debug_mth = methods
+
+    def set_debug_classes(self, classes):
+
+        classes = classes.split(',')
+
+        if classes:
+            self.debug_obj = classes
+
+    def set_debug_variables(self, variables):
+
+        variables = variables.split(',')
+
+        if variables:
+            self.debug_var = variables
+
+    def maybe_color (self, col, text):
+        if self.use_color:
+            return codes[col] + text + codes['reset']
+        return text
+
+    def set_info_level(self, info_level = 4):
+        self.info_lev = info_level
+
+    def info_off(self):
+        self.set_info_level(0)
+
+    def info_on(self, info_level = 4):
+        self.set_info_level(info_level)
+
+    def set_warn_level(self, warn_level = 4):
+        self.warn_lev = warn_level
+
+    def warn_off(self):
+        self.set_warn_level(0)
+
+    def warn_on(self, warn_level = 4):
+        self.set_warn_level(warn_level)
+
+    def set_debug_level(self, debugging_level = 4):
+        self.debug_lev = debugging_level
+
+    def set_debug_verbosity(self, debugging_verbosity = 2):
+        self.debug_vrb = debugging_verbosity
+
+    def debug_off(self):
+        self.set_debug_level(0)
+
+    def debug_on(self):
+        self.set_debug_level()
+
+    def color_off(self):
+        self.use_color = False
+
+    def color_on(self):
+        self.use_color = True
+
+    def class_variables_off(self):
+        self.show_class_variables = False
+
+    def class_variables_on(self):
+        self.show_class_variables = True
+
+    #############################################################################
+    ## Output Functions
+
+    def notice (self, note):
+        print note
+
+    def info (self, info, level = 4):
+
+        if type(info) not in types.StringTypes:
+            info = str(info)
+
+        if level > self.info_lev:
+            return
+
+        for i in info.split('\n'):
+            print self.maybe_color('green', '* ') + i
+
+    def status (self, message, status, info = 'ignored'):
+
+        if type(message) not in types.StringTypes:
+            message = str(message)
+
+        lines = message.split('\n')
+
+        if not lines:
+            return
+
+        for i in lines[0:-1]:
+            print self.maybe_color('green', '* ') + i
+
+        i = lines[-1]
+
+        if len(i) > 58:
+            i = i[0:57]
+
+        if status == 1:
+            result = '[' + self.maybe_color('green', 'ok') + ']'
+        elif status == 0:
+            result = '[' + self.maybe_color('red', 'failed') + ']'
+        else:
+            result = '[' + self.maybe_color('yellow', info) + ']'
+
+        print self.maybe_color('green', '* ') + i + ' ' + '.' * (58 - len(i))  \
+              + ' ' + result
+
+    def warn (self, warn, level = 4):
+
+        if type(warn) not in types.StringTypes:
+            warn = str(warn)
+
+        if level > self.warn_lev:
+            return
+
+        for i in warn.split('\n'):
+            print self.maybe_color('yellow', '* ') + i
+
+    def error (self, error):
+
+        if type(error) not in types.StringTypes:
+            error = str(error)
+
+        for i in error.split('\n'):
+            print >> self.error_out, self.maybe_color('red', '* ') + i
+        self.has_error = True
+
+    def die (self, error):
+
+        if type(error) not in types.StringTypes:
+            error = str(error)
+
+        for i in error.split('\n'):
+            self.error(self.maybe_color('red', 'Fatal error: ') + i)
+        self.error(self.maybe_color('red', 'Fatal error(s) - aborting'))
+        sys.exit(1)
+
+    def debug (self, message, level = 4):
+        '''
+        This is a generic debugging method.
+        '''
+        ## Check the debug level first. This is the most inexpensive check.
+        if level > self.debug_lev:
+            return
+
+        ## Maybe this should be debugged. So get the stack first.
+        stack = inspect.stack()
+
+        ## This can probably never happen but does not harm to check
+        ## that there is actually something calling this function
+        if len(stack) < 2:
+            return
+
+        ## Get the stack length to determine indentation of the debugging output
+        stacklength = len(stack)
+        ls = '  ' * stacklength
+
+        ## Get the information about the caller
+        caller = stack[1]
+
+        ## The function name of the calling frame is the fourth item in the list
+        callermethod = caller[3]
+
+        ## Is this actually one of the methods that should be debugged?
+        if not '*' in self.debug_mth and not callermethod in self.debug_mth:
+            return
+
+        ## Still looks like this should be debugged. So retrieve the dictionary
+        ## of local variables from the caller
+        callerlocals = inspect.getargvalues(caller[0])[3]
+
+        ## Is the caller an obejct? If so he provides 'self'
+        if 'self' in callerlocals.keys():
+            callerobject = callerlocals['self']
+            del callerlocals['self']
+            if self.show_class_variables:
+                cv = inspect.getmembers(callerobject,
+                                        lambda x: not inspect.ismethod(x))
+                callerlocals.sync(cv)
+        else:
+            callerobject = None
+
+        # Remove variables not requested
+        if not '*' in self.debug_var:
+            callerlocals = dict([i for i in callerlocals.items()
+                                 if i[0] in self.debug_var])
+
+        ## Is the object among the list of objects to debug?
+        if (not '*' in self.debug_obj and
+            not str(callerobject.__class__.__name__) in self.debug_obj):
+            return
+
+        if type(message) not in types.StringTypes:
+            message = str(message)
+
+        def breaklines(x):
+            '''
+            Helper function to keep width of the debugging output.
+
+            This may look ugly for arrays but it is acceptable and not
+            breaking the line would break the output format
+            '''
+            ## Get the number of lines we need (rounded down)
+            lines = len(x) // 60
+            if lines > 0:
+                for j in range(lines):
+                    ## Print line with continuation marker
+                    print >> self.debug_out, ls + '// ' + x[0:60] + ' \\'
+                    ## Remove printed characters from output
+                    x = x[60:]
+            ## Print final line
+            print >> self.debug_out, ls + '// ' + x 
+
+        if self.debug_vrb == 1:
+            # Top line indicates class and method
+            c = ''
+            if callerobject:
+                c += 'Class: ' + str(callerobject.__class__.__name__) + ' | '
+            if callermethod:
+                c += 'Method: ' + str(callermethod)
+            print >> self.debug_out, '// ' + c
+            # Selected variables follow
+            if callerlocals:
+                for i,j in callerlocals.items():
+                    print >> self.debug_out, '// '                              \
+                          + self.maybe_color('turquoise', str(i)) + ':' + str(j)
+            # Finally the message
+            print >> self.debug_out, self.maybe_color('yellow', message)
+            return
+
+        if self.debug_vrb == 3:
+            print >> self.debug_out, ls + '/////////////////////////////////' + \
+                  '////////////////////////////////'
+
+            # General information about what is being debugged
+            #(module name or similar)
+            print >> self.debug_out, ls + '// ' + self.debug_env
+        print >> self.debug_out, ls + '//-----------------------------------' + \
+              '----------------------------'
+
+        ## If the caller is a class print the name here
+        if callerobject:
+            print >> self.debug_out, ls +                                       \
+                  '// Object Class: ' + str(callerobject.__class__.__name__)
+
+        ## If the method has been extracted print it here
+        if callermethod:
+            print >> self.debug_out, ls + '// '                                 \
+                  + self.maybe_color('green', 'Method: ') + str(callermethod)
+            if self.debug_vrb == 3:
+                print >> self.debug_out, ls + '//---------------------------' + \
+                      '------------------------------------'
+
+        ## Print the information on all available local variables
+        if callerlocals:
+            if self.debug_vrb == 3:
+                print >> self.debug_out, ls + '//'
+                print >> self.debug_out, ls + '// VALUES '
+            for i,j in callerlocals.items():
+                print >> self.debug_out, ls + '// ------------------> '         \
+                      + self.maybe_color('turquoise', str(i)) + ':'
+                breaklines(str(j))
+            if self.debug_vrb == 3:
+                print >> self.debug_out, ls + '//------------------------------'\
+                      '---------------------------------'
+
+        # Finally print the message
+        breaklines(self.maybe_color('yellow', message))
+
+        if self.debug_vrb == 3:
+            print >> self.debug_out, ls + '//-------------------------------' + \
+                  '--------------------------------'
+            print >> self.debug_out, ls + '/////////////////////////////////' + \
+                  '////////////////////////////////'
+
+## gloabal message handler
+OUT = Message('layman')
diff --git a/commands/lib/layman/overlay.py b/commands/lib/layman/overlay.py
new file mode 100644 (file)
index 0000000..fadb59d
--- /dev/null
@@ -0,0 +1,244 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN OVERLAY HANDLER
+#################################################################################
+# File:       overlay.py
+#
+#             Access to an xml list of overlays
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#
+'''Main handler for overlays.'''
+
+__version__ = "$Id: overlay.py 273 2006-12-30 15:54:50Z wrobel $"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+import sys, codecs, os, os.path, xml.dom.minidom
+
+from   layman.overlays.bzr       import BzrOverlay
+from   layman.overlays.darcs     import DarcsOverlay
+from   layman.overlays.git       import GitOverlay
+from   layman.overlays.mercurial import MercurialOverlay
+from   layman.overlays.cvs       import CvsOverlay
+from   layman.overlays.svn       import SvnOverlay
+from   layman.overlays.rsync     import RsyncOverlay
+from   layman.overlays.tar       import TarOverlay
+
+from   layman.debug              import OUT
+
+#===============================================================================
+#
+# Constants
+#
+#-------------------------------------------------------------------------------
+
+OVERLAY_TYPES = {'git'       : GitOverlay,
+                 'cvs'       : CvsOverlay,
+                 'svn'       : SvnOverlay,
+                 'rsync'     : RsyncOverlay,
+                 'tar'       : TarOverlay,
+                 'bzr'       : BzrOverlay,
+                 'mercurial' : MercurialOverlay,
+                 'darcs'     : DarcsOverlay}
+
+#===============================================================================
+#
+# Class Overlays
+#
+#-------------------------------------------------------------------------------
+
+class Overlays:
+    ''' Handle a list of overlays.'''
+
+    def __init__(self, paths, ignore = 0, quiet = False):
+
+        self.quiet = quiet
+        self.paths = paths
+        self.ignore = ignore
+
+        self.overlays = {}
+
+        OUT.debug('Initializing overlay list handler', 8)
+
+        for path in self.paths:
+            if os.path.exists(path):
+                self.read_file(path)
+
+    def read_file(self, path):
+        '''Read the overlay definition file.'''
+
+        try:
+            document = open(path).read()
+
+        except Exception, error:
+            raise IOError('Failed to read the overlay list at ("'
+                          + path + '")!\nError was:\n' + str(error))
+
+
+        self.read(document)
+
+    def read(self, document):
+        '''
+        Read an xml list of overlays.
+
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+
+        >>> a = Overlays([here + '/tests/testfiles/global-overlays.xml', ])
+        >>> a.overlays.keys()
+        [u'wrobel', u'wrobel-stable']
+
+        >>> a.overlays['wrobel-stable'].data['&src']
+        u'rsync://gunnarwrobel.de/wrobel-stable'
+        '''
+        try:
+            document = xml.dom.minidom.parseString(document)
+
+        except Exception, error:
+            raise Exception('Failed to parse the overlay list!\nError was:\n'
+                            + str(error))
+
+        overlays = document.getElementsByTagName('overlay')
+
+        for overlay in overlays:
+
+            OUT.debug('Parsing overlay entry', 8)
+
+            for index in range(0, overlay.attributes.length):
+                attr = overlay.attributes.item(index)
+                if attr.name == 'type':
+                    if attr.nodeValue in OVERLAY_TYPES.keys():
+                        try:
+                            ovl = OVERLAY_TYPES[attr.nodeValue](overlay,
+                                                                self.ignore,
+                                                                self.quiet)
+                            self.overlays[ovl.name] = ovl
+                        except Exception, error:
+                            OUT.warn(str(error), 3)
+                    else:
+                        raise Exception('Unknown overlay type "' +
+                                        attr.nodeValue + '"!')
+
+    def write(self, path):
+        '''
+        Write the list of overlays to a file.
+
+        >>> write = os.tmpnam()
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+
+        >>> a = Overlays([here + '/tests/testfiles/global-overlays.xml', ])
+        >>> b = Overlays([write,])
+        >>> b.overlays['wrobel-stable'] = a.overlays['wrobel-stable']
+        >>> b.write(write)
+        >>> c = Overlays([write,])
+        >>> c.overlays.keys()
+        [u'wrobel-stable']
+
+        >>> os.unlink(write)
+        '''
+
+        imp = xml.dom.minidom.getDOMImplementation()
+
+        doc = imp.createDocument('layman', 'overlays', None)
+
+        root =  doc.childNodes[0]
+
+        for name, overlay in self.overlays.items():
+
+            root.appendChild(overlay.to_minidom(doc))
+
+        try:
+
+            out_file = codecs.open(path, 'w', 'utf-8')
+
+            doc.writexml(out_file, '', '  ', '\n')
+
+        except Exception, error:
+            raise Exception('Failed to write to local overlays file: '
+                            + path + '\nError was:\n' + str(error))
+
+    def select(self, overlay):
+        '''
+        Select an overlay from the list.
+
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> a = Overlays([here + '/tests/testfiles/global-overlays.xml', ])
+        >>> a.select('wrobel-stable').data['&src']
+        u'rsync://gunnarwrobel.de/wrobel-stable'
+        '''
+        if overlay in self.overlays.keys():
+            return self.overlays[overlay]
+
+    def list(self, verbose = False, width = 0):
+        '''
+        List all overlays.
+
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> a = Overlays([here + '/tests/testfiles/global-overlays.xml', ])
+        >>> for i in a.list(True):
+        ...     print i[0]
+        wrobel
+        ~~~~~~
+        Source  : https://overlays.gentoo.org/svn/dev/wrobel
+        Contact : nobody@gentoo.org
+        Type    : Subversion; Priority: 10
+        <BLANKLINE>
+        Description:
+          Test
+        <BLANKLINE>
+        wrobel-stable
+        ~~~~~~~~~~~~~
+        Source  : rsync://gunnarwrobel.de/wrobel-stable
+        Contact : nobody@gentoo.org
+        Type    : Rsync; Priority: 50
+        <BLANKLINE>
+        Description:
+          A collection of ebuilds from Gunnar Wrobel [wrobel@gentoo.org].
+        <BLANKLINE>
+
+        >>> for i in a.list(False, 80):
+        ...     print i[0]
+        wrobel                    [Subversion] (https://o.g.o/svn/dev/wrobel         )
+        wrobel-stable             [Rsync     ] (rsync://gunnarwrobel.de/wrobel-stable)
+        '''
+        result = []
+
+        for name, overlay in self.overlays.items():
+
+            if verbose:
+                result.append((str(overlay), overlay.is_supported(),
+                               overlay.is_official()))
+            else:
+                result.append((overlay.short_list(width), overlay.is_supported(),
+                               overlay.is_official()))
+
+        result = sorted(result)
+
+        return result
+
+#===============================================================================
+#
+# Testing
+#
+#-------------------------------------------------------------------------------
+
+if __name__ == '__main__':
+    import doctest, sys
+
+    # Ignore warnings here. We are just testing
+    from warnings     import filterwarnings, resetwarnings
+    filterwarnings('ignore')
+
+    doctest.testmod(sys.modules[__name__])
+
+    resetwarnings()
diff --git a/commands/lib/layman/overlays/__init__.py b/commands/lib/layman/overlays/__init__.py
new file mode 100644 (file)
index 0000000..792d600
--- /dev/null
@@ -0,0 +1 @@
+#
diff --git a/commands/lib/layman/overlays/bzr.py b/commands/lib/layman/overlays/bzr.py
new file mode 100644 (file)
index 0000000..4c14278
--- /dev/null
@@ -0,0 +1,66 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN BZR OVERLAY HANDLER
+#################################################################################
+# File:       bzr.py
+#
+#             Handles bzr overlays
+#
+# Copyright:
+#             (c) 2005 - 2008 Adrian Perez, Gunnar Wrobel
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Adrian Perez <moebius@connectical.net>
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#
+'''Should work with any version of Bzr equal to or better than 0.7 --
+ caution: tested only with 0.8 and 0.8.2...'''
+
+__version__ = "$Id: bzr.py 236 2006-09-05 20:39:37Z wrobel $"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+from   layman.utils             import path
+from   layman.overlays.overlay  import Overlay
+
+#===============================================================================
+#
+# Class BzrOverlay
+#
+#-------------------------------------------------------------------------------
+
+class BzrOverlay(Overlay):
+    ''' Handles bzr overlays.'''
+
+    type = 'Bzr'
+
+    binary_command  = '/usr/bin/bzr'
+
+    def add(self, base, quiet = False):
+        '''Add overlay.'''
+
+        self.supported()
+
+        return self.cmd(self.binary_command + ' get "' + self.src + '/" "' +\
+                        path([base, self.name]) + '"')
+
+    def sync(self, base, quiet = False):
+        '''Sync overlay.'''
+
+        self.supported()
+
+        return self.cmd('cd "' + path([base, self.name]) + '" && ' +          \
+                        self.binary_command + ' pull --overwrite "' + self.src \
+                        + '"')
+
+    def supported(self):
+        '''Overlay type supported?'''
+
+        return Overlay.supported(self, [(self.binary_command,  'bzr',
+                                         'dev-util/bzr'),])
diff --git a/commands/lib/layman/overlays/cvs.py b/commands/lib/layman/overlays/cvs.py
new file mode 100644 (file)
index 0000000..096dfea
--- /dev/null
@@ -0,0 +1,83 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN CVS OVERLAY HANDLER
+#################################################################################
+# File:       cvs.py
+#
+#             Handles cvs overlays
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#
+''' Cvs overlay support.'''
+
+__version__ = "$Id$"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+from   layman.utils             import path
+from   layman.overlays.overlay  import Overlay
+
+#===============================================================================
+#
+# Class CvsOverlay
+#
+#-------------------------------------------------------------------------------
+
+class CvsOverlay(Overlay):
+    ''' Handles cvs overlays.'''
+
+    type = 'cvs'
+
+    binary = '/usr/bin/cvs'
+
+    def __init__(self, xml, ignore = 0, quiet = False):
+
+        Overlay.__init__(self, xml, ignore, quiet)
+
+        if '&subpath' in self.data.keys():
+            self.subpath = self.data['&subpath']
+        else:
+            self.subpath = ''
+
+    def add(self, base, quiet = False):
+        '''Add overlay.'''
+
+        self.supported()
+
+        if quiet:
+            quiet_option = ' -q'
+        else:
+            quiet_option = ''
+
+        return self.cmd('cd "' + base + '" && CVSROOT="' + self.src + '" ' + 
+                        self.binary + quiet_option + ' co -d "' + self.name 
+                        + '" "' + self.subpath + '"' )
+
+    def sync(self, base, quiet = False):
+        '''Sync overlay.'''
+
+        self.supported()
+
+        if quiet:
+            quiet_option = ' -q'
+        else:
+            quiet_option = ''
+
+        return self.cmd('cd "' + path([base, self.name]) + '" && ' +
+                        self.binary + quiet_option + ' update')
+
+    def supported(self):
+        '''Overlay type supported?'''
+
+        return Overlay.supported(self, [(self.binary,  'cvs',
+                                         'dev-util/cvs'),])
diff --git a/commands/lib/layman/overlays/darcs.py b/commands/lib/layman/overlays/darcs.py
new file mode 100644 (file)
index 0000000..0d27d5e
--- /dev/null
@@ -0,0 +1,64 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN DARCS OVERLAY HANDLER
+#################################################################################
+# File:       darcs.py
+#
+#             Handles darcs overlays
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel, Andres Loeh
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#             Andres Loeh <kosmikus@gentoo.org>
+#
+''' Darcs overlay support.'''
+
+__version__ = "$Id: darcs.py 236 2006-09-05 20:39:37Z wrobel $"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+from   layman.utils             import path
+from   layman.overlays.overlay  import Overlay
+
+#===============================================================================
+#
+# Class BzrOverlay
+#
+#-------------------------------------------------------------------------------
+
+class DarcsOverlay(Overlay):
+    ''' Handles darcs overlays.'''
+
+    type = 'Darcs'
+
+    binary_command  = '/usr/bin/darcs'
+
+    def add(self, base, quiet = False):
+        '''Add overlay.'''
+
+        self.supported()
+
+        return self.cmd(self.binary_command + ' get --partial "' + self.src +
+                        '/" "' + path([base, self.name]) + '"')
+
+    def sync(self, base, quiet = False):
+        '''Sync overlay.'''
+
+        self.supported()
+
+        return self.cmd('cd "' + path([base, self.name]) + '" && ' +
+                        self.binary_command + ' pull --all "' + self.src + '"')
+
+    def supported(self):
+        '''Overlay type supported?'''
+
+        return Overlay.supported(self, [(self.binary_command,  'darcs',
+                                         'dev-util/darcs'),])
diff --git a/commands/lib/layman/overlays/git.py b/commands/lib/layman/overlays/git.py
new file mode 100644 (file)
index 0000000..bda2df0
--- /dev/null
@@ -0,0 +1,77 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN GIT OVERLAY HANDLER
+#################################################################################
+# File:       git.py
+#
+#             Handles git overlays
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel, Stefan Schweizer
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#             Stefan Schweizer <genstef@gentoo.org>
+''' Git overlay support.'''
+
+__version__ = "$Id: git.py 146 2006-05-27 09:52:36Z wrobel $"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+from   layman.utils             import path
+from   layman.overlays.overlay  import Overlay
+
+#===============================================================================
+#
+# Class GitOverlay
+#
+#-------------------------------------------------------------------------------
+
+class GitOverlay(Overlay):
+    ''' Handles git overlays.'''
+
+    type = 'Git'
+
+    binary_command  = '/usr/bin/git'
+
+    def add(self, base, quiet = False):
+        '''Add overlay.'''
+
+        self.supported()
+
+        if quiet:
+            quiet_option = '-q '
+        else:
+            quiet_option = ''
+        # http:// should get trailing slash, other protocols shouldn't
+        slash = ''
+        if self.src.split(':')[0] == 'http':
+            slash = '/'
+        return self.cmd(self.binary_command + ' clone ' + quiet_option + '"' + self.src + slash
+                        + '" "' + path([base, self.name]) + '"')
+
+    def sync(self, base, quiet = False):
+        '''Sync overlay.'''
+
+        self.supported()
+
+        if quiet:
+            quiet_option = ' -q'
+        else:
+            quiet_option = ''
+        return self.cmd('cd "' + path([base, self.name]) + '" && '
+                        + self.binary_command + ' pull' + quiet_option)
+
+    def supported(self):
+        '''Overlay type supported?'''
+
+        return Overlay.supported(self, [(self.binary_command,  'git',
+                                         'dev-util/git'),])
diff --git a/commands/lib/layman/overlays/mercurial.py b/commands/lib/layman/overlays/mercurial.py
new file mode 100644 (file)
index 0000000..b010c8b
--- /dev/null
@@ -0,0 +1,64 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN MERCURIAL OVERLAY HANDLER
+#################################################################################
+# File:       darcs.py
+#
+#             Handles darcs overlays
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel, Andres Loeh
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#             Andres Loeh <kosmikus@gentoo.org>
+#
+''' Mercurial overlay support.'''
+
+__version__ = "$Id: mercurial.py 236 2006-09-05 20:39:37Z wrobel $"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+from   layman.utils             import path
+from   layman.overlays.overlay  import Overlay
+
+#===============================================================================
+#
+# Class MercurialOverlay
+#
+#-------------------------------------------------------------------------------
+
+class MercurialOverlay(Overlay):
+    ''' Handles mercurial overlays.'''
+
+    type = 'Mercurial'
+
+    binary_command  = '/usr/bin/hg'
+
+    def add(self, base, quiet = False):
+        '''Add overlay.'''
+
+        self.supported()
+
+        return self.cmd(self.binary_command + ' clone "' + self.src + '/" "' +
+                        path([base, self.name]) + '"')
+
+    def sync(self, base, quiet = False):
+        '''Sync overlay.'''
+
+        self.supported()
+
+        return self.cmd('cd "' + path([base, self.name]) + '" && ' +
+                        self.binary_command + ' pull -u "' + self.src + '"')
+
+    def supported(self):
+        '''Overlay type supported?'''
+
+        return Overlay.supported(self, [(self.binary_command,  'mercurial',
+                                         'dev-util/mercurial'),])
diff --git a/commands/lib/layman/overlays/overlay.py b/commands/lib/layman/overlays/overlay.py
new file mode 100644 (file)
index 0000000..b9568b1
--- /dev/null
@@ -0,0 +1,301 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN OVERLAY BASE CLASS
+#################################################################################
+# File:       overlay.py
+#
+#             Base class for the different overlay types.
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#
+''' Basic overlay class.'''
+
+__version__ = "$Id: overlay.py 273 2006-12-30 15:54:50Z wrobel $"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+import sys, types, re, os, os.path, shutil, subprocess
+
+from   layman.utils             import node_to_dict, dict_to_node, path
+
+from   layman.debug             import OUT
+
+#===============================================================================
+#
+# Class Overlay
+#
+#-------------------------------------------------------------------------------
+
+class Overlay:
+    ''' Derive the real implementations from this.'''
+
+    type = 'None'
+
+    def __init__(self, xml, ignore = 0, quiet = False):
+        '''
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> document = open(here + '/../tests/testfiles/global-overlays.xml').read()
+        >>> import xml.dom.minidom
+        >>> document = xml.dom.minidom.parseString(document)
+        >>> overlays = document.getElementsByTagName('overlay')
+        >>> a = Overlay(overlays[0])
+        >>> a.name
+        u'wrobel'
+        >>> a.is_official()
+        True
+        >>> a.src
+        u'https://overlays.gentoo.org/svn/dev/wrobel'
+        >>> a.contact
+        u'nobody@gentoo.org'
+        >>> a.description
+        u'Test'
+        >>> a.priority
+        10
+        >>> b = Overlay(overlays[1])
+        >>> b.is_official()
+        False
+        '''
+        self.quiet = quiet
+
+        self.data = node_to_dict(xml)
+
+        if '&name' in self.data.keys():
+            self.name = self.data['&name']
+        else:
+            raise Exception('Overlay is missing a "name" attribute!')
+
+        if '&src' in self.data.keys():
+            self.src = self.data['&src']
+        else:
+            raise Exception('Overlay "' + self.name + '" is missing a "src" '
+                            'attribute!')
+
+        if '&contact' in self.data.keys():
+            self.contact = self.data['&contact']
+        else:
+            self.contact = ''
+            if not ignore:
+                raise Exception('Overlay "' + self.name + '" is missing a '
+                               '"contact" attribute!')
+            elif ignore == 1:
+                OUT.warn('Overlay "' + self.name + '" is missing a '
+                         '"contact" attribute!', 4)
+
+        if '<description>1' in self.data.keys():
+            self.description = self.data['<description>1']['@'].strip()
+        else:
+            self.description = ''
+            if not ignore:
+                raise Exception('Overlay "' + self.name + '" is missing a '
+                               '"description" entry!')
+            elif ignore == 1:
+                OUT.warn('Overlay "' + self.name + '" is missing a '
+                        '"description" entry!', 4)
+
+        if '&status' in self.data.keys():
+            self.status = self.data['&status']
+        else:
+            self.status = ''
+
+        if '&priority' in self.data.keys():
+            self.priority = int(self.data['&priority'])
+        else:
+            self.priority = 50
+
+    def set_priority(self, priority):
+        '''Set the priority of this overlay.'''
+
+        self.data['&priority'] = str(priority)
+        self.priority = int(priority)
+
+    def to_minidom(self, document):
+        '''Convert to xml.'''
+
+        return dict_to_node(self.data, document, 'overlay')
+
+    def add(self, base, quiet = False):
+        '''Add the overlay.'''
+
+        mdir = path([base, self.name])
+
+        if os.path.exists(mdir):
+            raise Exception('Directory ' + mdir + ' already exists. Will not ov'
+                            'erwrite its contents!')
+
+        os.makedirs(mdir)
+
+    def sync(self, base, quiet = False):
+        '''Sync the overlay.'''
+        pass
+
+    def delete(self, base):
+        '''Delete the overlay.'''
+        mdir = path([base, self.name])
+
+        if not os.path.exists(mdir):
+            raise Exception('Directory ' + mdir + ' does not exist. Cannot remo'
+                            've the overlay!')
+
+        shutil.rmtree(mdir)
+
+    def cmd(self, command):
+        '''Run a command.'''
+
+        OUT.info('Running command "' + command + '"...', 2)
+
+        if hasattr(sys.stdout,'encoding'):
+            enc = sys.stdout.encoding or sys.getfilesystemencoding()
+            if enc:
+                command = command.encode(enc)
+
+        if not self.quiet:
+            return os.system(command)
+        else:
+            cmd = subprocess.Popen([command], shell = True,
+                                   stdout = subprocess.PIPE,
+                                   stderr = subprocess.PIPE,
+                                   close_fds = True)
+            result = cmd.wait()
+            return result
+
+    def __str__(self):
+        '''
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> document = open(here + '/../tests/testfiles/global-overlays.xml').read()
+        >>> import xml.dom.minidom
+        >>> document = xml.dom.minidom.parseString(document)
+        >>> overlays = document.getElementsByTagName('overlay')
+        >>> a = Overlay(overlays[0])
+        >>> print str(a)
+        wrobel
+        ~~~~~~
+        Source  : https://overlays.gentoo.org/svn/dev/wrobel
+        Contact : nobody@gentoo.org
+        Type    : None; Priority: 10
+        <BLANKLINE>
+        Description:
+          Test
+        <BLANKLINE>
+        '''
+
+        result = u''
+
+        result += self.name + u'\n' + (len(self.name) * u'~')
+
+        result += u'\nSource  : ' + self.src
+        result += u'\nContact : ' + self.contact
+        result += u'\nType    : ' + self.type
+        result += u'; Priority: ' + str(self.priority) + u'\n'
+
+        description = self.description
+        description = re.compile(u' +').sub(u' ', description)
+        description = re.compile(u'\n ').sub(u'\n', description)
+        result += u'\nDescription:'
+        result += u'\n  '.join((u'\n' + description).split(u'\n'))
+        result += u'\n'
+
+        if '<link>1' in self.data.keys():
+            link = self.data['<link>1']['@'].strip()
+            link = re.compile(u' +').sub(u' ', link)
+            link = re.compile(u'\n ').sub(u'\n', link)
+            result += u'\nLink:\n'
+            result += u'\n  '.join((u'\n' + link).split(u'\n'))
+            result += u'\n'
+
+        return result
+
+    def short_list(self, width = 0):
+        '''
+        >>> here = os.path.dirname(os.path.realpath(__file__))
+        >>> document = open(here + '/../tests/testfiles/global-overlays.xml').read()
+        >>> import xml.dom.minidom
+        >>> document = xml.dom.minidom.parseString(document)
+        >>> overlays = document.getElementsByTagName('overlay')
+        >>> a = Overlay(overlays[0])
+        >>> print a.short_list(80)
+        wrobel                    [None      ] (https://o.g.o/svn/dev/wrobel         )
+        '''
+
+        def pad(string, length):
+            '''Pad a string with spaces.'''
+            if len(string) <= length:
+                return string + ' ' * (length - len(string))
+            else:
+                return string[:length - 3] + '...'
+
+        def terminal_width():
+            '''Determine width of terminal window.'''
+            try:
+                width = int(os.environ['COLUMNS'])
+                if width > 0:
+                    return width
+            except:
+                pass
+            try:
+                import struct, fcntl, termios
+                query = struct.pack('HHHH', 0, 0, 0, 0)
+                response = fcntl.ioctl(1, termios.TIOCGWINSZ, query)
+                width = struct.unpack('HHHH', response)[1]
+                if width > 0:
+                    return width
+            except:
+                pass
+            return 80
+
+        name   = pad(self.name, 25)
+        mtype  = ' [' + pad(self.type, 10) + ']'
+        if not width:
+            width = terminal_width()
+        srclen = width - 43
+        source = self.src
+        if len(source) > srclen:
+            source = source.replace("overlays.gentoo.org", "o.g.o")
+        source = ' (' + pad(source, srclen) + ')'
+
+        return name + mtype + source
+
+    def supported(self, binaries = []):
+        '''Is the overlay type supported?'''
+
+        if binaries:
+            for mpath, mtype, package in binaries:
+                if not os.path.exists(mpath):
+                    raise Exception('Binary ' + mpath + ' seems to be missing!'
+                                    ' Overlay type "' + mtype + '" not support'
+                                    'ed. Did you emerge ' + package + '?')
+
+        return True
+
+    def is_supported(self):
+        '''Is the overlay type supported?'''
+
+        try:
+            self.supported()
+            return True
+        except Exception, error:
+            return False
+
+    def is_official(self):
+        '''Is the overlay official?'''
+
+        return self.status == 'official'
+
+#================================================================================
+#
+# Testing
+#
+#--------------------------------------------------------------------------------
+
+if __name__ == '__main__':
+    import doctest, sys
+    doctest.testmod(sys.modules[__name__])
diff --git a/commands/lib/layman/overlays/rsync.py b/commands/lib/layman/overlays/rsync.py
new file mode 100644 (file)
index 0000000..6052bd0
--- /dev/null
@@ -0,0 +1,73 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN RSYNC OVERLAY HANDLER
+#################################################################################
+# File:       rsync.py
+#
+#             Handles rsync overlays
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#
+''' Rsync overlay support.'''
+
+__version__ = "$Id: rsync.py 236 2006-09-05 20:39:37Z wrobel $"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+from   layman.utils             import path
+from   layman.overlays.overlay  import Overlay
+
+#===============================================================================
+#
+# Class RsyncOverlay
+#
+#-------------------------------------------------------------------------------
+
+class RsyncOverlay(Overlay):
+    ''' Handles rsync overlays.'''
+
+    type = 'Rsync'
+
+    binary = '/usr/bin/rsync'
+
+    base = binary + ' -rlptDvz --progress --delete --delete-after ' +           \
+        '--timeout=180 --exclude="distfiles/*" --exclude="local/*" ' +          \
+        '--exclude="packages/*" '
+
+    def add(self, base, quiet = False):
+        '''Add overlay.'''
+
+        self.supported()
+
+        Overlay.add(self, base)
+
+        return self.sync(base)
+
+    def sync(self, base, quiet = False):
+        '''Sync overlay.'''
+
+        self.supported()
+
+        if quiet:
+            quiet_option = '-q '
+        else:
+            quiet_option = ''
+
+        return self.cmd(self.base + quiet_option + '"' + self.src + '/" "' +
+                        path([base, self.name]) + '"')
+
+    def supported(self):
+        '''Overlay type supported?'''
+
+        return Overlay.supported(self, [(self.binary,  'rsync',
+                                         'net-misc/rsync'),])
diff --git a/commands/lib/layman/overlays/svn.py b/commands/lib/layman/overlays/svn.py
new file mode 100644 (file)
index 0000000..4ff3da4
--- /dev/null
@@ -0,0 +1,75 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN SVN OVERLAY HANDLER
+#################################################################################
+# File:       svn.py
+#
+#             Handles subversion overlays
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#
+''' Subversion overlay support.'''
+
+__version__ = "$Id: svn.py 236 2006-09-05 20:39:37Z wrobel $"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+from   layman.utils             import path
+from   layman.overlays.overlay  import Overlay
+
+#===============================================================================
+#
+# Class SvnOverlay
+#
+#-------------------------------------------------------------------------------
+
+class SvnOverlay(Overlay):
+    ''' Handles subversion overlays.'''
+
+    type = 'Subversion'
+
+    binary = '/usr/bin/svn'
+
+    def add(self, base, quiet = False):
+        '''Add overlay.'''
+
+        self.supported()
+
+        Overlay.add(self, base)
+
+        if quiet:
+            quiet_option = '-q '
+        else:
+            quiet_option = ''
+
+        return self.cmd(self.binary + ' co ' + quiet_option + '"' + self.src + '/" "' +
+                        path([base, self.name]) + '"')
+
+    def sync(self, base, quiet = False):
+        '''Sync overlay.'''
+
+        self.supported()
+
+        if quiet:
+            quiet_option = '-q '
+        else:
+            quiet_option = ''
+
+        return self.cmd(self.binary + ' up ' + quiet_option + '"' + path([base, self.name]) +
+                        '"')
+
+    def supported(self):
+        '''Overlay type supported?'''
+
+        return Overlay.supported(self, [(self.binary,  'svn',
+                                         'dev-util/subversion'),])
diff --git a/commands/lib/layman/overlays/tar.py b/commands/lib/layman/overlays/tar.py
new file mode 100644 (file)
index 0000000..5786931
--- /dev/null
@@ -0,0 +1,189 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN TAR OVERLAY HANDLER
+#################################################################################
+# File:       tar.py
+#
+#             Handles tar overlays
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#
+''' Tar overlay support.'''
+
+__version__ = "$Id: tar.py 310 2007-04-09 16:30:40Z wrobel $"
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+import os, os.path, sys, urllib2, shutil
+
+from   layman.utils             import path
+from   layman.overlays.overlay  import Overlay
+
+#===============================================================================
+#
+# Class TarOverlay
+#
+#-------------------------------------------------------------------------------
+
+class TarOverlay(Overlay):
+    ''' Handles tar overlays.
+
+    A dummy tar handler that overwrites the __init__ method
+    so that we don't need to provide xml input:
+
+    >>> from   layman.debug             import OUT
+    >>> class DummyTar(TarOverlay):
+    ...   def __init__(self):
+    ...     self.name = 'dummy'
+    ...     here = os.path.dirname(os.path.realpath(__file__))
+    ...     self.src  = 'file://' + here + '/../tests/testfiles/layman-test.tar.bz2'
+    ...     self.subpath = 'layman-test'
+    ...     self.format = 'bz2'
+    ...     self.quiet = False
+    >>> testdir = os.tmpnam()
+    >>> os.mkdir(testdir)
+    >>> a = DummyTar()
+    >>> OUT.color_off()
+    >>> a.add(testdir) #doctest: +ELLIPSIS
+    * Running command "/bin/tar -v -x -j -f...
+    >>> sorted(os.listdir(testdir + '/dummy'))
+    ['app-admin', 'app-portage']
+    >>> shutil.rmtree(testdir)
+    '''
+
+    type = 'Tar'
+
+    binary = u'/bin/tar'
+
+    def __init__(self, xml, ignore = 0, quiet = False):
+
+        Overlay.__init__(self, xml, ignore)
+
+        if '&format' in self.data.keys():
+            self.format = self.data['&format']
+        else:
+            self.format = ''
+
+        if '&subpath' in self.data.keys():
+            self.subpath = self.data['&subpath']
+        else:
+            self.subpath = ''
+
+        if '&category' in self.data.keys():
+            if self.subpath:
+                raise Exception('Cannot use "category" and "subpath" at the same'
+                                ' time!')
+
+            self.category = self.data['&category']
+        else:
+            self.category = ''
+
+    def add(self, base, quiet = False):
+        '''Add overlay.'''
+
+        self.supported()
+
+        mdir = path([base, self.name])
+
+        if os.path.exists(mdir):
+            raise Exception('Directory ' + mdir + ' already exists. Will not ov'
+                            'erwrite its contents!')
+
+        if self.format == 'bz2' or (not self.format and self.src[-3:] == 'bz2'):
+            ext = 'bz2'
+            opt = '-j'
+        elif self.format == 'gz' or (not self.format and self.src[-2:] == 'gz'):
+            ext = 'gz'
+            opt = '-z'
+        else:
+            raise Exception('Unsupported file format!')
+
+        try:
+
+            tar = urllib2.urlopen(self.src).read()
+
+        except Exception, error:
+            raise Exception('Failed to fetch the tar package from: '
+                            + self.src + '\nError was:' + str(error))
+
+        pkg = path([base, self.name + '.tar.' + ext])
+
+        try:
+
+            out_file = open(pkg, 'w')
+            out_file.write(tar)
+            out_file.close()
+
+        except Exception, error:
+            raise Exception('Failed to store tar package in '
+                            + pkg + '\nError was:' + str(error))
+
+        if self.subpath:
+            target = path([base, 'tmp'])
+        else:
+            if self.category:
+                target = mdir + '/' + self.category
+            else:
+                target = mdir
+
+        os.makedirs(target)
+
+        result = self.cmd(self.binary + u' -v -x ' + opt + u' -f "' + pkg
+                          + u'" -C "' + target + u'"')
+
+        if self.subpath:
+            source = target + '/' + self.subpath
+            if os.path.exists(source):
+                try:
+                    os.rename(source, mdir)
+                except Exception, error:
+                    raise Exception('Failed to rename tar subdirectory ' +
+                                    source + ' to ' + mdir + '\nError was:'
+                                    + str(error))
+            else:
+                raise Exception('Given subpath "' + source + '" does not exist '
+                                ' in the tar package!')
+            try:
+                shutil.rmtree(target)
+            except Exception, error:
+                raise Exception('Failed to remove unnecessary tar structure "'
+                                + target + '"\nError was:' + str(error))
+
+        os.unlink(pkg)
+
+        return result
+
+    def sync(self, base, quiet = False):
+        '''Sync overlay.'''
+
+        self.supported()
+
+        self.delete(base)
+
+        self.add(base)
+
+    def supported(self):
+        '''Overlay type supported?'''
+
+        return Overlay.supported(self, [(self.binary,  'tar', 'app-arch/tar'), ])
+
+if __name__ == '__main__':
+    import doctest
+
+    # Ignore warnings here. We are just testing
+    from warnings     import filterwarnings, resetwarnings
+    filterwarnings('ignore')
+
+    doctest.testmod(sys.modules[__name__])
+
+    resetwarnings()
diff --git a/commands/lib/layman/utils.py b/commands/lib/layman/utils.py
new file mode 100644 (file)
index 0000000..178ad11
--- /dev/null
@@ -0,0 +1,208 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# POLYMERAZE XML UTILITIES
+#################################################################################
+# File:       xml.py
+#
+#             Utilities to deal with xml nodes.
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#
+
+'''Utility functions to deal with xml nodes. '''
+
+__version__ = '$Id: utils.py 236 2006-09-05 20:39:37Z wrobel $'
+
+#===============================================================================
+#
+# Dependencies
+#
+#-------------------------------------------------------------------------------
+
+import types, re
+
+#===============================================================================
+#
+# Helper functions
+#
+#-------------------------------------------------------------------------------
+
+def node_to_text(node):
+    '''
+    Reduces an xml node to its text elements. The function does not
+    collect the text nodes recursively.
+
+    >>> import xml.dom.minidom
+    >>> imp = xml.dom.minidom.getDOMImplementation()
+    >>> doc = imp.createDocument('test', 'root', None)
+    >>> root =  doc.childNodes[0]
+    >>> node = doc.createTextNode('text')
+    >>> a = root.appendChild(node)
+    >>> node = doc.createElement('text')
+    >>> node2 = doc.createTextNode('text')
+    >>> a = node.appendChild(node2)
+    >>> a = root.appendChild(node)
+    >>> node = doc.createTextNode('text')
+    >>> a = root.appendChild(node)
+    >>> doc.toprettyxml('', '') #doctest: +ELLIPSIS
+    '<?xml version="1.0" ?>...<root>text<text>text</text>text</root>'
+
+    >>> node_to_text(root)
+    'texttext'
+
+    '''
+    text = ''
+
+    for child in node.childNodes:
+        if child.nodeType == child.TEXT_NODE:
+            text = text + child.data
+
+    return text
+
+def node_to_dict(node):
+    ''' Converts a xml node to a dictionary. The function collects the
+    nodes recursively. Attributes will be prepended with '&', child
+    nodes will be surrounded with tags. An index will be appended
+    since several child nodes with the same tag may exist. Text
+    elements will be collapsed and stored in a n entry prepended with
+    '@'. Comments will be ignored.
+
+    >>> import xml.dom.minidom
+    >>> imp = xml.dom.minidom.getDOMImplementation()
+    >>> doc = imp.createDocument('test', 'root', None)
+    >>> root =  doc.childNodes[0]
+    >>> node = doc.createTextNode('text')
+    >>> a = root.appendChild(node)
+    >>> node = doc.createElement('text')
+    >>> node2 = doc.createTextNode('text')
+    >>> comm = doc.createComment('comment')
+    >>> attr = doc.createAttribute('&attr')
+    >>> a = node.appendChild(node2)
+    >>> a = root.appendChild(comm)
+    >>> node.setAttributeNode(attr)
+    >>> node.setAttribute('&attr','test')
+    >>> a = root.appendChild(node)
+    >>> node3 = doc.createElement('text')
+    >>> a = root.appendChild(node3)
+    >>> node = doc.createTextNode('text')
+    >>> a = root.appendChild(node)
+    >>> doc.toprettyxml('', '') #doctest: +ELLIPSIS
+    '<?xml version="1.0" ?>...<root>text<!--comment--><text &attr="test">text</text><text/>text</root>'
+
+    >>> node_to_dict(root)
+    {'<text>1': {'@': 'text', '&&attr': 'test'}, '<text>2': {'@': ''}, '@': 'texttext'}
+
+    '''
+    result = {}
+
+    # Map the attributes
+    for index in range(0, node.attributes.length):
+        attr = node.attributes.item(index)
+        result['&' +  attr.name] = attr.nodeValue
+
+    text = ''
+
+    # Map the nodes
+    for child in node.childNodes:
+        if child.nodeType == child.TEXT_NODE:
+            text = text + child.data
+        if child.nodeType == child.ELEMENT_NODE:
+            index = 1
+            while ('<' + child.tagName + '>' + str(index)) in result.keys():
+                index += 1
+            result['<' + child.tagName + '>' + str(index)] = node_to_dict(child)
+
+    result['@'] = text
+
+    return result
+
+def dict_to_node(data, document, root_name):
+    ''' Reverts the node_to_dict operation.
+
+    >>> import xml.dom.minidom
+    >>> imp = xml.dom.minidom.getDOMImplementation()
+    >>> doc = imp.createDocument('test', 'root', None)
+    >>> a = {'<text>1': {'@': 'text', '&&attr': 'test'}, '<text>2': {'@': ''}, '@': 'texttext'}
+    >>> doc.childNodes[0] = dict_to_node(a, doc, 'root')
+    >>> doc.toprettyxml('', '') #doctest: +ELLIPSIS
+    '<?xml version="1.0" ?>...<root><text &attr="test">text</text><text></text>texttext</root>'
+
+    '''
+    node = document.createElement(root_name)
+
+    for i, j in data.items():
+
+        if i[0] == '&':
+            attr = document.createAttribute(i[1:])
+            node.setAttributeNode(attr)
+            node.setAttribute(i[1:], j)
+        if i[0] == '<':
+            k = i[1:]
+            while k[-1] in '0123456789':
+                k = k[:-1]
+            child = dict_to_node(data[i],
+                                 document,
+                                 k[:-1])
+            node.appendChild(child)
+        if i[0] == '@':
+            child = document.createTextNode(j)
+            node.appendChild(child)
+
+    return node
+
+def path(path_elements):
+    '''
+    Concatenate a path from several elements.
+
+    >>> path([])
+    ''
+    >>> path(['a'])
+    'a'
+    >>> path(['a','b'])
+    'a/b'
+    >>> path(['a/','b'])
+    'a/b'
+    >>> path(['/a/','b'])
+    '/a/b'
+    >>> path(['/a/','b/'])
+    '/a/b'
+    >>> path(['/a/','b/'])
+    '/a/b'
+    >>> path(['/a/','/b/'])
+    '/a/b'
+    >>> path(['/a/','/b','c/'])
+    '/a/b/c'
+    '''
+    pathname = ''
+
+    if type(path_elements) in types.StringTypes:
+        path_elements = [path_elements]
+
+    # Concatenate elements and seperate with /
+    for i in path_elements:
+        pathname += i + '/'
+
+    # Replace multiple consecutive slashes
+    pathname = re.compile('/+').sub('/', pathname)
+
+    # Remove the final / if there is one
+    if pathname and pathname[-1] == '/':
+        pathname = pathname[:-1]
+
+    return pathname
+
+#===============================================================================
+#
+# Testing
+#
+#-------------------------------------------------------------------------------
+
+if __name__ == '__main__':
+    import doctest, sys
+    doctest.testmod(sys.modules[__name__])
diff --git a/commands/lib/layman/version.py b/commands/lib/layman/version.py
new file mode 100644 (file)
index 0000000..a366b47
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#################################################################################
+# LAYMAN VERSION
+#################################################################################
+# File:       version.py
+#
+#             Current version number
+#
+# Copyright:
+#             (c) 2005 - 2008 Gunnar Wrobel
+#             Distributed under the terms of the GNU General Public License v2
+#
+# Author(s):
+#             Gunnar Wrobel <wrobel@gentoo.org>
+#
+
+__version__ = "$Id: version.py 309 2007-04-09 16:23:38Z wrobel $"
+
+
+VERSION = '1.2.3'
+
+if __name__ == '__main__':
+    print VERSION
diff --git a/commands/manage_layman.py b/commands/manage_layman.py
new file mode 100644 (file)
index 0000000..a490c0a
--- /dev/null
@@ -0,0 +1,72 @@
+from subprocess import call
+
+from commands import getstatusoutput
+
+import sys, ConfigParser, os.path, re
+
+from layman.config import Config
+from layman.action import *
+from layman.db import DB
+
+here = os.path.split(os.path.realpath(__file__))[0]
+
+class LaymanManager:
+    def AddAll(self):
+        """add overlays and sync them"""
+        
+        command1 = "./layman -c mylayman.cfg -a ALL"
+        print command1
+        (status, output) = getstatusoutput(command1)
+        print status
+        print output
+        
+        """
+        command2 = "./layman -c mylayman.cfg -s ALL"
+        getstatusoutput(command2)
+
+        print command1, "\n", command2
+        """
+        
+    def List(self):
+        """return overlays dict"""
+
+        sys.argv.append('-c')
+        sys.argv.append('mylayman.cfg')
+        config = Config()
+        
+        """
+        l = ListLocal(a)
+        l.run()
+        """
+
+        db = DB(config)
+        overlays = dict()
+        
+        for name, overlay in db.overlays.items():
+            overlays[name] = dict()
+            overlays[name]["src"] = overlay.src
+            overlays[name]["contact"] = overlay.contact
+            
+            description = overlay.description
+            description = re.compile(u' +').sub(u' ', description)
+            description = re.compile(u'\n ').sub(u'\n', description)
+            
+            overlays[name]["description"] = description
+            
+            if '<link>1' in overlay.data.keys():
+                link = overlay.data['<link>1']['@'].strip()
+                link = re.compile(u' +').sub(u' ', link)
+                link = re.compile(u'\n ').sub(u'\n', link)
+            else:
+                link = ""
+            
+            overlays[name]["link"] = link
+        return overlays
+
+def main():
+    h = LaymanManager()
+    h.AddAll()
+    overlays = h.List()
+    
+if __name__ == '__main__':
+    main()
diff --git a/commands/mylayman.cfg b/commands/mylayman.cfg
new file mode 100644 (file)
index 0000000..d0ddbfa
--- /dev/null
@@ -0,0 +1,58 @@
+[MAIN]
+
+#-----------------------------------------------------------
+# Defines the directory where overlays should be installed
+
+storage   : /home/timemachine/www/ebuildfnd/ebuildfind/commands/var/
+
+#-----------------------------------------------------------
+# Remote overlay lists will be stored here
+# layman will append _md5(url).xml to each filename
+
+cache     : %(storage)s/cache
+
+#-----------------------------------------------------------
+# The list of locally installed overlays
+
+local_list: /home/timemachine/www/ebuildfnd/ebuildfind/commands/overlays.xml
+
+#-----------------------------------------------------------
+# Path to the make.conf file that should be modified by 
+# layman
+
+make_conf : %(storage)s/make.conf
+
+#-----------------------------------------------------------
+# URLs of the remote lists of overlays (one per line) or 
+# local overlay definitions
+#
+#overlays  : http://www.gentoo.org/proj/en/overlays/layman-global.txt
+#            http://dev.gentoo.org/~wrobel/layman/global-overlays.xml
+#            http://mydomain.org/my-layman-list.xml
+#            file:///usr/portage/local/layman/my-list.xml
+
+overlays  : file:///home/timemachine/www/ebuildfnd/ebuildfind/commands/overlays.txt
+
+#-----------------------------------------------------------
+# Proxy support
+#
+#proxy  : http://[user:pass@]www.my-proxy.org:3128
+
+#-----------------------------------------------------------
+# Strict checking of overlay definitions
+#
+# Set either to "yes" or "no". If "no" layman will issue
+# warnings if an overlay definition is missing either 
+# description or contact information.
+#
+nocheck  : yes
+
+#-----------------------------------------------------------
+# Umask settings
+#
+# layman should usually work with a umask of 0022. You should
+# only change this setting if you are absolutely certain that
+# you know what you are doing.
+#
+#umask  : 0022
+
diff --git a/commands/overlays.txt b/commands/overlays.txt
new file mode 100644 (file)
index 0000000..3f246d9
--- /dev/null
@@ -0,0 +1,1232 @@
+<?xml version="1.0"?>
+<layman>
+  <overlay name = "betelgeuse"  status = "official"
+  contact = "betelgeuse@gentoo.org"
+  src = "svn://overlays.gentoo.org/dev/betelgeuse" type = "svn">
+  <link>https://overlays.gentoo.org/dev/betelgeuse</link>
+  <description>Betelgeuse's developer overlay</description>
+  </overlay>
+  <overlay name="lisp" status="official"
+  contact="gentoo-lisp@gentoo.org"
+  src="git://repo.or.cz/gentoo-lisp-overlay.git" type="git">
+    <link>http://repo.or.cz/w/gentoo-lisp-overlay.git</link>
+    <description>Common Lisp/Scheme development, recruitment and
+    live overlay. Support and feedback in `#gentoo-lisp' and via
+    `gentoo-lisp@gentoo.org'.</description>
+  </overlay>
+  <overlay type="rsync"
+  src="rsync://roslin.mlodyinteligent.pl/roslin"
+  contact="lazy_bum@o2.pl" name="roslin">
+    <link>http://roslin.mlodyinteligent.pl/</link>
+    <description>This is roslin, my small overlay. Enjoy!
+    (:</description>
+  </overlay>
+  <overlay type="git"
+  src="git://gitorious.org/s3d-gentoo/s3d-gentoo.git"
+  contact="sven.eckelmann@gmx.de" status="unofficial" name="s3d">
+    <link>http://s3d.berlios.de/</link>
+    <description>Gentoo ebuilds for s3d and related packages. s3d
+    is a 3d network display server which can be used as 3d desktop
+    enviroment.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/proj/desktop-effects.git"
+  contact="desktop-effects@gentoo.org" status="official"
+  name="desktop-effects">
+    <description>Experimental overlay for desktop effects
+    packages.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/proj/dotnet.git"
+  contact="dotnet@gentoo.org" status="official" name="dotnet">
+    <description>Experimental overlay for .NET
+    packages.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://repo.or.cz/gentoo-interactive-fiction.git"
+  contact="levertond@googlemail.com" status="unofficial"
+  name="interactive-fiction">
+    <description>Packages for players and authors of interactive
+    fiction</description>
+  </overlay>
+  <overlay type="git"
+  src="git://repo.or.cz/gentoo-soor-overlay.git"
+  contact="l.valerimanera@gmail.com" status="unofficial"
+  name="soor-overlay">
+    <description>Gentoo ebuild overlay with misc stuff that I find
+    interesting.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://zen-sources.org/zen/portage-overlay.git"
+  contact="rmh3093@gmail.com" status="unofficial"
+  name="zen-overlay">
+    <description>Experimental overlay for zen related
+    packages.</description>
+  </overlay>
+  <overlay type="git" src="git://zen-sources.org/zen/THE.git"
+  contact="rmh3093@gmail.com" status="unofficial" name="THE">
+    <description>Miscellaneous ebuilds not yet in
+    portage</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/proj/ltsp.git"
+  contact="dberkholz@gentoo.org" status="official" name="ltsp">
+    <description>Linux Terminal Server Project
+    overlay</description>
+  </overlay>
+  <overlay type="mercurial"
+  src="https://arcon.googlecode.com/hg/"
+  name="arcon" contact="non7top@gmail.com">
+    <description>Arcon Overlay!</description>
+    <link>http://code.google.com/p/arcon/</link>
+  </overlay>
+  <overlay type="rsync"
+  src="rsync://overlays.biterror.net/gnash-cvs"
+  contact="gnash@biterror.net" status="unoffficial"
+  name="gnash-cvs">
+    <link>http://www.thepetersclan.net</link>
+    <description>This is a Gnash ( flash player ) cvs and snapshot
+    overlay.</description>
+  </overlay>
+  <overlay contact="aross@gentoo.org" name="aross"
+  src="svn://overlays.gentoo.org/dev/aross" type="svn"
+  status="official">
+    <link>http://overlays.gentoo.org/dev/aross</link>
+    <description>Personal scratch space.</description>
+  </overlay>
+  <overlay contact="dirtyepic@gentoo.org" name="dirtyepic"
+  src="svn://overlays.gentoo.org/dev/dirtyepic" type="svn">
+    <link>http://overlays.gentoo.org/dev/dirtyepic</link>
+    <description>Various work-in-progress stuff including GCC-svn
+    and wxGTK.</description>
+  </overlay>
+  <overlay contact="xfce@gentoo.org" name="xfce-dev"
+  src="git://git.overlays.gentoo.org/proj/xfce.git" type="git"
+  status="official">
+    <link>http://overlays.gentoo.org/proj/xfce/wiki</link>
+    <description>Experimental ebuilds for the Xfce4 Desktop
+    Environment</description>
+  </overlay>
+  <overlay contact="je_fro@gentoo.org" name="je_fro"
+  src="svn://overlays.gentoo.org/dev/je_fro" type="svn">
+    <link>http://overlays.gentoo.org/dev/je_fro</link>
+    <description>Helpful ebuilds for the macbook pro, and
+    experimental gentoo-science packages.</description>
+  </overlay>
+  <overlay contact="suka@gentoo.org" name="suka"
+  src="svn://overlays.gentoo.org/dev/suka" type="svn">
+    <link>http://overlays.gentoo.org/dev/suka</link>
+    <description>experimental stuff of all sorts</description>
+  </overlay>
+  <overlay contact="luke_armagetron@dashjr.org" name="luke-jr"
+  src="svn://svn.dashjr.org/luke-portage-overlay/trunk" type="svn">
+    <link>http://luke.dashjr.org</link>
+    <description>Misc ebuilds by Luke-Jr</description>
+  </overlay>
+  <overlay type="svn"
+  src="http://svn.berlios.de/svnroot/repos/lila-theme/trunk/lila/gentoo/overlay"
+  contact="http://forums.lila-center.info/" status="official"
+  name="lila-theme">
+    <link>http://www.lila-center.info</link>
+    <description>The Lila theme is a community project, originally
+    created by Daniel G. Taylor and members of the Gentoo Linux
+    community. The theme is based around SVG graphics - which means
+    they can be scaled to any size without loss of quality - and is
+    meant to be usable across different desktops and platforms. For
+    more information about the Lila theme project or to see how you
+    could get involved, there are a few places to look: The Lila
+    theme forums #lila on chat.freenode.org</description>
+  </overlay>
+  <overlay type="svn"
+  src="https://verlihub.svn.sourceforge.net/svnroot/verlihub/overlay"
+  contact="netcelli@verlihub-project.org" name="verlihub">
+    <link>http://www.verlihub-project.org</link>
+    <description>Verlihub is a Direct Connect protocol server runs
+    on Linux OS written in C++; Many features are available: MySQL
+    database, very low use of CPU, RAM and Bandwidth, deflood
+    integrated protection, plugins</description>
+  </overlay>
+  <overlay type="git" src="git://git.jyujin.de/portage-overlay.git"
+  contact="mdeininger@jyujin.de" name="jyujin">
+    <link>http://jyujin.de/</link>
+    <description>eINIT, kyuuba, dev9, various splash
+    daemons</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/mozilla"
+  contact="mozilla@gentoo.org" status="official" name="mozilla">
+    <link>http://overlays.gentoo.org/proj/mozilla</link>
+    <description>New mozilla development that is not yet in
+    tree</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/proj/sci.git"
+  contact="sci@gentoo.org" status="official" name="science">
+    <link>http://overlays.gentoo.org/proj/science/wiki/en</link>
+    <description>The Gentoo Science Overlay is intended as a place
+    to work outside of the main portage tree on experimental
+    ebuilds. Our aim is to increase the rate of development of
+    scientific packages for Gentoo, but ebuilds in this repository
+    are by their very nature more experimental. If you wish to use
+    them you should be willing to help test and report
+    bugs.</description>
+  </overlay>
+
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/proj/gnome.git"
+  contact="gnome@gentoo.org" status="official" name="gnome">
+    <description>experimental gnome ebuilds</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/proj/gpe.git"
+  contact="gpe@gentoo.org" status="official" name="gpe">
+    <description>experimental gpe ebuilds</description>
+  </overlay>
+  <overlay type="git"
+  src="git://www2.mailstation.de/git/genkde4svn.git"
+  contact="philantrop@exherbo.org" status="unofficial" name="kde">
+    <link>http://genkdesvn.mailstation.de</link>
+    <description>Paludis-only kde4 overlay. Unsupported by KDE team.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/proj/kde.git"
+  contact="kde@gentoo.org" status="official" name="kde-testing">
+    <link>http://kde.gentoo.org</link>
+    <description>Official KDE team's testing overlay.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/proj/kde-crazy.git"
+  contact="kde@gentoo.org" status="official" name="kde3">
+    <link>http://kde.gentoo.org</link>
+    <description>KDE 3 overlay</description>
+  </overlay>
+  <overlay type="rsync"
+  src="rsync://gentoo.zugaina.org/zugaina-portage"
+  contact="ycarus@zugaina.org" name="zugaina">
+    <link>http://gentoo.zugaina.org/</link>
+    <description>collection of ebuilds by ycarus</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/webapps/experimental"
+  contact="web-apps@gentoo.org" status="official"
+  name="webapps-experimental">
+    <link>http://overlays.gentoo.org</link>
+    <description>This is the home of Gentoo's wider collection of
+    ebuilds for web-based applications. This is where we collect
+    all the ebuilds submitted to Bugzilla by our users, and make
+    them available in an easy-to-use overlay for wider
+    testing.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/anant/d"
+  contact="anant@gentoo.org" status="official" name="d">
+    <link>http://overlays.gentoo.org/dev/anant/wiki</link>
+    <description>A collection of ebuilds related to the D
+    programming language.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/anant/plan9"
+  contact="anant@gentoo.org" status="official" name="plan9">
+    <link>http://overlays.gentoo.org/dev/anant/wiki</link>
+    <description>A collection of useful ebuilds related to
+    Plan9.</description>
+  </overlay>
+  <overlay type="git" src="git://git.xnull.de/overlay.git"
+  contact="hollow@gentoo.org" status="unofficial" name="hollow">
+    <link>http://git.xnull.de/gitweb/?p=overlay.git</link>
+    <description>A collection of work-in-progress ebuilds and other
+    fun broken things.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/wrobel/stable"
+  contact="wrobel@gentoo.org" name="wrobel" status="official">
+    <link>http://overlays.gentoo.org</link>
+    <description>A collection of stable ebuilds from Gunnar Wrobel
+    [wrobel@gentoo.org].</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/kolab/overlay"
+  contact="wrobel@gentoo.org" status="official" name="kolab">
+    <link>http://www.gentoo.org/proj/en/kolab/index.xml</link>
+    <description>Project to allow running Kolab on
+    Gentoo.</description>
+  </overlay>
+  <overlay contact="luke_armagetron@dashjr.org" name="armagetron"
+  src="https://armagetronad.svn.sourceforge.net/svnroot/armagetronad/armagetronad/trunk/build/gentoo/overlay"
+  type="svn">
+    <link>http://armagetronad.net</link>
+    <description>3D light cycles, like the movie TRON</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/games"
+  contact="games@gentoo.org" status="official" name="games">
+    <link>http://games.gentoo.org/</link>
+    <description>A collection of work-in-progress ebuilds and
+    ebuilds which require testing.</description>
+  </overlay>
+  <overlay type="svn" name="voip" contact="voip@gentoo.org"
+  status="official"
+  src="svn://overlays.gentoo.org/proj/voip/trunk">
+    <link>http://svn.netdomination.org/gentoo-voip</link>
+    <description>Voice over IP related ebuilds.</description>
+  </overlay>
+  <overlay type="svn" src="https://svn.initng.org/portage/gentoo"
+  contact="qupada@initng.org" name="initng">
+    <link>http://www.initng.org</link>
+    <description>Initng is a full replacement of the old and in
+    many ways deprecated sysvinit tool. It is designed with speed
+    in mind because it does as much as possible asynchronously. In
+    other words: It will boot your unix-system much faster, and
+    give you more control and statistics over your
+    system.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/nx/testing"
+  contact="nx@gentoo.org" status="official" name="nx">
+    <link>http://overlays.gentoo.org/proj/nx</link>
+    <description>Overlay for the NX/FreeNX packages for
+    Gentoo.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://svn.tuxfamily.org/svnroot/proaudio/proaudio/trunk/overlays/proaudio"
+  contact="evermind@tuxfamily.org" name="pro-audio">
+    <link>http://proaudio.tuxfamily.org/wiki</link>
+    <description>Evermind's overlay with ebuilds for a lot of
+    pro-audio production software.</description>
+  </overlay>
+  <overlay type="git" src="git://vcs.gentoo.ru/gentoo-pda"
+  contact="alexxy@gentoo.ru" name="pda">
+    <link>http://pda.gentoo.ru</link>
+    <description>This overlay contains some pda-related ebuilds
+    (for now for devices such as iPAQ hx4700, Sharp Zaurus, Asus
+    a620 and some others)</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/vmware/trunk"
+  contact="vmware@gentoo.org" status="official" name="vmware">
+    <link>http://bugs.gentoo.org/show_bug.cgi?id=122500</link>
+    <description>Testing ground for vmware-server and
+    vmware-server-console ebuilds until they can eventually be
+    committed into portage.</description>
+  </overlay>
+  <overlay type="git" src="git://sabayon.org/projects/overlay.git"
+  contact="lxnay@sabayonlinux.org" name="sabayon">
+    <link>http://sabayonlinux.org</link>
+    <description>Purpose To provide ebuilds that were created from
+    the Sabayon Linux project such as customized programs, ebuilds
+    not in the official portage, artwork, themes, etc. Bugs to
+    http://bugs.sabayonlinux.org/bugs/</description>
+  </overlay>
+  <overlay type="svn"
+  src="http://gentoo-china-overlay.googlecode.com/svn/trunk/"
+  contact="r0bertz@gentoo.org" name="gentoo-china">
+    <link>http://code.google.com/p/gentoo-china-overlay</link>
+    <description>Purpose To provide some programs useful to Chinese
+    users.</description>
+  </overlay>
+  <overlay name="java-overlay"
+  src="svn://overlays.gentoo.org/proj/java/java-overlay/"
+  contact="java@gentoo.org" status="official" type="svn">
+    <link>http://overlays.gentoo.org/proj/java</link>
+    <description>The only java overlay available via layman. This
+    overlays contains ebuilds that are expected to work when you
+    emerge them. The ebuilds also need to use the generation 2
+    eclasses.</description>
+  </overlay>
+  <overlay name="java-gcj-overlay"
+  src="svn://overlays.gentoo.org/proj/java/gcj-overlay/"
+  contact="java@gentoo.org" status="official" type="svn">
+    <link>
+    http://overlays.gentoo.org/proj/java/wiki/GCJ_as_a_JDK</link>
+    <description>An overlay for GCJ to use as a Java SDK /
+    RE.</description>
+  </overlay>
+  <overlay name="flameeyes-overlay"
+  src="git://git.overlays.gentoo.org/dev/flameeyes.git"
+  contact="flameeyes@gmail.com" type="git">
+    <link>http://blog.flameeyes.eu/</link>
+    <description>Flameeyes' private developer overlay</description>
+  </overlay>
+  <overlay name="x11" src="git://git.overlays.gentoo.org/proj/x11"
+  contact="x11@gentoo.org" status="official" type="git">
+    <link>http://www.gentoo.org/proj/en/desktop/x/x11/</link>
+    <description>Gentoo X11 team overlay</description>
+  </overlay>
+  <overlay name="dberkholz"
+  src="git://git.overlays.gentoo.org/dev/dberkholz"
+  contact="dberkholz@gentoo.org" status="unofficial" type="git">
+    <link>http://dev.gentoo.org/~dberkholz/overlay/</link>
+    <description>Donnie Berkholz's private developer
+    overlay</description>
+  </overlay>
+  <overlay name="loki_val"
+  src="git://git.overlays.gentoo.org/dev/loki_val"
+  contact="loki_val@gentoo.org" status="unofficial" type="git">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/loki_val.git;a=summary</link>
+    <description>Peter Alfredsen's private developer
+    overlay</description>
+  </overlay>
+  <overlay name="darkside"
+  src="git://git.overlays.gentoo.org/dev/darkside"
+  contact="darkside@gentoo.org" type="git" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/darkside.git;a=summary</link>
+    <description>Jeremy Olexa's (darkside) private developer
+    overlay</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/drizzt/"
+  contact="drizzt@gentoo.org" name="drizzt-overlay">
+    <link>http://drizzt.bsdnet.eu/</link>
+    <description>drizzt's private developer overlay</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/trapni/overlay"
+  contact="trapni@gentoo.org" name="trapni" status="official">
+    <link>http://overlays.gentoo.org/dev/trapni/</link>
+    <description>trapni's private developer overlay (mostly
+    covering YaCS/server related ebuilds for now)</description>
+  </overlay>
+  <overlay type="svn" name="sunrise" contact="sunrise@gentoo.org"
+  status="official"
+  src="svn://overlays.gentoo.org/proj/sunrise/reviewed/">
+    <link>http://overlays.gentoo.org/proj/sunrise</link>
+    <description>Ebuilds for bugs assigned to
+    maintainer-wanted</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/wschlich/stable"
+  contact="wschlich@gentoo.org" status="official" name="wschlich">
+    <link>http://overlays.gentoo.org</link>
+    <description>A collection of stable ebuilds from Wolfram
+    Schlich [wschlich@gentoo.org].</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/wschlich/testing"
+  contact="wschlich@gentoo.org" status="official"
+  name="wschlich-testing">
+    <link>http://overlays.gentoo.org</link>
+    <description>A collection of testing ebuilds from Wolfram
+    Schlich [wschlich@gentoo.org].</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/bangert/ebuilds"
+  contact="bangert@gentoo.org" status="official" name="bangert">
+    <link>http://overlays.gentoo.org</link>
+    <description>Some ebuilds not yet ready for mainstream portage
+    from Thilo Bangert [bangert@gentoo.org].</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/dertobi123"
+  contact="dertobi123@gentoo.org" status="official"
+  name="dertobi123">
+    <link>http://overlays.gentoo.org</link>
+    <description>Some ebuilds not yet ready for mainstream portage
+    from Tobias Scherbaum [dertobi123@gentoo.org].</description>
+  </overlay>
+  <overlay type="svn" src="svn://overlays.gentoo.org/proj/vps"
+  contact="vserver-devs@gentoo.org" status="official" name="vps">
+    <link>http://overlays.gentoo.org/proj/vps</link>
+    <description>Gentoo VPS project overlay (experimental
+    ebuilds)</description>
+  </overlay>
+  <overlay type="svn" src="http://svn.hboeck.de/xgl-overlay"
+  contact="hanno@gentoo.org" name="hanno-xgl">
+    <link>http://www.hboeck.de</link>
+    <description>Purpose To provide new Xgl and AIGLX desktop
+    developments as mentioned on his blog.</description>
+  </overlay>
+  <overlay type="svn" src="https://svn.hboeck.de/overlay/"
+  contact="hanno@gentoo.org" name="hanno">
+    <link>http://www.hboeck.de</link>
+    <description>Hanno Boeck developer overlay.</description>
+  </overlay>
+  <overlay type="tar"
+  src="http://geki.ath.cx/hacks/overlay.tar.bz2"
+  contact="h.mth@web.de" name="openoffice-geki">
+    <link>http://geki.ath.cx/index.php/OpenOffice</link>
+    <description>Purpose Unsupported openoffice version with
+    experimental patchset</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/pythonhead"
+  contact="pythonhead@gentoo.org" status="official"
+  name="pythonhead">
+    <link>http://overlays.gentoo.org</link>
+    <description>Mostly Python-related ebuilds.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/python/overlays/testing"
+  contact="python@gentoo.org" status="official"
+  name="python-testing">
+    <link>http://overlays.gentoo.org/proj/python/wiki</link>
+    <description>Python development tree, staging area for the tree.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/python/overlays/experimental"
+  contact="python@gentoo.org" status="official"
+  name="python-experimental">
+    <link>http://overlays.gentoo.org/proj/python/wiki</link>
+    <description>Python experimental tree.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/liquidx"
+  contact="liquidx@gentoo.org" status="official" name="liquidx">
+    <link>http://overlays.gentoo.org</link>
+    <description>Development overlay for ebuilds that I plan to
+    commit to the tree that are sourced from bugzilla or
+    liquidx.</description>
+  </overlay>
+  <overlay type="svn"
+  src="http://gentoo-taiwan.googlecode.com/svn/trunk/"
+  contact="scsichen@gmail.com" status="unofficial"
+  name="gentoo-taiwan">
+    <link>http://gentoo-taiwan.googlecode.com/</link>
+    <description>A collection of ebuilds from Gentoo
+    Taiwan.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/dev-zero"
+  contact="dev-zero@gentoo.org" status="official" name="dev-zero">
+    <link>http://dev.gentoo.org/~dev-zero/</link>
+    <description>Dev-zeros personal developer overlay</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/genstef"
+  contact="genstef@gentoo.org" status="official" name="genstef">
+    <link>http://overlays.gentoo.org/dev/genstef</link>
+    <description>Genstef's Overlay - It usually contains some
+    experimental ebuilds on their way to the tree</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/jokey/trunk"
+  contact="jokey@gentoo.org" status="official" name="jokey">
+    <link>http://overlays.gentoo.org/dev/jokey</link>
+    <description>Jokey's Overlay - Contains pre-tree stuff like
+    italc, pkgcore-test-ebuilds and lcd stuff</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/chtekk/apps"
+  contact="chtekk@gentoo.org" status="official" name="chtekk-apps">
+    <link>http://overlays.gentoo.org/dev/chtekk</link>
+    <description>Overlay for various applications I use myself and
+    plan on adding to the tree or update/fix.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/chtekk/syscp"
+  contact="chtekk@gentoo.org" status="official"
+  name="chtekk-syscp">
+    <link>http://overlays.gentoo.org/dev/chtekk</link>
+    <description>Development overlay for a SysCP (syscp.org) ebuild
+    and Gentoo port, as well as additional
+    patches/features.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/mysql/testing"
+  contact="mysql-bugs@gentoo.org" status="official"
+  name="mysql-testing">
+    <link>http://overlays.gentoo.org/proj/mysql</link>
+    <description>Development overlay for MySQL, testing
+    branch.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/php/php4"
+  contact="php-bugs@gentoo.org" status="official" name="php-4">
+    <link>http://overlays.gentoo.org/proj/php</link>
+    <description>Contains a copy of everything
+    dev-lang/php-4*-related, which can no longer be kept in the
+    official tree for security reasons.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/php/testing"
+  contact="php-bugs@gentoo.org" status="official"
+  name="php-testing">
+    <link>http://overlays.gentoo.org/proj/php</link>
+    <description>Development overlay for PHP, testing
+    branch.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/php/experimental"
+  contact="php-bugs@gentoo.org" status="official"
+  name="php-experimental">
+    <link>http://overlays.gentoo.org/proj/php</link>
+    <description>Development overlay for PHP, experimental
+    branch.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/postgresql/testing"
+  contact="pgsql-bugs@gentoo.org" status="official"
+  name="postgresql-testing">
+    <link>http://overlays.gentoo.org/proj/postgresql</link>
+    <description>Development overlay for PostgreSQL, testing
+    branch.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/postgresql/experimental"
+  contact="pgsql-bugs@gentoo.org" status="official"
+  name="postgresql-experimental">
+    <link>http://overlays.gentoo.org/proj/postgresql</link>
+    <description>Development overlay for PostgreSQL, experimental
+    branch.</description>
+  </overlay>
+  <overlay type="svn"
+  src="http://mars.arge.at/svn/n4g/trunk/novell4gentoo"
+  contact="Mario-Fetka@gmx.at" name="n4g">
+    <link>http://n4g.mars.arge.at</link>
+    <description>The goal for this overlay is to reproduce the Open
+    Enterprise server from novell on gentoo</description>
+  </overlay>
+  <overlay type="svn"
+  src="http://mars.arge.at/svn/n4g/branches/experimental"
+  contact="Mario-Fetka@gmx.at" name="n4g-experimental">
+    <link>http://n4g.mars.arge.at</link>
+    <description>The goal for this overlay is to reproduce the Open
+    Enterprise server from novell on gentoo</description>
+  </overlay>
+  <overlay type="git" src="git://repo.or.cz/mpd.git"
+  contact="avuton@gmail.com" name="mpd">
+    <link>
+    http://mpd.wikia.com/wiki/Repositories#Experimental_Gentoo_Overlay</link>
+    <description>The experimental gentoo overlay was designed as a
+    way to keep up-to-date. Most of it are live ebuilds, ebuilds
+    that pull the latest HEAD from whatever repository. It also
+    includes ebuilds for clients that are not yet in portage. It is
+    maintained by avuton, send new ebuilds, corrections or bugs
+    directly to him.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/halcy0n.git"
+  contact="halcy0n@gentoo.org" status="official" name="halcy0n">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/halcy0n.git;a=summary</link>
+    <description>Various packages, probably some toolchain stuff
+    though</description>
+  </overlay>
+  <overlay type="darcs"
+  src="http://code.haskell.org/gentoo/gentoo-haskell/"
+  contact="haskell@gentoo.org" status="official" name="haskell">
+    <link>http://www.haskell.org/~gentoo/gentoo-haskell/</link>
+    <description>The Official Gentoo Haskell overlay.</description>
+  </overlay>
+  <overlay type="svn" src="http://opensvn.csie.org/rmh3093/iwlwifi"
+  contact="rmh3093@gmail.com" name="iwlwifi">
+    <link>http://opensvn.csie.org/rmh3093/iwlwifi</link>
+    <description>This overlay provides ebuilds for the new wireless
+    driver iwlwifi</description>
+  </overlay>
+  <overlay type="svn" src="http://scm.calivia.com/svn/sipx/gentoo"
+  contact="msl@calivia.com" name="sipx">
+    <link>http://scm.calivia.com/svn/sipx/gentoo</link>
+    <description>This repository contains sipx and related
+    ebuilds.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/vdr/testing"
+  contact="vdr@gentoo.org" status="official" name="vdr-testing">
+    <link>http://overlays.gentoo.org/proj/vdr</link>
+    <description>Development overlay for VDR, testing
+    branch.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/vdr/vdr-devel"
+  contact="vdr@gentoo.org" status="official" name="vdr-devel">
+    <link>http://overlays.gentoo.org/proj/vdr</link>
+    <description>Overlay for VDR, that contains ebuilds for
+    development version of VDR, and specific plugins for that
+    version.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/vdr/experimental"
+  contact="vdr@gentoo.org" status="official"
+  name="vdr-experimental">
+    <link>http://overlays.gentoo.org/proj/vdr</link>
+    <description>Development overlay for VDR, experimental branch.
+    WARNING: This branch can kill your VDR! Only use it if you know
+    what you are doing. It is best to stay in touch with the
+    developers if you would like to try this out. We are available
+    in #gentoo-vdr on Freenode.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/vdr/vdr-xine-overlay"
+  contact="vdr@gentoo.org" status="official" name="vdr-xine">
+    <link>http://overlays.gentoo.org/proj/vdr</link>
+    <description>Overlay for VDR, that contains ebuilds for
+    the vdr-xine output plugin, and the needed patched xine-lib
+    </description>
+  </overlay>
+  <overlay type="svn" src="http://svn.hboeck.de/nouveau-overlay"
+  contact="hanno@gentoo.org" name="nouveau">
+    <link>http://nouveau.freedesktop.org/</link>
+    <description>Experimental ebuilds for the free nouveau driver
+    for nvidia cards.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/efika"
+  contact="wolf31o2@wolf31o2.org" status="official" name="efika">
+    <description>Temporary overlay for adding support for the EFIKA
+    platform to Gentoo.</description>
+  </overlay>
+  <overlay name="seemant"
+  src="svn://overlays.gentoo.org/dev/seemant"
+  contact="seemant@gentoo.org" type="svn">
+    <link>http://overlays.gentoo.org/dev/seemant</link>
+    <description>Seemant's development overlay for django and other
+    things.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/vapier/enlightenment"
+  contact="enlightenment@gentoo.org" status="official"
+  name="enlightenment">
+    <link>
+    http://overlays.gentoo.org/dev/vapier/wiki/enlightenment</link>
+    <description>Support for the Enlightenment project, most
+    notably DR17/e17.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/toolchain"
+  contact="toolchain@gentoo.org" status="official"
+  name="toolchain">
+    <link>http://overlays.gentoo.org/proj/toolchain/wiki</link>
+    <description>Toolchain ebuilds that are unsuitable for the
+    tree. Snapshots, unstable versions, etc...</description>
+  </overlay>
+  <overlay type="bzr"
+  src="http://bazaar.launchpad.net/~serkan-kaba/serkan-overlay/mainline"
+  contact="serkan@gentoo.org" name="serkan-overlay"
+  status="official">
+    <link>http://dev.gentoo.org/~serkan</link>
+    <description>Serkan Kaba's (serkan) private developer
+    overlay</description>
+  </overlay>
+  <overlay type="rsync"
+  src="rsync://gentoo.xwing.info/xwing-overlay"
+  contact="casta@xwing.info" name="xwing">
+    <link>http://gentoo.xwing.info</link>
+    <description>This overlay contains some experimental stuff,
+    such as turboprint printers driver (bug #61311), intel-536ep
+    driver for lastest 2.6 kernels (bug #127464), lastest grisbi
+    version (proxy maintainer) before it's portage integration and
+    so on.</description>
+  </overlay>
+  <overlay type="svn"
+  src="http://svn.digital-trauma.de/gentoo/trunk/"
+  contact="gentoo-overlay@digital-trauma.de" name="trauma">
+    <link>http://svn.digital-trauma.de/gentoo/</link>
+    <description>This overlay has a binary, current version of
+    eclipse with many plugins and some small new ebuilds from
+    trauma and bugzilla.g.o.</description>
+  </overlay>
+  <overlay name="deathwing00" type="svn"
+  src="svn://overlays.gentoo.org/dev/deathwing00"
+  contact="deathwing00@gentoo.org">
+    <link>http://overlays.gentoo.org</link>
+    <description>Experimental ebuilds from the private overlay of
+    Ioannis Aslanidis [deathwing00@gentoo.org].</description>
+  </overlay>
+  <overlay name="marineam-xen" type="svn"
+  src="svn://overlays.gentoo.org/dev/marineam/xen"
+  contact="marineam@gentoo.org" status="official">
+    <link>http://overlays.gentoo.org/dev/marineam</link>
+    <description>Experimental ebuilds for Xen.</description>
+  </overlay>
+  <overlay name="xen" type="svn"
+  src="svn://overlays.gentoo.org/proj/xen/overlay"
+  contact="xen@gentoo.org" status="official">
+    <link>http://overlays.gentoo.org/proj/xen</link>
+    <description>Experimental ebuilds for Xen.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/cell"
+  contact="lu_zero@gentoo.org" status="official" name="cell">
+    <link>http://overlays.gentoo.org/proj/cell</link>
+    <description>Support for Cell architecture, including IBM blade
+    and Sony Playstation 3</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/powerpc"
+  contact="ranger@gentoo.org" status="official" name="powerpc">
+    <link>http://overlays.gentoo.org/proj/powerpc</link>
+    <description>Support for PowerPC-based ebuilds that are not
+    appropriate for the portage tree.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/emacs/emacs-overlay"
+  contact="emacs@gentoo.org" name="emacs" status="official">
+    <link>http://overlays.gentoo.org/proj/emacs/</link>
+    <description>Provide Emacs related ebuilds which are a bit
+    experimental or work-in-progress. Don't rely on them, but don't
+    hesitate to file bugs or write emails.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/emacs/xemacs-overlay"
+  contact="xemacs@gentoo.org" name="xemacs" status="official">
+    <link>http://overlays.gentoo.org/proj/emacs/</link>
+    <description>Provide XEmacs related ebuilds which are a bit
+    experimental or work-in-progress. Don't rely on them, but don't
+    hesitate to file bugs or write emails.</description>
+  </overlay>
+  <overlay type="git" src="git://git.pioto.org/pioto-overlay.git"
+  contact="pioto@pioto.org" name="pioto-overlay">
+    <link>http://blog.pioto.org</link>
+    <description>Most things in here are still works in progress or
+    not stable enough for the main ebuild tree. If something
+    breaks, you're on your own.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/matsuu/secondlife/"
+  contact="matsuu@gentoo.org" name="secondlife">
+    <link>http://overlays.gentoo.org/dev/matsuu/</link>
+    <description>Matsuu's Second Life Overlay</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/gnustep/overlay"
+  contact="gnustep@gentoo.org" status="official" name="gnustep">
+    <link>http://overlays.gentoo.org/proj/gnustep</link>
+    <description>Experimental ebuilds for GNUstep packages in
+    Gentoo. Comments and bugreports are welcome!</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/rox/trunk/overlay/"
+  contact="rox@gentoo.org" status="official" name="rox">
+    <link>http://overlays.gentoo.org/proj/rox</link>
+    <description>Experimental ebuilds for the Rox
+    Desktop.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/proj/perl-overlay.git"
+  contact="perl@gentoo.org" status="official"
+  name="perl-experimental">
+    <link>http://overlays.gentoo.org/proj/perl/</link>
+    <description>Experimental ebuilds for Perl packages in Gentoo.
+    Comments and bugreports are welcome!</description>
+  </overlay>
+  <overlay type="svn" src="http://svn.liveforge.org/berkano/trunk"
+  contact="yngwin@gmail.com" status="unofficial" name="berkano">
+    <link>http://svn.liveforge.org/berkano/trunk</link>
+    <description>Berkano overlay provides an overlay for Gentoo
+    Linux with ebuilds of bleeding edge software (such as live
+    subversion builds) and other handy tools that are missing from
+    the official portage tree. Areas of interest include multimedia
+    and system administration.</description>
+  </overlay>
+  <overlay type="svn" src="svn://svn.freevo.org/freevo/portage/"
+  contact="dischi@freevo.org" status="unofficial" name="freevo">
+    <link>http://www.freevo.org</link>
+    <description>The Freevo overlay provides ebuils for development
+    snapshots of the unreleased Freevo 2.0 and its
+    dependencies.</description>
+  </overlay>
+  <overlay type="rsync"
+  src="rsync://rsync.gentoo.stealer.net/swegener-overlay/"
+  contact="swegener@gentoo.org" status="official" name="swegener">
+    <link>http://dev.gentoo.org/~swegener/</link>
+    <description>This overlay contains some experimental stuff, but
+    mostly stuff I quickly wrote an ebuild for or grabed it from
+    bugzilla and did not have the time to commit it to the official
+    tree or do not consider it ready for it.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://www2.mailstation.de/git/philantrop.git"
+  contact="philantrop@gentoo.org" status="official"
+  name="philantrop">
+    <link>http://genkdesvn.mailstation.de</link>
+    <description>A collection of work-in-progress ebuilds and other
+    fun broken things.</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/dev/rbu/overlay"
+  contact="rbu@gentoo.org" status="official" name="rbu">
+    <link>http://overlays.gentoo.org/dev/rbu/wiki</link>
+    <description>Random stuff.</description>
+  </overlay>
+  <overlay type="git" src="http://moving-innovations.com/overlay"
+  contact="graaff@gentoo.org" status="official" name="graaff">
+    <link>http://moving-innovations.com/blog/</link>
+    <description>Developer overlay of Hans de Graaff with mostly
+    ruby and xemacs ebuilds, and a few assorted other
+    goodies.</description>
+  </overlay>
+  <overlay type="mercurial" src="http://hg.core.ws/devnull"
+  contact="nico@core.ws" name="devnull">
+    <link>http://devnull.core.ws/EbuildRepository/</link>
+    <description>Various ebuilds, most of them are bleeding edge
+    scm versions, the others have not found their way into portage
+    yet.</description>
+  </overlay>
+  <overlay contact="mescalinum@gmail.com" name="pd-overlay"
+  src="https://pd-overlay.svn.sourceforge.net/svnroot/pd-overlay/pd-overlay"
+  type="svn">
+    <link>http://pd-overlay.sourceforge.net/</link>
+    <description>Subversion ebuilds for PureData the dataflow
+    language</description>
+  </overlay>
+  <overlay contact="flammie@gentoo.org" name="finnish"
+  src="svn://overlays.gentoo.org/proj/finnish/trunk"
+  type="svn">
+    <link>http://overlays.gentoo.org/proj/finnish</link>
+    <description>Finnish overlay for spell checking etc.
+    etc.</description>
+  </overlay>
+  <overlay contact="lu_zero@gentoo.org" name="lu_zero"
+  src="svn://overlays.gentoo.org/dev/lu_zero" type="svn">
+    <link>http://overlays.gentoo.org/dev/lu_zero</link>
+    <description>Experimental Media and PowerPC/CELL related
+    ebuilds.</description>
+  </overlay>
+  <overlay type="svn"
+  src="https://cafarelli.fr/svn/voyageur-overlay"
+  contact="voyageur@gentoo.org" name="voyageur" status="official">
+    <link>
+    http://cafarelli.fr/websvn/listing.php?repname=voyageur-overlay</link>
+    <description>Voyageur's random ebuilds stuff</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/uberlord"
+  contact="roy@marples.name" name="openrc">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/uberlord;a=summary</link>
+    <description>Uberlord's openrc ebuilds</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/hawking"
+  contact="hawking@gentoo.org" name="hawking" status="official">
+    <link>http://dev.gentoo.org/~hawking/</link>
+    <description>hawking's random ebuilds.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/hwoarang"
+  contact="hwoarang@gentoo.org" name="hwoarang" status="official">
+    <link>http://dev.gentoo.org/~hwoarang/</link>
+    <description>hwoarangs' testing ebuilds</description>
+  </overlay>
+  <overlay type="svn"
+  src="svn://overlays.gentoo.org/proj/gcc-porting"
+  contact="gcc-porting@gentoo.org" status="official"
+  name="gcc-porting">
+    <link>http://overlays.gentoo.org/proj/gcc-porting/</link>
+    <description>Compatibility patches for upcoming GCC
+    releases.</description>
+  </overlay>
+  <overlay type="git" src="git://git.overlays.gentoo.org/dev/falco"
+  contact="falco@gentoo.org" status="official" name="falco">
+    <link>http://dev.gentoo.org/~falco/</link>
+    <description>Falco's random stuff about netmon, net-mail or
+    security, unofficial ebuilds like proxsmtp, unofficial patches
+    on Postfix; also pre-stable security upgrades, perhaps merged
+    in the Security Overlay Project some day.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.thousandparsec.net/git/gentoo-overlay.git"
+  contact="mavrinac@gmail.com" name="thousand-parsec">
+    <link>http://www.mavrinac.com/index.cgi?page=tp</link>
+    <description>Overlay for the Thousand Parsec framework for
+    turn-based space empire building games.</description>
+  </overlay>
+  <overlay type="git" src="git://github.com/dang/kvm.git"
+  contact="dang@gentoo.org;cardoe@gentoo.org" name="kvm">
+    <description>Kernel Virtual Machine userspace
+    support</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.gentoo.gr.jp/ebuilds/gentoojp.git"
+  contact="jp-admins@gentoo.gr.jp" name="gentoojp">
+    <link>http://ebuild.gentoo.gr.jp/</link>
+    <description>GentooJP provides custom ebuilds for Japanese
+    Gentoo users.</description>
+  </overlay>
+  <overlay contact="geekounet@poildetroll.net" name="akoya"
+  src="https://hg.poildetroll.net/hg/gentoo/overlay"
+  type="mercurial" status="unofficial">
+    <link>https://trac.poildetroll.net/trac/akoya</link>
+    <description>Akoya overlay</description>
+  </overlay>
+  <overlay contact="majeru@gentoo.ro" name="oss-overlay"
+  src="http://hg.atheme.org/users/majeru/portage-overlay/"
+  type="mercurial" status="unofficial">
+    <link>http://gentoo-wiki.com/Howto_OSS4</link>
+    <description>OSSv4 overlay</description>
+  </overlay>
+  <overlay type="svn" name="ruby" contact="ruby@gentoo.org"
+  status="official" src="svn://overlays.gentoo.org/proj/ruby">
+    <link>http://overlays.gentoo.org/proj/ruby/wiki</link>
+    <description>Experimental ebuilds from the Ruby
+    edge.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/proj/kerberos.git"
+  contact="mueli@gentoo.org" name="kerberos">
+    <link>http://dev.gentoo.org/~mueli</link>
+    <description>Overlay which provides the bleeding edge on the
+    kerberos integration in gentoo.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/ikelos.git"
+  contact="ikelos@gentoo.org" name="ikelos">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/ikelos.git;a=summary</link>
+    <description>Ikelos's hospice for broken and damaged
+    ebuilds.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.wolf31o2.org/overlays/wolf31o2.git"
+  contact="wolf31o2@wolf31o2.org" name="wolf31o2">
+    <link>http://www.wolf31o2.org</link>
+    <description>Wolf31o2's project ebuilds</description>
+  </overlay>
+  <overlay type="mercurial"
+  src="http://bitbucket.org/yngwin/lxde-overlay/" name="lxde"
+  contact="yngwin@gentoo.org" status="official">
+    <link>http://www.gentoo.org/proj/en/desktop/lxde/</link>
+    <description>Repo for development of ebuilds for the LXDE
+    desktop environment.</description>
+  </overlay>
+  <overlay type="svn" src="svn://svn.os-rostov.ru/overlay"
+  name="rostov" contact="oleg.kluchkin@gmail.com">
+    <link>http://os-rostov.ru/</link>
+    <description>Repo for development of ebuilds.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/lordvan.git"
+  contact="lordvan@gentoo.org" name="lordvan">
+    <link>http://www.lordvan.com</link>
+    <description>LordVan's project ebuilds</description>
+  </overlay>
+  <overlay type="git"
+  src="git://github.com/eatnumber1/pcsx2-overlay.git"
+  contact="gabrielmaculus@gmail.com" name="pcsx2">
+    <link>
+    http://github.com/eatnumber1/pcsx2-overlay/tree/master</link>
+    <description>Experimental overlay for pcsx2
+    ebuilds.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/proj/sugar.git"
+  contact="alsroot@member.fsf.org" name="sugar">
+    <link>
+    http://sugarlabs.org/go/Community/Distributions/Gentoo</link>
+    <description>Sugar (sugarlabs.org) related
+    packages</description>
+  </overlay>
+  <overlay contact="OdinsHorse@googlemail.com" name="openmoko"
+  src="svn://overlays.gentoo.org/proj/embedded/openmoko"
+  type="svn" status="official">
+    <link>
+    http://overlays.gentoo.org/proj/embedded/wiki/openmoko</link>
+    <description>Openmoko's project overlay.</description>
+  </overlay>
+  <overlay type="bzr" name="bazaar"
+  src="https://code.launchpad.net/bzr-gentoo-overlay/trunk"
+  contact="See Launchpad project page">
+    <link>https://launchpad.net/bzr-gentoo-overlay/</link>
+    <description>A collection of Bazaar-related ebuilds, including
+    release candidates of Bazaar.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://github.com/gentoo-qt/qting-edge.git"
+  contact="yngwin@gentoo.org" name="qting-edge" status="official">
+    <link>http://github.com/gentoo-qt/qting-edge/</link>
+    <description>Experimental Qt4 ebuilds and related packages,
+    provided by Gentoo's Qt team. The overlay contains ebuilds for
+    official pre-releases, and live ebuilds for both the official
+    Nokia Qt Software git repository and KDE's qt-copy subversion
+    repository. It also has various (non-KDE) packages that use
+    Qt4.</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/alexxy.git"
+  contact="alexxy@gentoo.org" name="alexxy" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/alexxy.git</link>
+    <description>Some random work in progress stuff from
+    alexxy</description>
+  </overlay>
+  <overlay type="git"
+  src="http://rsalveti.net/git/projects/mamona-overlay/"
+  contact="ricardo.salveti@openbossa.org" name="mamona">
+    <link>
+    http://dev.openbossa.org/trac/mamona/wiki/MamonaGentooOverlay</link>
+    <description>Mamona is an embedded Linux distribution, based on
+    Open Embedded, for ARM EABI.</description>
+  </overlay>
+  <overlay type="svn" status="unofficial"
+  src="https://gentoo-quebec.org/svn/gentoo-quebec/trunk/overlay/"
+  contact="laurent@gentoo-quebec.org" name="gentoo-quebec">
+    <link>http://www.gentoo-quebec.org</link>
+    <description>New ebuilds created by the Gentoo-Quebec
+    team.</description>
+  </overlay>
+  <overlay name = "tcl-multislot"  status = "unofficial"
+  contact = "mescalinum@gentoo.org" type = "svn"
+  src = "svn://overlays.gentoo.org/dev/mescalinum/tcl-multislot">
+  <link>https://overlays.gentoo.org/dev/mescalinum</link>
+  <description>Tcl/Tk multi-slot system, with tcltk eselect module
+      for switching across multiple versions (actually: 8.4 8.5 8.6)
+  </description>
+  </overlay>
+  <overlay name="sping" type="git" status = "unofficial"
+    src="git://git.goodpoint.de/overlay-sping.git" contact="sebastian@pipping.org">
+    <link>http://git.goodpoint.de/?p=overlay-sping.git;a=summary</link>
+    <description>Gentoo overlay of Sebastian Pipping</description>
+  </overlay>
+  <overlay type="git" src="git://github.com/steev/steev-overlay.git"
+  contact="steev@gentoo.org" name="steev" status = "official">
+    <link>http://github.com/steev/steev-overlay/tree/master</link>
+    <description>Steev Klimaszewski's Overlay</description>
+  </overlay>
+  <overlay type="git" src="git://repo.or.cz/otih-overlay.git"
+  contact="fabian@datensalat.eu" name="otih" status = "unofficial">
+    <link>http://repo.or.cz/w/otih-overlay.git</link>
+    <description>Otih's Provide-Patches Overlay</description>
+  </overlay>
+  <overlay name = "tcl-8.6"  status = "unofficial"
+  contact = "mescalinum@gentoo.org" type = "svn"
+  src = "svn://overlays.gentoo.org/dev/mescalinum/tcl-8.6">
+  <link>https://overlays.gentoo.org/dev/mescalinum</link>
+  <description>Tcl/Tk 8.8, Itcl/Itk 4 (beta) and other fixed packages
+  </description>
+  </overlay>
+  <overlay contact = "johnrdoe63@cregion.ru" status = "unofficial"
+    type = "rsync" src  = "rsync://rsync.cregion.ru/crg-overlay"
+    name = "crg">
+    <link>http://wiki.cregion.ru/moin.cgi/CRG_Overlay</link>
+    <description>CRG-Overlay for Gentoo Linux</description>
+  </overlay>
+  <overlay contact = "tante@the-gay-bar.com" status = "unofficial"
+    type = "git" src  = "git://gitorious.org/tante_overlay/mainline.git"
+    name = "tante">
+    <link>http://gitorious.org/projects/tante_overlay/repos/mainline</link>
+    <description>Overlay of tante</description>
+  </overlay>
+  <overlay contact = "mahatma@eu.by" status = "unofficial"
+    type = "svn" src  = "http://raw.googlecode.com/svn/trunk"
+    name = "raw">
+    <link>http://code.google.com/p/raw/</link>
+    <description>some raw stuff</description>
+  </overlay>
+  <overlay contact = "ibormuth@efil.de" status = "unofficial"
+    type = "git" src  = "git://repo.or.cz/gentoo-overlay-ibormuth.git"
+    name = "ibormuth">
+    <link>http://repo.or.cz/w/gentoo-overlay-ibormuth.git</link>
+    <description>Personal Overlay of Ingo Bormuth</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/proj/m68k.git"
+  contact="m68k@gentoo.org" name="m68k" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=proj/m68k.git</link>
+    <description>m68k team overlay</description>
+  </overlay>
+  <overlay contact="andrea@dottout.com" name="dottout"
+       src="git://repo.or.cz/dottout.git" type="git"
+       status="unofficial">
+    <link>
+     http://repo.or.cz/w/dottout.git
+    </link>
+   <description>Dottout overlay</description>
+ </overlay>
+ <overlay type = "git" src  = "git://repo.or.cz/ub0rlay.git"
+      contact = "f@ub0r.de" status = "unofficial"
+      name = "ub0rlay">
+    <link>
+      http://repo.or.cz/w/ub0rlay.git
+    </link>
+    <description>This is an ub0r overlay!</description>
+ </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/proj/gentoo-bsd.git"
+  contact="welp@gentoo.org" name="gentoo-bsd" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git</link>
+    <description>Gentoo/BSD Project Overlay</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/maekke.git"
+  contact="maekke@gentoo.org" name="maekke" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/maekke.git</link>
+    <description>Markus Meier developer overlay</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/scarabeus.git"
+  contact="scarabeus@gentoo.org" name="scarabeus" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/scarabeus.git</link>
+    <description>Tomas Chvatal developer overlay</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/nirbheek.git"
+  contact="nirbheek@gentoo.org" name="nirbheek" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/nirbheek.git</link>
+    <description>Nirbheek Chauhan developer overlay</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/leio.git"
+  contact="leio@gentoo.org" name="leio" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/leio.git</link>
+    <description>Mart Raudsepp developer overlay</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/remi.git"
+  contact="remi@gentoo.org" name="remi" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/remi.git</link>
+    <description>Remi Cardona developer overlay</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/jmbsvicetto.git"
+  contact="jmbsvicetto@gentoo.org" name="jmbsvicetto" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/jmbsvicetto.git</link>
+    <description>Jorge Manuel B. S. Vicetto developer overlay</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/tove.git"
+  contact="tove@gentoo.org" name="tove" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/tove.git</link>
+    <description>Torsten Veller developer overlay</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/pchrist.git"
+  contact="pchrist@gentoo.org" name="pchrist" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/pchrist.git</link>
+    <description>Panagiotis Christopoulos developer overlay</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/matsuu.git"
+  contact="matsuu@gentoo.org" name="matsuu" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/matsuu.git</link>
+    <description>MATSUU Takuto developer overlay</description>
+  </overlay>
+  <overlay type="svn"
+  src="http://rion-overlay.googlecode.com/svn/trunk/"
+  contact="rion4ik@gmail.com" name="rion" status="unofficial">
+    <link>
+    http://code.google.com/p/rion-overlay/</link>
+    <description>Russian ovelay with a some patched and specific software</description>
+  </overlay>
+  <overlay type="git"
+  src="git://git.overlays.gentoo.org/dev/dagger"
+  contact="dagger@gentoo.org" name="dagger" status="official">
+    <link>
+    http://git.overlays.gentoo.org/gitweb/?p=dev/dagger.git;a=summary</link>
+    <description>Dagger developer overlay</description>
+  </overlay>
+  <overlay name="n8x0"
+    type="git"
+    src="git://slonopotamus.org/overlay"
+    contact="luke_n8x0_overlay@dashjr.org"
+    status="unofficial">
+    <link>
+      http://slonopotamus.org/gentoo-on-n8x0
+    </link>
+    <description>Packages to support Nokia Internet Tablets (N8x0)</description>
+  </overlay>
+</layman>
+
+
diff --git a/commands/overlays.xml b/commands/overlays.xml
new file mode 100644 (file)
index 0000000..d3dc486
--- /dev/null
@@ -0,0 +1,2999 @@
+<?xml version="1.0" ?>
+<overlays>
+  <overlay contact="maekke@gentoo.org" name="maekke" src="git://git.overlays.gentoo.org/dev/maekke.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/maekke.git
+    
+    </link>
+    <description>
+      
+      Markus Meier developer overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="mavrinac@gmail.com" name="thousand-parsec" src="git://git.thousandparsec.net/git/gentoo-overlay.git" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://www.mavrinac.com/index.cgi?page=tp
+    
+    </link>
+    <description>
+      
+      Overlay for the Thousand Parsec framework for
+    turn-based space empire building games.
+    
+    </description>
+  </overlay>
+  <overlay contact="xen@gentoo.org" name="xen" src="svn://overlays.gentoo.org/proj/xen/overlay" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/xen
+    
+    </link>
+    <description>
+      
+      Experimental ebuilds for Xen.
+    
+    </description>
+  </overlay>
+  <overlay contact="mdeininger@jyujin.de" name="jyujin" src="git://git.jyujin.de/portage-overlay.git" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://jyujin.de/
+    
+    </link>
+    <description>
+      
+      eINIT, kyuuba, dev9, various splash
+    daemons
+    
+    </description>
+  </overlay>
+  <overlay contact="kde@gentoo.org" name="kde-testing" src="git://git.overlays.gentoo.org/proj/kde.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://kde.gentoo.org
+    
+    </link>
+    <description>
+      
+      Official KDE team's testing overlay.
+    
+    </description>
+  </overlay>
+  <overlay contact="lordvan@gentoo.org" name="lordvan" src="git://git.overlays.gentoo.org/dev/lordvan.git" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://www.lordvan.com
+    
+    </link>
+    <description>
+      
+      LordVan's project ebuilds
+    
+    </description>
+  </overlay>
+  <overlay contact="rox@gentoo.org" name="rox" src="svn://overlays.gentoo.org/proj/rox/trunk/overlay/" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/rox
+    
+    </link>
+    <description>
+      
+      Experimental ebuilds for the Rox
+    Desktop.
+    
+    </description>
+  </overlay>
+  <overlay contact="rion4ik@gmail.com" name="rion" src="http://rion-overlay.googlecode.com/svn/trunk/" status="unofficial" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://code.google.com/p/rion-overlay/
+    
+    </link>
+    <description>
+      
+      Russian ovelay with a some patched and specific software
+    
+    </description>
+  </overlay>
+  <overlay contact="gnash@biterror.net" name="gnash-cvs" src="rsync://overlays.biterror.net/gnash-cvs" status="unoffficial" type="rsync">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://www.thepetersclan.net
+    
+    </link>
+    <description>
+      
+      This is a Gnash ( flash player ) cvs and snapshot
+    overlay.
+    
+    </description>
+  </overlay>
+  <overlay contact="php-bugs@gentoo.org" name="php-4" src="svn://overlays.gentoo.org/proj/php/php4" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/php
+    
+    </link>
+    <description>
+      
+      Contains a copy of everything
+    dev-lang/php-4*-related, which can no longer be kept in the
+    official tree for security reasons.
+    
+    </description>
+  </overlay>
+  <overlay contact="oleg.kluchkin@gmail.com" name="rostov" src="svn://svn.os-rostov.ru/overlay" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://os-rostov.ru/
+    
+    </link>
+    <description>
+      
+      Repo for development of ebuilds.
+    
+    </description>
+  </overlay>
+  <overlay contact="lazy_bum@o2.pl" name="roslin" src="rsync://roslin.mlodyinteligent.pl/roslin" type="rsync">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://roslin.mlodyinteligent.pl/
+    
+    </link>
+    <description>
+      
+      This is roslin, my small overlay. Enjoy!
+    (:
+    
+    </description>
+  </overlay>
+  <overlay contact="kde@gentoo.org" name="kde3" src="git://git.overlays.gentoo.org/proj/kde-crazy.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://kde.gentoo.org
+    
+    </link>
+    <description>
+      
+      KDE 3 overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="fabian@datensalat.eu" name="otih" src="git://repo.or.cz/otih-overlay.git" status="unofficial" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://repo.or.cz/w/otih-overlay.git
+    
+    </link>
+    <description>
+      
+      Otih's Provide-Patches Overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="pgsql-bugs@gentoo.org" name="postgresql-testing" src="svn://overlays.gentoo.org/proj/postgresql/testing" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/postgresql
+    
+    </link>
+    <description>
+      
+      Development overlay for PostgreSQL, testing
+    branch.
+    
+    </description>
+  </overlay>
+  <overlay contact="xfce@gentoo.org" name="xfce-dev" src="git://git.overlays.gentoo.org/proj/xfce.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/xfce/wiki
+    
+    </link>
+    <description>
+      
+      Experimental ebuilds for the Xfce4 Desktop
+    Environment
+    
+    </description>
+  </overlay>
+  <overlay contact="alsroot@member.fsf.org" name="sugar" src="git://git.overlays.gentoo.org/proj/sugar.git" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://sugarlabs.org/go/Community/Distributions/Gentoo
+    
+    </link>
+    <description>
+      
+      Sugar (sugarlabs.org) related
+    packages
+    
+    </description>
+  </overlay>
+  <overlay contact="mescalinum@gmail.com" name="pd-overlay" src="https://pd-overlay.svn.sourceforge.net/svnroot/pd-overlay/pd-overlay" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://pd-overlay.sourceforge.net/
+    
+    </link>
+    <description>
+      
+      Subversion ebuilds for PureData the dataflow
+    language
+    
+    </description>
+  </overlay>
+  <overlay contact="h.mth@web.de" name="openoffice-geki" src="http://geki.ath.cx/hacks/overlay.tar.bz2" type="tar">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://geki.ath.cx/index.php/OpenOffice
+    
+    </link>
+    <description>
+      
+      Purpose Unsupported openoffice version with
+    experimental patchset
+    
+    </description>
+  </overlay>
+  <overlay contact="desktop-effects@gentoo.org" name="desktop-effects" src="git://git.overlays.gentoo.org/proj/desktop-effects.git" status="official" type="git">
+    
+    
+    
+  
+    
+  
+    <description>
+      
+      Experimental overlay for desktop effects
+    packages.
+    
+    </description>
+  </overlay>
+  <overlay contact="wrobel@gentoo.org" name="wrobel" src="svn://overlays.gentoo.org/dev/wrobel/stable" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org
+    
+    </link>
+    <description>
+      
+      A collection of stable ebuilds from Gunnar Wrobel
+    [wrobel@gentoo.org].
+    
+    </description>
+  </overlay>
+  <overlay contact="enlightenment@gentoo.org" name="enlightenment" src="svn://overlays.gentoo.org/dev/vapier/enlightenment" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://overlays.gentoo.org/dev/vapier/wiki/enlightenment
+    
+    </link>
+    <description>
+      
+      Support for the Enlightenment project, most
+    notably DR17/e17.
+    
+    </description>
+  </overlay>
+  <overlay contact="drizzt@gentoo.org" name="drizzt-overlay" src="svn://overlays.gentoo.org/dev/drizzt/" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://drizzt.bsdnet.eu/
+    
+    </link>
+    <description>
+      
+      drizzt's private developer overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="luke_n8x0_overlay@dashjr.org" name="n8x0" src="git://slonopotamus.org/overlay" status="unofficial" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+      http://slonopotamus.org/gentoo-on-n8x0
+    
+    
+    </link>
+    <description>
+      
+      Packages to support Nokia Internet Tablets (N8x0)
+    
+    </description>
+  </overlay>
+  <overlay contact="loki_val@gentoo.org" name="loki_val" src="git://git.overlays.gentoo.org/dev/loki_val" status="unofficial" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/loki_val.git;a=summary
+    
+    </link>
+    <description>
+      
+      Peter Alfredsen's private developer
+    overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="avuton@gmail.com" name="mpd" src="git://repo.or.cz/mpd.git" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://mpd.wikia.com/wiki/Repositories#Experimental_Gentoo_Overlay
+    
+    </link>
+    <description>
+      
+      The experimental gentoo overlay was designed as a
+    way to keep up-to-date. Most of it are live ebuilds, ebuilds
+    that pull the latest HEAD from whatever repository. It also
+    includes ebuilds for clients that are not yet in portage. It is
+    maintained by avuton, send new ebuilds, corrections or bugs
+    directly to him.
+    
+    </description>
+  </overlay>
+  <overlay contact="laurent@gentoo-quebec.org" name="gentoo-quebec" src="https://gentoo-quebec.org/svn/gentoo-quebec/trunk/overlay/" status="unofficial" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://www.gentoo-quebec.org
+    
+    </link>
+    <description>
+      
+      New ebuilds created by the Gentoo-Quebec
+    team.
+    
+    </description>
+  </overlay>
+  <overlay contact="roy@marples.name" name="openrc" src="git://git.overlays.gentoo.org/dev/uberlord" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/uberlord;a=summary
+    
+    </link>
+    <description>
+      
+      Uberlord's openrc ebuilds
+    
+    </description>
+  </overlay>
+  <overlay contact="ycarus@zugaina.org" name="zugaina" src="rsync://gentoo.zugaina.org/zugaina-portage" type="rsync">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://gentoo.zugaina.org/
+    
+    </link>
+    <description>
+      
+      collection of ebuilds by ycarus
+    
+    </description>
+  </overlay>
+  <overlay contact="dberkholz@gentoo.org" name="dberkholz" src="git://git.overlays.gentoo.org/dev/dberkholz" status="unofficial" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://dev.gentoo.org/~dberkholz/overlay/
+    
+    </link>
+    <description>
+      
+      Donnie Berkholz's private developer
+    overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="wschlich@gentoo.org" name="wschlich-testing" src="svn://overlays.gentoo.org/dev/wschlich/testing" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org
+    
+    </link>
+    <description>
+      
+      A collection of testing ebuilds from Wolfram
+    Schlich [wschlich@gentoo.org].
+    
+    </description>
+  </overlay>
+  <overlay contact="darkside@gentoo.org" name="darkside" src="git://git.overlays.gentoo.org/dev/darkside" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/darkside.git;a=summary
+    
+    </link>
+    <description>
+      
+      Jeremy Olexa's (darkside) private developer
+    overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="rmh3093@gmail.com" name="THE" src="git://zen-sources.org/zen/THE.git" status="unofficial" type="git">
+    
+    
+    
+  
+    
+  
+    <description>
+      
+      Miscellaneous ebuilds not yet in
+    portage
+    
+    </description>
+  </overlay>
+  <overlay contact="ricardo.salveti@openbossa.org" name="mamona" src="http://rsalveti.net/git/projects/mamona-overlay/" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://dev.openbossa.org/trac/mamona/wiki/MamonaGentooOverlay
+    
+    </link>
+    <description>
+      
+      Mamona is an embedded Linux distribution, based on
+    Open Embedded, for ARM EABI.
+    
+    </description>
+  </overlay>
+  <overlay contact="tante@the-gay-bar.com" name="tante" src="git://gitorious.org/tante_overlay/mainline.git" status="unofficial" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://gitorious.org/projects/tante_overlay/repos/mainline
+    
+    </link>
+    <description>
+      
+      Overlay of tante
+    
+    </description>
+  </overlay>
+  <overlay contact="voip@gentoo.org" name="voip" src="svn://overlays.gentoo.org/proj/voip/trunk" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://svn.netdomination.org/gentoo-voip
+    
+    </link>
+    <description>
+      
+      Voice over IP related ebuilds.
+    
+    </description>
+  </overlay>
+  <overlay contact="hanno@gentoo.org" name="nouveau" src="http://svn.hboeck.de/nouveau-overlay" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://nouveau.freedesktop.org/
+    
+    </link>
+    <description>
+      
+      Experimental ebuilds for the free nouveau driver
+    for nvidia cards.
+    
+    </description>
+  </overlay>
+  <overlay contact="anant@gentoo.org" name="d" src="svn://overlays.gentoo.org/dev/anant/d" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/dev/anant/wiki
+    
+    </link>
+    <description>
+      
+      A collection of ebuilds related to the D
+    programming language.
+    
+    </description>
+  </overlay>
+  <overlay contact="flammie@gentoo.org" name="finnish" src="svn://overlays.gentoo.org/proj/finnish/trunk" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/finnish
+    
+    </link>
+    <description>
+      
+      Finnish overlay for spell checking etc.
+    etc.
+    
+    </description>
+  </overlay>
+  <overlay contact="yngwin@gentoo.org" name="lxde" src="http://bitbucket.org/yngwin/lxde-overlay/" status="official" type="mercurial">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://www.gentoo.org/proj/en/desktop/lxde/
+    
+    </link>
+    <description>
+      
+      Repo for development of ebuilds for the LXDE
+    desktop environment.
+    
+    </description>
+  </overlay>
+  <overlay contact="gentoo-lisp@gentoo.org" name="lisp" src="git://repo.or.cz/gentoo-lisp-overlay.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://repo.or.cz/w/gentoo-lisp-overlay.git
+    
+    </link>
+    <description>
+      
+      Common Lisp/Scheme development, recruitment and
+    live overlay. Support and feedback in `#gentoo-lisp' and via
+    `gentoo-lisp@gentoo.org'.
+    
+    </description>
+  </overlay>
+  <overlay contact="sebastian@pipping.org" name="sping" src="git://git.goodpoint.de/overlay-sping.git" status="unofficial" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://git.goodpoint.de/?p=overlay-sping.git;a=summary
+    
+    </link>
+    <description>
+      
+      Gentoo overlay of Sebastian Pipping
+    
+    </description>
+  </overlay>
+  <overlay contact="ibormuth@efil.de" name="ibormuth" src="git://repo.or.cz/gentoo-overlay-ibormuth.git" status="unofficial" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://repo.or.cz/w/gentoo-overlay-ibormuth.git
+    
+    </link>
+    <description>
+      
+      Personal Overlay of Ingo Bormuth
+    
+    </description>
+  </overlay>
+  <overlay contact="chtekk@gentoo.org" name="chtekk-syscp" src="svn://overlays.gentoo.org/dev/chtekk/syscp" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/dev/chtekk
+    
+    </link>
+    <description>
+      
+      Development overlay for a SysCP (syscp.org) ebuild
+    and Gentoo port, as well as additional
+    patches/features.
+    
+    </description>
+  </overlay>
+  <overlay contact="matsuu@gentoo.org" name="secondlife" src="svn://overlays.gentoo.org/dev/matsuu/secondlife/" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/dev/matsuu/
+    
+    </link>
+    <description>
+      
+      Matsuu's Second Life Overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="casta@xwing.info" name="xwing" src="rsync://gentoo.xwing.info/xwing-overlay" type="rsync">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://gentoo.xwing.info
+    
+    </link>
+    <description>
+      
+      This overlay contains some experimental stuff,
+    such as turboprint printers driver (bug #61311), intel-536ep
+    driver for lastest 2.6 kernels (bug #127464), lastest grisbi
+    version (proxy maintainer) before it's portage integration and
+    so on.
+    
+    </description>
+  </overlay>
+  <overlay contact="johnrdoe63@cregion.ru" name="crg" src="rsync://rsync.cregion.ru/crg-overlay" status="unofficial" type="rsync">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://wiki.cregion.ru/moin.cgi/CRG_Overlay
+    
+    </link>
+    <description>
+      
+      CRG-Overlay for Gentoo Linux
+    
+    </description>
+  </overlay>
+  <overlay contact="l.valerimanera@gmail.com" name="soor-overlay" src="git://repo.or.cz/gentoo-soor-overlay.git" status="unofficial" type="git">
+    
+    
+    
+  
+    
+  
+    <description>
+      
+      Gentoo ebuild overlay with misc stuff that I find
+    interesting.
+    
+    </description>
+  </overlay>
+  <overlay contact="alexxy@gentoo.org" name="alexxy" src="git://git.overlays.gentoo.org/dev/alexxy.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/alexxy.git
+    
+    </link>
+    <description>
+      
+      Some random work in progress stuff from
+    alexxy
+    
+    </description>
+  </overlay>
+  <overlay contact="dotnet@gentoo.org" name="dotnet" src="git://git.overlays.gentoo.org/proj/dotnet.git" status="official" type="git">
+    
+    
+    
+  
+    
+  
+    <description>
+      
+      Experimental overlay for .NET
+    packages.
+    
+    </description>
+  </overlay>
+  <overlay contact="x11@gentoo.org" name="x11" src="git://git.overlays.gentoo.org/proj/x11" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://www.gentoo.org/proj/en/desktop/x/x11/
+    
+    </link>
+    <description>
+      
+      Gentoo X11 team overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="jokey@gentoo.org" name="jokey" src="svn://overlays.gentoo.org/dev/jokey/trunk" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/dev/jokey
+    
+    </link>
+    <description>
+      
+      Jokey's Overlay - Contains pre-tree stuff like
+    italc, pkgcore-test-ebuilds and lcd stuff
+    
+    </description>
+  </overlay>
+  <overlay contact="falco@gentoo.org" name="falco" src="git://git.overlays.gentoo.org/dev/falco" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://dev.gentoo.org/~falco/
+    
+    </link>
+    <description>
+      
+      Falco's random stuff about netmon, net-mail or
+    security, unofficial ebuilds like proxsmtp, unofficial patches
+    on Postfix; also pre-stable security upgrades, perhaps merged
+    in the Security Overlay Project some day.
+    
+    </description>
+  </overlay>
+  <overlay contact="lxnay@sabayonlinux.org" name="sabayon" src="git://sabayon.org/projects/overlay.git" type="git">
+    
+    
+    
+  
+    <link>
+      http://sabayonlinux.org
+    </link>
+    <description>
+      Purpose To provide ebuilds that were created from
+    the Sabayon Linux project such as customized programs, ebuilds
+    not in the official portage, artwork, themes, etc. Bugs to
+    http://bugs.sabayonlinux.org/bugs/
+    </description>
+  </overlay>
+  <overlay contact="java@gentoo.org" name="java-overlay" src="svn://overlays.gentoo.org/proj/java/java-overlay/" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/java
+    
+    </link>
+    <description>
+      
+      The only java overlay available via layman. This
+    overlays contains ebuilds that are expected to work when you
+    emerge them. The ebuilds also need to use the generation 2
+    eclasses.
+    
+    </description>
+  </overlay>
+  <overlay contact="dirtyepic@gentoo.org" name="dirtyepic" src="svn://overlays.gentoo.org/dev/dirtyepic" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/dev/dirtyepic
+    
+    </link>
+    <description>
+      
+      Various work-in-progress stuff including GCC-svn
+    and wxGTK.
+    
+    </description>
+  </overlay>
+  <overlay contact="philantrop@exherbo.org" name="kde" src="git://www2.mailstation.de/git/genkde4svn.git" status="unofficial" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://genkdesvn.mailstation.de
+    
+    </link>
+    <description>
+      
+      Paludis-only kde4 overlay. Unsupported by KDE team.
+    
+    </description>
+  </overlay>
+  <overlay contact="aross@gentoo.org" name="aross" src="svn://overlays.gentoo.org/dev/aross" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/dev/aross
+    </link>
+    <description>
+      Personal scratch space.
+    </description>
+  </overlay>
+  <overlay contact="betelgeuse@gentoo.org" name="betelgeuse" src="svn://overlays.gentoo.org/dev/betelgeuse" status="official" type="svn">
+    
+    
+  
+  
+  
+    
+    
+  
+    <link>
+      
+      https://overlays.gentoo.org/dev/betelgeuse
+    
+    </link>
+    <description>
+      
+      Betelgeuse's developer overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="python@gentoo.org" name="python-testing" src="svn://overlays.gentoo.org/proj/python/overlays/testing" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/python/wiki
+    
+    </link>
+    <description>
+      
+      Python development tree, staging area for the tree.
+    
+    </description>
+  </overlay>
+  <overlay contact="hanno@gentoo.org" name="hanno-xgl" src="http://svn.hboeck.de/xgl-overlay" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://www.hboeck.de
+    
+    </link>
+    <description>
+      
+      Purpose To provide new Xgl and AIGLX desktop
+    developments as mentioned on his blog.
+    
+    </description>
+  </overlay>
+  <overlay contact="msl@calivia.com" name="sipx" src="http://scm.calivia.com/svn/sipx/gentoo" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://scm.calivia.com/svn/sipx/gentoo
+    
+    </link>
+    <description>
+      
+      This repository contains sipx and related
+    ebuilds.
+    
+    </description>
+  </overlay>
+  <overlay contact="vmware@gentoo.org" name="vmware" src="svn://overlays.gentoo.org/proj/vmware/trunk" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://bugs.gentoo.org/show_bug.cgi?id=122500
+    
+    </link>
+    <description>
+      
+      Testing ground for vmware-server and
+    vmware-server-console ebuilds until they can eventually be
+    committed into portage.
+    
+    </description>
+  </overlay>
+  <overlay contact="halcy0n@gentoo.org" name="halcy0n" src="git://git.overlays.gentoo.org/dev/halcy0n.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/halcy0n.git;a=summary
+    
+    </link>
+    <description>
+      
+      Various packages, probably some toolchain stuff
+    though
+    
+    </description>
+  </overlay>
+  <overlay contact="je_fro@gentoo.org" name="je_fro" src="svn://overlays.gentoo.org/dev/je_fro" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/dev/je_fro
+    
+    </link>
+    <description>
+      
+      Helpful ebuilds for the macbook pro, and
+    experimental gentoo-science packages.
+    
+    </description>
+  </overlay>
+  <overlay contact="lu_zero@gentoo.org" name="cell" src="svn://overlays.gentoo.org/proj/cell" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/cell
+    
+    </link>
+    <description>
+      
+      Support for Cell architecture, including IBM blade
+    and Sony Playstation 3
+    
+    </description>
+  </overlay>
+  <overlay contact="vdr@gentoo.org" name="vdr-experimental" src="svn://overlays.gentoo.org/proj/vdr/experimental" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/vdr
+    </link>
+    <description>
+      Development overlay for VDR, experimental branch.
+    WARNING: This branch can kill your VDR! Only use it if you know
+    what you are doing. It is best to stay in touch with the
+    developers if you would like to try this out. We are available
+    in #gentoo-vdr on Freenode.
+    </description>
+  </overlay>
+  <overlay contact="pchrist@gentoo.org" name="pchrist" src="git://git.overlays.gentoo.org/dev/pchrist.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/pchrist.git
+    
+    </link>
+    <description>
+      
+      Panagiotis Christopoulos developer overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="wrobel@gentoo.org" name="kolab" src="svn://overlays.gentoo.org/proj/kolab/overlay" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://www.gentoo.org/proj/en/kolab/index.xml
+    
+    </link>
+    <description>
+      
+      Project to allow running Kolab on
+    Gentoo.
+    
+    </description>
+  </overlay>
+  <overlay contact="netcelli@verlihub-project.org" name="verlihub" src="https://verlihub.svn.sourceforge.net/svnroot/verlihub/overlay" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://www.verlihub-project.org
+    
+    </link>
+    <description>
+      
+      Verlihub is a Direct Connect protocol server runs
+    on Linux OS written in C++; Many features are available: MySQL
+    database, very low use of CPU, RAM and Bandwidth, deflood
+    integrated protection, plugins
+    
+    </description>
+  </overlay>
+  <overlay contact="welp@gentoo.org" name="gentoo-bsd" src="git://git.overlays.gentoo.org/proj/gentoo-bsd.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git
+    
+    </link>
+    <description>
+      
+      Gentoo/BSD Project Overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="vdr@gentoo.org" name="vdr-devel" src="svn://overlays.gentoo.org/proj/vdr/vdr-devel" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/vdr
+    
+    </link>
+    <description>
+      
+      Overlay for VDR, that contains ebuilds for
+    development version of VDR, and specific plugins for that
+    version.
+    
+    </description>
+  </overlay>
+  <overlay contact="nirbheek@gentoo.org" name="nirbheek" src="git://git.overlays.gentoo.org/dev/nirbheek.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/nirbheek.git
+    
+    </link>
+    <description>
+      
+      Nirbheek Chauhan developer overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="ranger@gentoo.org" name="powerpc" src="svn://overlays.gentoo.org/proj/powerpc" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/powerpc
+    
+    </link>
+    <description>
+      
+      Support for PowerPC-based ebuilds that are not
+    appropriate for the portage tree.
+    
+    </description>
+  </overlay>
+  <overlay contact="graaff@gentoo.org" name="graaff" src="http://moving-innovations.com/overlay" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://moving-innovations.com/blog/
+    
+    </link>
+    <description>
+      
+      Developer overlay of Hans de Graaff with mostly
+    ruby and xemacs ebuilds, and a few assorted other
+    goodies.
+    
+    </description>
+  </overlay>
+  <overlay contact="scsichen@gmail.com" name="gentoo-taiwan" src="http://gentoo-taiwan.googlecode.com/svn/trunk/" status="unofficial" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://gentoo-taiwan.googlecode.com/
+    
+    </link>
+    <description>
+      
+      A collection of ebuilds from Gentoo
+    Taiwan.
+    
+    </description>
+  </overlay>
+  <overlay contact="genstef@gentoo.org" name="genstef" src="svn://overlays.gentoo.org/dev/genstef" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/dev/genstef
+    </link>
+    <description>
+      Genstef's Overlay - It usually contains some
+    experimental ebuilds on their way to the tree
+    </description>
+  </overlay>
+  <overlay contact="wolf31o2@wolf31o2.org" name="wolf31o2" src="git://git.wolf31o2.org/overlays/wolf31o2.git" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://www.wolf31o2.org
+    
+    </link>
+    <description>
+      
+      Wolf31o2's project ebuilds
+    
+    </description>
+  </overlay>
+  <overlay contact="java@gentoo.org" name="java-gcj-overlay" src="svn://overlays.gentoo.org/proj/java/gcj-overlay/" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://overlays.gentoo.org/proj/java/wiki/GCJ_as_a_JDK
+    
+    </link>
+    <description>
+      
+      An overlay for GCJ to use as a Java SDK /
+    RE.
+    
+    </description>
+  </overlay>
+  <overlay contact="gabrielmaculus@gmail.com" name="pcsx2" src="git://github.com/eatnumber1/pcsx2-overlay.git" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://github.com/eatnumber1/pcsx2-overlay/tree/master
+    
+    </link>
+    <description>
+      
+      Experimental overlay for pcsx2
+    ebuilds.
+    
+    </description>
+  </overlay>
+  <overlay contact="wschlich@gentoo.org" name="wschlich" src="svn://overlays.gentoo.org/dev/wschlich/stable" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org
+    </link>
+    <description>
+      A collection of stable ebuilds from Wolfram
+    Schlich [wschlich@gentoo.org].
+    </description>
+  </overlay>
+  <overlay contact="toolchain@gentoo.org" name="toolchain" src="svn://overlays.gentoo.org/proj/toolchain" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/toolchain/wiki
+    
+    </link>
+    <description>
+      
+      Toolchain ebuilds that are unsuitable for the
+    tree. Snapshots, unstable versions, etc...
+    
+    </description>
+  </overlay>
+  <overlay contact="gnome@gentoo.org" name="gnome" src="git://git.overlays.gentoo.org/proj/gnome.git" status="official" type="git">
+    
+    
+    
+  
+    
+  
+    <description>
+      
+      experimental gnome ebuilds
+    
+    </description>
+  </overlay>
+  <overlay contact="andrea@dottout.com" name="dottout" src="git://repo.or.cz/dottout.git" status="unofficial" type="git">
+    
+    
+    
+   
+    
+    
+  
+    <link>
+      
+      
+     http://repo.or.cz/w/dottout.git
+    
+    
+    </link>
+    <description>
+      
+      Dottout overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="mescalinum@gentoo.org" name="tcl-8.6" src="svn://overlays.gentoo.org/dev/mescalinum/tcl-8.6" status="unofficial" type="svn">
+    
+    
+  
+  
+  
+    
+    
+  
+    <link>
+      
+      https://overlays.gentoo.org/dev/mescalinum
+    
+    </link>
+    <description>
+      
+      Tcl/Tk 8.8, Itcl/Itk 4 (beta) and other fixed packages
+  
+    
+    </description>
+  </overlay>
+  <overlay contact="r0bertz@gentoo.org" name="gentoo-china" src="http://gentoo-china-overlay.googlecode.com/svn/trunk/" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://code.google.com/p/gentoo-china-overlay
+    
+    </link>
+    <description>
+      
+      Purpose To provide some programs useful to Chinese
+    users.
+    
+    </description>
+  </overlay>
+  <overlay contact="rmh3093@gmail.com" name="iwlwifi" src="http://opensvn.csie.org/rmh3093/iwlwifi" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://opensvn.csie.org/rmh3093/iwlwifi
+    
+    </link>
+    <description>
+      
+      This overlay provides ebuilds for the new wireless
+    driver iwlwifi
+    
+    </description>
+  </overlay>
+  <overlay contact="matsuu@gentoo.org" name="matsuu" src="git://git.overlays.gentoo.org/dev/matsuu.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/matsuu.git
+    
+    </link>
+    <description>
+      
+      MATSUU Takuto developer overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="jmbsvicetto@gentoo.org" name="jmbsvicetto" src="git://git.overlays.gentoo.org/dev/jmbsvicetto.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/jmbsvicetto.git
+    
+    </link>
+    <description>
+      
+      Jorge Manuel B. S. Vicetto developer overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="games@gentoo.org" name="games" src="svn://overlays.gentoo.org/proj/games" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://games.gentoo.org/
+    
+    </link>
+    <description>
+      
+      A collection of work-in-progress ebuilds and
+    ebuilds which require testing.
+    
+    </description>
+  </overlay>
+  <overlay contact="pioto@pioto.org" name="pioto-overlay" src="git://git.pioto.org/pioto-overlay.git" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://blog.pioto.org
+    
+    </link>
+    <description>
+      
+      Most things in here are still works in progress or
+    not stable enough for the main ebuild tree. If something
+    breaks, you're on your own.
+    
+    </description>
+  </overlay>
+  <overlay contact="ikelos@gentoo.org" name="ikelos" src="git://git.overlays.gentoo.org/dev/ikelos.git" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/ikelos.git;a=summary
+    
+    </link>
+    <description>
+      
+      Ikelos's hospice for broken and damaged
+    ebuilds.
+    
+    </description>
+  </overlay>
+  <overlay contact="alexxy@gentoo.ru" name="pda" src="git://vcs.gentoo.ru/gentoo-pda" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://pda.gentoo.ru
+    
+    </link>
+    <description>
+      
+      This overlay contains some pda-related ebuilds
+    (for now for devices such as iPAQ hx4700, Sharp Zaurus, Asus
+    a620 and some others)
+    
+    </description>
+  </overlay>
+  <overlay contact="yngwin@gmail.com" name="berkano" src="http://svn.liveforge.org/berkano/trunk" status="unofficial" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://svn.liveforge.org/berkano/trunk
+    
+    </link>
+    <description>
+      
+      Berkano overlay provides an overlay for Gentoo
+    Linux with ebuilds of bleeding edge software (such as live
+    subversion builds) and other handy tools that are missing from
+    the official portage tree. Areas of interest include multimedia
+    and system administration.
+    
+    </description>
+  </overlay>
+  <overlay contact="dagger@gentoo.org" name="dagger" src="git://git.overlays.gentoo.org/dev/dagger" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/dagger.git;a=summary
+    
+    </link>
+    <description>
+      
+      Dagger developer overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="marineam@gentoo.org" name="marineam-xen" src="svn://overlays.gentoo.org/dev/marineam/xen" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/dev/marineam
+    
+    </link>
+    <description>
+      
+      Experimental ebuilds for Xen.
+    
+    </description>
+  </overlay>
+  <overlay contact="hollow@gentoo.org" name="hollow" src="git://git.xnull.de/overlay.git" status="unofficial" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://git.xnull.de/gitweb/?p=overlay.git
+    
+    </link>
+    <description>
+      
+      A collection of work-in-progress ebuilds and other
+    fun broken things.
+    
+    </description>
+  </overlay>
+  <overlay contact="luke_armagetron@dashjr.org" name="armagetron" src="https://armagetronad.svn.sourceforge.net/svnroot/armagetronad/armagetronad/trunk/build/gentoo/overlay" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://armagetronad.net
+    
+    </link>
+    <description>
+      
+      3D light cycles, like the movie TRON
+    
+    </description>
+  </overlay>
+  <overlay contact="flameeyes@gmail.com" name="flameeyes-overlay" src="git://git.overlays.gentoo.org/dev/flameeyes.git" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://blog.flameeyes.eu/
+    
+    </link>
+    <description>
+      
+      Flameeyes' private developer overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="haskell@gentoo.org" name="haskell" src="http://code.haskell.org/gentoo/gentoo-haskell/" status="official" type="darcs">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://www.haskell.org/~gentoo/gentoo-haskell/
+    
+    </link>
+    <description>
+      
+      The Official Gentoo Haskell overlay.
+    
+    </description>
+  </overlay>
+  <overlay contact="sven.eckelmann@gmx.de" name="s3d" src="git://gitorious.org/s3d-gentoo/s3d-gentoo.git" status="unofficial" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://s3d.berlios.de/
+    
+    </link>
+    <description>
+      
+      Gentoo ebuilds for s3d and related packages. s3d
+    is a 3d network display server which can be used as 3d desktop
+    enviroment.
+    
+    </description>
+  </overlay>
+  <overlay contact="Mario-Fetka@gmx.at" name="n4g-experimental" src="http://mars.arge.at/svn/n4g/branches/experimental" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://n4g.mars.arge.at
+    
+    </link>
+    <description>
+      
+      The goal for this overlay is to reproduce the Open
+    Enterprise server from novell on gentoo
+    
+    </description>
+  </overlay>
+  <overlay contact="dberkholz@gentoo.org" name="ltsp" src="git://git.overlays.gentoo.org/proj/ltsp.git" status="official" type="git">
+    
+    
+    
+  
+    
+  
+    <description>
+      
+      Linux Terminal Server Project
+    overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="Mario-Fetka@gmx.at" name="n4g" src="http://mars.arge.at/svn/n4g/trunk/novell4gentoo" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://n4g.mars.arge.at
+    
+    </link>
+    <description>
+      
+      The goal for this overlay is to reproduce the Open
+    Enterprise server from novell on gentoo
+    
+    </description>
+  </overlay>
+  <overlay contact="dertobi123@gentoo.org" name="dertobi123" src="svn://overlays.gentoo.org/dev/dertobi123" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org
+    
+    </link>
+    <description>
+      
+      Some ebuilds not yet ready for mainstream portage
+    from Tobias Scherbaum [dertobi123@gentoo.org].
+    
+    </description>
+  </overlay>
+  <overlay contact="python@gentoo.org" name="python-experimental" src="svn://overlays.gentoo.org/proj/python/overlays/experimental" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/python/wiki
+    
+    </link>
+    <description>
+      
+      Python experimental tree.
+    
+    </description>
+  </overlay>
+  <overlay contact="OdinsHorse@googlemail.com" name="openmoko" src="svn://overlays.gentoo.org/proj/embedded/openmoko" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://overlays.gentoo.org/proj/embedded/wiki/openmoko
+    
+    </link>
+    <description>
+      
+      Openmoko's project overlay.
+    
+    </description>
+  </overlay>
+  <overlay contact="gpe@gentoo.org" name="gpe" src="git://git.overlays.gentoo.org/proj/gpe.git" status="official" type="git">
+    
+    
+    
+  
+    
+  
+    <description>
+      
+      experimental gpe ebuilds
+    
+    </description>
+  </overlay>
+  <overlay contact="tove@gentoo.org" name="tove" src="git://git.overlays.gentoo.org/dev/tove.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/tove.git
+    
+    </link>
+    <description>
+      
+      Torsten Veller developer overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="emacs@gentoo.org" name="emacs" src="svn://overlays.gentoo.org/proj/emacs/emacs-overlay" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/emacs/
+    
+    </link>
+    <description>
+      
+      Provide Emacs related ebuilds which are a bit
+    experimental or work-in-progress. Don't rely on them, but don't
+    hesitate to file bugs or write emails.
+    
+    </description>
+  </overlay>
+  <overlay contact="hawking@gentoo.org" name="hawking" src="git://git.overlays.gentoo.org/dev/hawking" status="official" type="git">
+    
+    
+    
+  
+    <link>
+      http://dev.gentoo.org/~hawking/
+    </link>
+    <description>
+      hawking's random ebuilds.
+    </description>
+  </overlay>
+  <overlay contact="voyageur@gentoo.org" name="voyageur" src="https://cafarelli.fr/svn/voyageur-overlay" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      
+    http://cafarelli.fr/websvn/listing.php?repname=voyageur-overlay
+    </link>
+    <description>
+      Voyageur's random ebuilds stuff
+    </description>
+  </overlay>
+  <overlay contact="php-bugs@gentoo.org" name="php-experimental" src="svn://overlays.gentoo.org/proj/php/experimental" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/php
+    </link>
+    <description>
+      Development overlay for PHP, experimental
+    branch.
+    </description>
+  </overlay>
+  <overlay contact="dev-zero@gentoo.org" name="dev-zero" src="git://git.overlays.gentoo.org/dev/dev-zero" status="official" type="git">
+    
+    
+    
+  
+    <link>
+      http://dev.gentoo.org/~dev-zero/
+    </link>
+    <description>
+      Dev-zeros personal developer overlay
+    </description>
+  </overlay>
+  <overlay contact="deathwing00@gentoo.org" name="deathwing00" src="svn://overlays.gentoo.org/dev/deathwing00" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org
+    </link>
+    <description>
+      Experimental ebuilds from the private overlay of
+    Ioannis Aslanidis [deathwing00@gentoo.org].
+    </description>
+  </overlay>
+  <overlay contact="vserver-devs@gentoo.org" name="vps" src="svn://overlays.gentoo.org/proj/vps" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/vps
+    </link>
+    <description>
+      Gentoo VPS project overlay (experimental
+    ebuilds)
+    </description>
+  </overlay>
+  <overlay contact="mozilla@gentoo.org" name="mozilla" src="svn://overlays.gentoo.org/proj/mozilla" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/mozilla
+    </link>
+    <description>
+      New mozilla development that is not yet in
+    tree
+    </description>
+  </overlay>
+  <overlay contact="http://forums.lila-center.info/" name="lila-theme" src="http://svn.berlios.de/svnroot/repos/lila-theme/trunk/lila/gentoo/overlay" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://www.lila-center.info
+    </link>
+    <description>
+      The Lila theme is a community project, originally
+    created by Daniel G. Taylor and members of the Gentoo Linux
+    community. The theme is based around SVG graphics - which means
+    they can be scaled to any size without loss of quality - and is
+    meant to be usable across different desktops and platforms. For
+    more information about the Lila theme project or to see how you
+    could get involved, there are a few places to look: The Lila
+    theme forums #lila on chat.freenode.org
+    </description>
+  </overlay>
+  <overlay contact="wolf31o2@wolf31o2.org" name="efika" src="svn://overlays.gentoo.org/proj/efika" status="official" type="svn">
+    
+    
+  
+    <description>
+      Temporary overlay for adding support for the EFIKA
+    platform to Gentoo.
+    </description>
+  </overlay>
+  <overlay contact="nico@core.ws" name="devnull" src="http://hg.core.ws/devnull" type="mercurial">
+    
+    
+    
+  
+    <link>
+      http://devnull.core.ws/EbuildRepository/
+    </link>
+    <description>
+      Various ebuilds, most of them are bleeding edge
+    scm versions, the others have not found their way into portage
+    yet.
+    </description>
+  </overlay>
+  <overlay contact="trapni@gentoo.org" name="trapni" src="svn://overlays.gentoo.org/dev/trapni/overlay" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/dev/trapni/
+    </link>
+    <description>
+      trapni's private developer overlay (mostly
+    covering YaCS/server related ebuilds for now)
+    </description>
+  </overlay>
+  <overlay contact="ruby@gentoo.org" name="ruby" src="svn://overlays.gentoo.org/proj/ruby" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/ruby/wiki
+    
+    </link>
+    <description>
+      
+      Experimental ebuilds from the Ruby
+    edge.
+    
+    </description>
+  </overlay>
+  <overlay contact="web-apps@gentoo.org" name="webapps-experimental" src="svn://overlays.gentoo.org/proj/webapps/experimental" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org
+    </link>
+    <description>
+      This is the home of Gentoo's wider collection of
+    ebuilds for web-based applications. This is where we collect
+    all the ebuilds submitted to Bugzilla by our users, and make
+    them available in an easy-to-use overlay for wider
+    testing.
+    </description>
+  </overlay>
+  <overlay contact="dischi@freevo.org" name="freevo" src="svn://svn.freevo.org/freevo/portage/" status="unofficial" type="svn">
+    
+    
+    
+  
+    <link>
+      http://www.freevo.org
+    </link>
+    <description>
+      The Freevo overlay provides ebuils for development
+    snapshots of the unreleased Freevo 2.0 and its
+    dependencies.
+    </description>
+  </overlay>
+  <overlay contact="sci@gentoo.org" name="science" src="git://git.overlays.gentoo.org/proj/sci.git" status="official" type="git">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/science/wiki/en
+    </link>
+    <description>
+      The Gentoo Science Overlay is intended as a place
+    to work outside of the main portage tree on experimental
+    ebuilds. Our aim is to increase the rate of development of
+    scientific packages for Gentoo, but ebuilds in this repository
+    are by their very nature more experimental. If you wish to use
+    them you should be willing to help test and report
+    bugs.
+    </description>
+  </overlay>
+  <overlay contact="rbu@gentoo.org" name="rbu" src="svn://overlays.gentoo.org/dev/rbu/overlay" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/dev/rbu/wiki
+    </link>
+    <description>
+      Random stuff.
+    </description>
+  </overlay>
+  <overlay contact="evermind@tuxfamily.org" name="pro-audio" src="svn://svn.tuxfamily.org/svnroot/proaudio/proaudio/trunk/overlays/proaudio" type="svn">
+    
+    
+    
+  
+    <link>
+      http://proaudio.tuxfamily.org/wiki
+    </link>
+    <description>
+      Evermind's overlay with ebuilds for a lot of
+    pro-audio production software.
+    </description>
+  </overlay>
+  <overlay contact="seemant@gentoo.org" name="seemant" src="svn://overlays.gentoo.org/dev/seemant" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/dev/seemant
+    </link>
+    <description>
+      Seemant's development overlay for django and other
+    things.
+    </description>
+  </overlay>
+  <overlay contact="remi@gentoo.org" name="remi" src="git://git.overlays.gentoo.org/dev/remi.git" status="official" type="git">
+    
+    
+    
+  
+    <link>
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/remi.git
+    </link>
+    <description>
+      Remi Cardona developer overlay
+    </description>
+  </overlay>
+  <overlay contact="gentoo-overlay@digital-trauma.de" name="trauma" src="http://svn.digital-trauma.de/gentoo/trunk/" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://svn.digital-trauma.de/gentoo/
+    
+    </link>
+    <description>
+      
+      This overlay has a binary, current version of
+    eclipse with many plugins and some small new ebuilds from
+    trauma and bugzilla.g.o.
+    
+    </description>
+  </overlay>
+  <overlay contact="pythonhead@gentoo.org" name="pythonhead" src="svn://overlays.gentoo.org/dev/pythonhead" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org
+    </link>
+    <description>
+      Mostly Python-related ebuilds.
+    </description>
+  </overlay>
+  <overlay contact="hwoarang@gentoo.org" name="hwoarang" src="git://git.overlays.gentoo.org/dev/hwoarang" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://dev.gentoo.org/~hwoarang/
+    
+    </link>
+    <description>
+      
+      hwoarangs' testing ebuilds
+    
+    </description>
+  </overlay>
+  <overlay contact="steev@gentoo.org" name="steev" src="git://github.com/steev/steev-overlay.git" status="official" type="git">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://github.com/steev/steev-overlay/tree/master
+    
+    </link>
+    <description>
+      
+      Steev Klimaszewski's Overlay
+    
+    </description>
+  </overlay>
+  <overlay contact="vdr@gentoo.org" name="vdr-xine" src="svn://overlays.gentoo.org/proj/vdr/vdr-xine-overlay" status="official" type="svn">
+    
+    
+    
+    
+  
+    
+    
+  
+    <link>
+      
+      http://overlays.gentoo.org/proj/vdr
+    
+    </link>
+    <description>
+      
+      Overlay for VDR, that contains ebuilds for
+    the vdr-xine output plugin, and the needed patched xine-lib
+    
+    
+    </description>
+  </overlay>
+  <overlay contact="f@ub0r.de" name="ub0rlay" src="git://repo.or.cz/ub0rlay.git" status="unofficial" type="git">
+    
+    
+    
+    <link>
+      
+      http://repo.or.cz/w/ub0rlay.git
+    
+    </link>
+    <description>
+      This is an ub0r overlay!
+    </description>
+  </overlay>
+  <overlay contact="qupada@initng.org" name="initng" src="https://svn.initng.org/portage/gentoo" type="svn">
+    
+    
+    
+  
+    <link>
+      http://www.initng.org
+    </link>
+    <description>
+      Initng is a full replacement of the old and in
+    many ways deprecated sysvinit tool. It is designed with speed
+    in mind because it does as much as possible asynchronously. In
+    other words: It will boot your unix-system much faster, and
+    give you more control and statistics over your
+    system.
+    </description>
+  </overlay>
+  <overlay contact="majeru@gentoo.ro" name="oss-overlay" src="http://hg.atheme.org/users/majeru/portage-overlay/" status="unofficial" type="mercurial">
+    
+    
+    
+  
+    <link>
+      http://gentoo-wiki.com/Howto_OSS4
+    </link>
+    <description>
+      OSSv4 overlay
+    </description>
+  </overlay>
+  <overlay contact="anant@gentoo.org" name="plan9" src="svn://overlays.gentoo.org/dev/anant/plan9" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/dev/anant/wiki
+    </link>
+    <description>
+      A collection of useful ebuilds related to
+    Plan9.
+    </description>
+  </overlay>
+  <overlay contact="mahatma@eu.by" name="raw" src="http://raw.googlecode.com/svn/trunk" status="unofficial" type="svn">
+    
+    
+    
+  
+    <link>
+      http://code.google.com/p/raw/
+    </link>
+    <description>
+      some raw stuff
+    </description>
+  </overlay>
+  <overlay contact="php-bugs@gentoo.org" name="php-testing" src="svn://overlays.gentoo.org/proj/php/testing" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/php
+    </link>
+    <description>
+      Development overlay for PHP, testing
+    branch.
+    </description>
+  </overlay>
+  <overlay contact="m68k@gentoo.org" name="m68k" src="git://git.overlays.gentoo.org/proj/m68k.git" status="official" type="git">
+    
+    
+    
+  
+    <link>
+      
+    http://git.overlays.gentoo.org/gitweb/?p=proj/m68k.git
+    </link>
+    <description>
+      m68k team overlay
+    </description>
+  </overlay>
+  <overlay contact="levertond@googlemail.com" name="interactive-fiction" src="git://repo.or.cz/gentoo-interactive-fiction.git" status="unofficial" type="git">
+    
+    
+  
+    <description>
+      Packages for players and authors of interactive
+    fiction
+    </description>
+  </overlay>
+  <overlay contact="chtekk@gentoo.org" name="chtekk-apps" src="svn://overlays.gentoo.org/dev/chtekk/apps" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/dev/chtekk
+    </link>
+    <description>
+      Overlay for various applications I use myself and
+    plan on adding to the tree or update/fix.
+    </description>
+  </overlay>
+  <overlay contact="pgsql-bugs@gentoo.org" name="postgresql-experimental" src="svn://overlays.gentoo.org/proj/postgresql/experimental" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/postgresql
+    </link>
+    <description>
+      Development overlay for PostgreSQL, experimental
+    branch.
+    </description>
+  </overlay>
+  <overlay contact="bangert@gentoo.org" name="bangert" src="svn://overlays.gentoo.org/dev/bangert/ebuilds" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org
+    </link>
+    <description>
+      Some ebuilds not yet ready for mainstream portage
+    from Thilo Bangert [bangert@gentoo.org].
+    </description>
+  </overlay>
+  <overlay contact="suka@gentoo.org" name="suka" src="svn://overlays.gentoo.org/dev/suka" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/dev/suka
+    </link>
+    <description>
+      experimental stuff of all sorts
+    </description>
+  </overlay>
+  <overlay contact="vdr@gentoo.org" name="vdr-testing" src="svn://overlays.gentoo.org/proj/vdr/testing" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/vdr
+    </link>
+    <description>
+      Development overlay for VDR, testing
+    branch.
+    </description>
+  </overlay>
+  <overlay contact="nx@gentoo.org" name="nx" src="svn://overlays.gentoo.org/proj/nx/testing" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/nx
+    </link>
+    <description>
+      Overlay for the NX/FreeNX packages for
+    Gentoo.
+    </description>
+  </overlay>
+  <overlay contact="serkan@gentoo.org" name="serkan-overlay" src="http://bazaar.launchpad.net/~serkan-kaba/serkan-overlay/mainline" status="official" type="bzr">
+    
+    
+    
+  
+    <link>
+      http://dev.gentoo.org/~serkan
+    </link>
+    <description>
+      Serkan Kaba's (serkan) private developer
+    overlay
+    </description>
+  </overlay>
+  <overlay contact="yngwin@gentoo.org" name="qting-edge" src="git://github.com/gentoo-qt/qting-edge.git" status="official" type="git">
+    
+    
+    
+  
+    <link>
+      http://github.com/gentoo-qt/qting-edge/
+    </link>
+    <description>
+      Experimental Qt4 ebuilds and related packages,
+    provided by Gentoo's Qt team. The overlay contains ebuilds for
+    official pre-releases, and live ebuilds for both the official
+    Nokia Qt Software git repository and KDE's qt-copy subversion
+    repository. It also has various (non-KDE) packages that use
+    Qt4.
+    </description>
+  </overlay>
+  <overlay contact="sunrise@gentoo.org" name="sunrise" src="svn://overlays.gentoo.org/proj/sunrise/reviewed/" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/sunrise
+    </link>
+    <description>
+      Ebuilds for bugs assigned to
+    maintainer-wanted
+    </description>
+  </overlay>
+  <overlay contact="perl@gentoo.org" name="perl-experimental" src="git://git.overlays.gentoo.org/proj/perl-overlay.git" status="official" type="git">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/perl/
+    </link>
+    <description>
+      Experimental ebuilds for Perl packages in Gentoo.
+    Comments and bugreports are welcome!
+    </description>
+  </overlay>
+  <overlay contact="xemacs@gentoo.org" name="xemacs" src="svn://overlays.gentoo.org/proj/emacs/xemacs-overlay" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/emacs/
+    </link>
+    <description>
+      Provide XEmacs related ebuilds which are a bit
+    experimental or work-in-progress. Don't rely on them, but don't
+    hesitate to file bugs or write emails.
+    </description>
+  </overlay>
+  <overlay contact="philantrop@gentoo.org" name="philantrop" src="git://www2.mailstation.de/git/philantrop.git" status="official" type="git">
+    
+    
+    
+  
+    <link>
+      http://genkdesvn.mailstation.de
+    </link>
+    <description>
+      A collection of work-in-progress ebuilds and other
+    fun broken things.
+    </description>
+  </overlay>
+  <overlay contact="mescalinum@gentoo.org" name="tcl-multislot" src="svn://overlays.gentoo.org/dev/mescalinum/tcl-multislot" status="unofficial" type="svn">
+    
+    
+  
+  
+  
+    
+    
+  
+    <link>
+      
+      https://overlays.gentoo.org/dev/mescalinum
+    
+    </link>
+    <description>
+      
+      Tcl/Tk multi-slot system, with tcltk eselect module
+      for switching across multiple versions (actually: 8.4 8.5 8.6)
+  
+    
+    </description>
+  </overlay>
+  <overlay contact="leio@gentoo.org" name="leio" src="git://git.overlays.gentoo.org/dev/leio.git" status="official" type="git">
+    
+    
+    
+  
+    <link>
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/leio.git
+    </link>
+    <description>
+      Mart Raudsepp developer overlay
+    </description>
+  </overlay>
+  <overlay contact="mueli@gentoo.org" name="kerberos" src="git://git.overlays.gentoo.org/proj/kerberos.git" type="git">
+    
+    
+    
+  
+    <link>
+      http://dev.gentoo.org/~mueli
+    </link>
+    <description>
+      Overlay which provides the bleeding edge on the
+    kerberos integration in gentoo.
+    </description>
+  </overlay>
+  <overlay contact="lu_zero@gentoo.org" name="lu_zero" src="svn://overlays.gentoo.org/dev/lu_zero" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/dev/lu_zero
+    </link>
+    <description>
+      Experimental Media and PowerPC/CELL related
+    ebuilds.
+    </description>
+  </overlay>
+  <overlay contact="dang@gentoo.org;cardoe@gentoo.org" name="kvm" src="git://github.com/dang/kvm.git" type="git">
+    
+    
+  
+    <description>
+      Kernel Virtual Machine userspace
+    support
+    </description>
+  </overlay>
+  <overlay contact="mysql-bugs@gentoo.org" name="mysql-testing" src="svn://overlays.gentoo.org/proj/mysql/testing" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/mysql
+    </link>
+    <description>
+      Development overlay for MySQL, testing
+    branch.
+    </description>
+  </overlay>
+  <overlay contact="scarabeus@gentoo.org" name="scarabeus" src="git://git.overlays.gentoo.org/dev/scarabeus.git" status="official" type="git">
+    
+    
+    
+  
+    <link>
+      
+    http://git.overlays.gentoo.org/gitweb/?p=dev/scarabeus.git
+    </link>
+    <description>
+      Tomas Chvatal developer overlay
+    </description>
+  </overlay>
+  <overlay contact="liquidx@gentoo.org" name="liquidx" src="svn://overlays.gentoo.org/dev/liquidx" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org
+    </link>
+    <description>
+      Development overlay for ebuilds that I plan to
+    commit to the tree that are sourced from bugzilla or
+    liquidx.
+    </description>
+  </overlay>
+  <overlay contact="gcc-porting@gentoo.org" name="gcc-porting" src="svn://overlays.gentoo.org/proj/gcc-porting" status="official" type="svn">
+    
+    
+    
+  
+    <link>
+      http://overlays.gentoo.org/proj/gcc-porting/
+    </link>
+    <description>
+      Compatibility patches for upcoming GCC
+    releases.
+    </description>
+  </overlay>
+  <overlay contact="luke_armagetron@dashjr.org" name="luke-jr" src="svn://svn.dashjr.org/luke-portage-overlay/trunk" type="svn">
+    
+    
+    
+  
+    <link>
+      http://luke.dashjr.org
+    </link>
+    <description>
+      Misc ebuilds by Luke-Jr
+    </description>
+  </overlay>
+</overlays>
diff --git a/commands/parse.py b/commands/parse.py
new file mode 100644 (file)
index 0000000..8fff38a
--- /dev/null
@@ -0,0 +1,150 @@
+from __future__ import with_statement
+
+import os, re
+
+from django.conf import settings
+
+os.environ['DJANGO_SETTINGS_MODULE'] = 'ebuildfnd.settings'
+
+from layman.debug import Message
+from manage_layman import LaymanManager
+
+from ebuildfnd.ebuildfind.models import Ebuild, Overlay
+
+from whoosh_manager import WhooshEbuildManager
+
+OVERLAYS_BASE = "/home/timemachine/www/ebuildfnd/ebuildfind/commands/var/"
+OUT = Message("parser")
+
+class EbuildParser:
+    def __init__(self, overlay, category, app, file_path):
+        path, filename = os.path.split(os.path.realpath(file_path))
+
+        #OUT.warn("%s\n%s\n%s\n%s" % (overlay, category, app, file_path))
+        #OUT.warn("****************************************************")
+        
+        name_version, ext = os.path.splitext(filename)
+        n = len(app)
+        
+        version = name_version[n+1:]
+        
+        self.name = app
+        self.version = version
+        self.category = category
+        self.overlay = overlay
+        
+        with open(file_path) as file:
+            f = file.read()
+            regex1 = re.compile(r'([a-z_]+\s*\(\))\s*{.*}', re.DOTALL)
+            f = re.sub(regex1, r'', f)
+            regex2 = re.compile(r'(for.*done)', re.DOTALL)
+            f = re.sub(regex2, r'', f)
+            data = dict(re.findall("(DESCRIPTION|HOMEPAGE|KEYWORDS|LICENSE|IUSE)=\"(.+)\"", f))
+
+        def notnull(d, key):
+            try:
+                return d[key]
+            except:
+                return ""
+
+        self.description = notnull(data, "DESCRIPTION")
+        self.description = self.description.replace("\n"," ")
+        self.homepage = notnull(data, "HOMEPAGE")
+        self.keywords = notnull(data, "KEYWORDS")
+        self.license = notnull(data, "LICENSE")
+        self.iuse = notnull(data, "IUSE")
+
+    def __repr__(self):
+        output = "%s/%s [%s] @ %s" % (self.category, self.name, self.version, self.overlay)
+        output += " " + self.description
+        output += " " + self.homepage
+        output += " " + self.keywords
+        output += " " + self.license
+        output += " " + self.iuse
+        return output
+
+def exclude_directory(path, dir):
+    exclude_dir = ["eclass", "profiles", "README-TODO", "Documentation", "sets", "index"]
+    return os.path.isdir(path) and dir not in exclude_dir and not dir.startswith(".")
+
+def ParseEbuilds():
+    i = 0    
+    Ebuild.objects.all().delete()
+    overlays = os.listdir(OVERLAYS_BASE)
+
+    whoosh = WhooshEbuildManager(True)
+    
+    for overlay in overlays:
+        path_overlay = os.path.join(OVERLAYS_BASE, overlay)
+
+        if exclude_directory(path_overlay, overlay):
+            print overlay
+            overlay_name = overlay
+            overlay = Overlay.objects.get(name=overlay)
+            
+            categories = os.listdir(path_overlay)
+                                      
+            for category in categories:
+                path_overlay_category = os.path.join(path_overlay, category)
+
+                if exclude_directory(path_overlay_category, category):
+                    apps = os.listdir(path_overlay_category)
+                    for app in apps:
+                        path_overlay_category_app = os.path.join(path_overlay_category, app)
+                        if exclude_directory(path_overlay_category_app, app):
+                            ebuilds = os.listdir(path_overlay_category_app)
+                        
+                            for ebuild in ebuilds:
+                                if ebuild.endswith(".ebuild"):
+                                    if exclude_directory(path_overlay_category_app, ebuild):
+                                        #OUT.warn(ebuild)
+                                        
+                                        path_ebuild = os.path.join(path_overlay_category_app, ebuild)                                 
+                                    
+                                        e = EbuildParser(overlay_name, category, app, path_ebuild)
+
+                                    
+                                        ebuild = Ebuild()
+                                        ebuild.name = unicode(e.name)
+                                        ebuild.category = unicode(e.category)
+                                        ebuild.version = unicode(e.version)
+                                        ebuild.description = unicode(e.description, errors="replace")
+                                        ebuild.keywords = unicode(e.keywords)
+                                        ebuild.license = unicode(e.license)
+                                        ebuild.iuse = unicode(e.iuse)
+                                        ebuild.homepage = unicode(e.homepage)
+                                        ebuild.overlay = overlay
+                                        #ebuild.save()
+
+                                        
+                                        whoosh.Update(ebuild)
+                                        
+                                        i +=1
+    print i
+    
+def SyncOverlays():
+    h = LaymanManager()
+    h.AddAll()
+
+def ParseOverlays():
+    h = LaymanManager()
+    overlays = h.List()
+
+    for name, overlay in overlays.items() :
+        """ check if new overlay is ready """
+        o = Overlay.objects.all().filter(name=name)
+       
+        if not o:
+            o = Overlay()
+            o.name = name
+            o.description = overlay["description"]
+            o.link = overlay["link"]
+            o.save()
+                    
+def main():
+    #SyncOverlays()
+    ParseOverlays()
+    ParseEbuilds()
+    
+if __name__ == "__main__":
+    main()
diff --git a/commands/whoosh_manager.py b/commands/whoosh_manager.py
new file mode 100644 (file)
index 0000000..e4acb95
--- /dev/null
@@ -0,0 +1,56 @@
+import os
+
+from whoosh import store
+from whoosh.fields import Schema, TEXT, ID
+from whoosh.index import Index
+from whoosh.qparser import QueryParser
+
+from shutil import rmtree
+
+from django.conf import settings
+
+os.environ['DJANGO_SETTINGS_MODULE'] = 'ebuilds.settings'
+
+INDEX_BASE = settings.ROOT_PATH + "/ebuildfind/commands/var/index"
+
+class WhooshEbuildManager:
+    def __init__(self, reset=False):
+        if reset :
+            if os.path.exists(INDEX_BASE):
+                rmtree(INDEX_BASE)
+            os.mkdir(INDEX_BASE)
+            storage = store.FileStorage(INDEX_BASE)
+        else:
+            storage = store.FileStorage(INDEX_BASE)
+            storage = store.copy_to_ram(storage)
+        
+        schema = Schema(permalink=ID(stored=True),
+                        content=TEXT(phrase=False))
+        
+        self.index = Index(storage, schema=schema, create=reset)
+        self.searcher = self.index.searcher()
+        self.parser = QueryParser("content", schema = self.index.schema)
+        
+    def Update(self, ebuild):
+        writer = self.index.writer()
+        
+        def clean(text):
+            return text.lower.replace("-", " ")
+        
+        content_raw = [ebuild.overlay.name, ebuild.category, ebuild.name, ebuild.description]
+        content = []
+        
+        for e in content_raw:
+            e = e.lower().replace("-", " ")
+            content.append(e)
+
+        content.append(ebuild.version)
+        
+        content = ' '.join(content)
+
+        writer.add_document(permalink=ebuild.permalink(),
+                            content=content)
+        writer.commit()
+
+    def Search(self, query):
+        return self.searcher.search(self.parser.parse(query), sortedby = "permalink")
diff --git a/models.py b/models.py
new file mode 100644 (file)
index 0000000..7e062d6
--- /dev/null
+++ b/models.py
@@ -0,0 +1,29 @@
+from django.db import models
+
+class Overlay(models.Model):
+    name = models.CharField(max_length=255)
+    description = models.TextField()
+    link = models.URLField()
+
+    def __repr__(self):
+        return self.name
+
+    def get_absolute_url(self):
+       return "/search/?q=%s" % self.name
+
+class Ebuild(models.Model):
+    name = models.CharField(max_length=255)
+    category = models.CharField(max_length=255)
+    version = models.CharField(max_length=255)
+    description = models.TextField()
+    keywords = models.CharField(max_length=255)
+    license = models.CharField(max_length=255)
+    iuse = models.CharField(max_length=255)
+    homepage = models.URLField()
+    overlay = models.ForeignKey(Overlay)
+
+    def permalink(self):
+        return "/%s/%s/%s/%s" % (self.overlay.name, self.category, self.name, self.version)
+
+    def get_absolute_url(self):
+       return "/search/?q=%s" % self.name
\ No newline at end of file
diff --git a/planet.py b/planet.py
new file mode 100644 (file)
index 0000000..6c9abd5
--- /dev/null
+++ b/planet.py
@@ -0,0 +1,99 @@
+import shelve
+
+from feedcache.cache import Cache
+
+import pdb
+
+from django.template.defaultfilters import truncatewords_html
+from django.utils.encoding import smart_unicode
+
+def TryEncoding(content):
+    for body_charset in 'UTF-8', 'US-ASCII', 'ISO-8859-1', :
+        try:
+            return content.encode(body_charset)
+        except UnicodeError:
+            pass
+        except Exception, e:
+            if not type(content) is str:
+                pass
+
+
+def GetContent(feed):
+    if hasattr(feed, "content"):
+        return feed.content[0]["value"]
+    else:
+        return feed.summary
+    
+
+class Parser:
+    """
+    "http://planet.gentoo.org/atom.xml"
+    "http://overlays.gentoo.org/rss20.xml"
+    "http://www.gentoo.org/rdf/en/gentoo-news.rdf"
+    >>> f = Parser()
+    >>> f.GetTitle()
+    u'Planet Gentoo'
+    >>> f.GetLink()
+    u'http://planet.gentoo.org/'
+    >>> for e in f: print e["title"], e["content"]
+    """
+    
+    def __init__(self, url, summary=False):
+       storage = shelve.open(".feedcache")
+       try :
+           fc = Cache(storage)
+           self.feed = fc.fetch(url)
+            self.iterator = 0
+            self.summary = summary
+        finally:
+           storage.close()
+    def GetTitle(self):
+        return self.feed.feed.title
+
+    def GetLink(self):
+        return self.feed.feed.link
+
+    def next(self):
+        if self.iterator >= len(self.feed.entries): raise StopIteration
+
+        entry = self.feed.entries[self.iterator]
+        
+        title = TryEncoding(entry["title"])
+        content = TryEncoding(GetContent(entry))
+        link = entry.link
+
+        if self.summary:
+            content = TryEncoding(truncatewords_html(content, 30))
+            content = "".join((content , "..."))
+
+        entry = dict((("title", title), ("content", content), ("link", link)))
+        
+        self.iterator += 1
+        return entry
+
+    def __iter__(self):
+        return self
+
+def _test():
+    """
+    import doctest, ebuilds.ebuildfind.planet as planet
+    return doctest.testmod(planet)
+
+    "http://news.google.fr/news?pz=1&ned=us&hl=en&q=gentoo+AND+(linux+OR+OS+OR+Operating+System+OR+GNU)&output=rss"
+    "http://www.gentoo.org/rdf/en/gentoo-news.rdf"
+    "http://planet.gentoo.org/atom.xml"
+    "http://overlays.gentoo.org/rss20.xml"
+    """
+    
+    f = Parser("http://planet.gentoo.org/atom.xml", True)
+    
+    print f.GetTitle()
+    print f.GetLink()
+    
+    for e in f:
+        print e["title"]
+        print e["content"]
+        print e["link"]
+
+if __name__ == "__main__":
+    _test()
diff --git a/templates/ebuildfind/bakup.html b/templates/ebuildfind/bakup.html
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/templates/ebuildfind/base.html b/templates/ebuildfind/base.html
new file mode 100644 (file)
index 0000000..a332a1d
--- /dev/null
@@ -0,0 +1,131 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <title>ebuildfind - search engine for gentoo overlays</title>
+    <link rel="stylesheet" type="text/css" href="/static/css/reset.css" media="screen" />
+    <link rel="stylesheet" type="text/css" href="/static/css/text.css" media="screen" />
+    <link rel="stylesheet" type="text/css" href="/static/css/grid.css" media="screen" />
+    <link rel="stylesheet" type="text/css" href="/static/css/layout.css" media="screen" />
+    <link rel="stylesheet" type="text/css" href="/static/css/nav.css" media="screen" />
+    <!--[if IE 6]><link rel="stylesheet" type="text/css" href="css/ie6.css" media="screen" /><![endif]-->
+    <!--[if IE 7]><link rel="stylesheet" type="text/css" href="css/ie.css" media="screen" /><![endif]-->
+    <meta name="verify-v1" content="Eoz2Hmql/IvlB4zKL5iMhKkJw5oPotgC7Qik72ZkLmI=" >
+  </head>
+  <body>
+    <div class="container_16">
+      <div class="clear"></div>
+      
+      <!-- search box BEGIN -->
+      <div class="grid_16" id="search-box">
+       <h1>ebuildfind</h1
+       <a href="http://www.ebuildfind.net"><img src="/static/img/glogo-small.png"/></a>
+       <div>
+         <form action="/search/" method="GET">
+           <input type="text" name="q" value="{% block search-value%}{% endblock %}"/> 
+           <input type="submit" value="search"/>
+         </form>
+         {% block help %}
+         <p>This is a search engine for ebuilds, it looks for the query in the overlay name,
+         category, description, application name and the exact version name. Give it a try <a href="http://www.ebuildfind.net/search/?q=gnome+extra">now</a> and <a href="http://www.ebuildfind.net/search/?q=ssh">here</a></p>
+         <p><b>28 June 09':</b> Some ebuilds and overlays are missing please 
+         notify me bugs at <a href="http://code.google.com/p/ebuildfind/issues/list">google 
+         code project page</a></p>
+         {% endblock %}
+       </div>
+      </div>
+      <div class="clear"></div>
+      <!-- search box END -->
+      
+      <!-- result box BEGIN -->
+      <div class="grid_16" id="results">
+       {% block results %}{% endblock %}
+      </div>
+      <div class="clear"></div>
+      <!-- result box END -->
+      
+      <div class="grid_4">
+       {% block info %}
+       <div>
+         <h2><a href="{{GOverlays.GetLink}}">Overlays Planet</a></h2>
+         <div>
+
+           {% for post in GOverlays %}
+           <div class="post">
+             <h6><a href="{{post.link}}">{{ post.title }}</a></h6>
+             <div>{{ post.content|safe }}</div>
+           </div>
+           {% endfor %}
+
+         </div>
+       </div>
+      </div>
+      <div class="grid_4">
+       <div>
+         <h2><a href="{GPlanet.GetLink}}">Gentoo Planet</a></h2>
+         <div>
+
+           {% for post in GPlanet %}
+           <div class="post">
+             <h6><a href="{{post.link}}">{{ post.title }}</a></h6>
+             <div>{{ post.content|truncatewords_html:100|safe }}</div>
+           </div>
+           {% endfor %}
+           
+         </div>
+       </div>
+      </div>
+      <div class="grid_4">
+
+       <div>
+         <h2><a href="{GPlanet.GetLink}}">Gentoo News</a></h2>
+         <div>
+
+           {% for post in GNews %}
+           <div class="post">
+             <h6><a href="{{post.link}}">{{ post.title }}</a></h6>
+             <div>{{ post.content|safe }}</div>
+           </div>
+           {% endfor %}
+           
+         </div>
+       </div>
+       
+      </div>
+      <div class="grid_4">
+       <div>
+         <h2><a href="{GGoogle.GetLink}}">Google News</a></h2>
+         <div>
+
+           {% for post in GGoogle %}
+           <div class="post">
+             <h6><a href="{{post.link}}">{{ post.title }}</a></h6>
+             <div>{{ post.content|safe }}</div>
+           </div>
+           {% endfor %}
+           
+         </div>
+       </div>
+       {% endblock %}
+      </div>
+      <div class="clear"></div>
+      <div class="grid_16" id="bottom" >
+       <p>"Gentoo" and "G" logo are the property of Gentoo
+       Foundation, Inc.</p>
+       <p>This website is made
+         with <a href="http://www.djangoproject.com">
+           django</a> and <a href="http://www.whoosh.ca">whoosh</a>
+         hosted by <a href="http://www.alwaysdata.com">alwaysdata.com</a></p>
+      </div>
+      <div class="clear"></div>
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try {
+var pageTracker = _gat._getTracker("UA-7963643-4");
+pageTracker._trackPageview();
+} catch(err) {}</script>
+    </body>
+</html>
diff --git a/templates/ebuildfind/index.html b/templates/ebuildfind/index.html
new file mode 100755 (executable)
index 0000000..7e2c510
--- /dev/null
@@ -0,0 +1,2 @@
+{% extends "ebuildfind/base.html" %} 
+
diff --git a/templates/ebuildfind/search.html b/templates/ebuildfind/search.html
new file mode 100644 (file)
index 0000000..ced17d8
--- /dev/null
@@ -0,0 +1,21 @@
+{% extends "ebuildfind/base.html" %} 
+
+{% block search-value%}{{query}}{% endblock %}
+
+{% block help %}{% endblock %}
+
+{% block results %}
+
+{% if error %}
+<p class="error">{{search_results.error}}</p>
+{% endif %}
+
+<ul>
+  {% for result in results %}
+  <li>{{result}}</li>
+  {% endfor %}
+</ul>
+
+{% endblock %}
+
+{% block info %}{% endblock %}
diff --git a/urls.py b/urls.py
new file mode 100644 (file)
index 0000000..41d3376
--- /dev/null
+++ b/urls.py
@@ -0,0 +1,15 @@
+from django.conf.urls.defaults import *
+import views
+
+urlpatterns = patterns('',
+    # Example:
+    
+
+    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
+    # to INSTALLED_APPS to enable admin documentation:
+    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
+
+    # Uncomment the next line to enable the admin:
+    (r'^search/', views.search),
+    (r'^$', views.index),
+)
diff --git a/views.py b/views.py
new file mode 100644 (file)
index 0000000..cc17e83
--- /dev/null
+++ b/views.py
@@ -0,0 +1,48 @@
+
+
+
+
+
+from commands.whoosh_manager import WhooshEbuildManager
+from django.shortcuts import render_to_response
+from planet import Parser
+
+whoosh = WhooshEbuildManager()
+
+
+def index(request):
+    GPlanet = Parser("http://planet.gentoo.org/atom.xml")
+    GOverlays = Parser("http://overlays.gentoo.org/rss20.xml")
+    GNews = Parser("http://www.gentoo.org/rdf/en/gentoo-news.rdf")
+    GGoogle = Parser("http://news.google.fr/news?pz=1&ned=us&hl=en&q=gentoo+AND+(linux+OR+OS+OR+Operating+System+OR+GNU)&output=rss")  
+
+    response = dict()
+    response['GGoogle'] = GGoogle
+    response['GNews'] = GNews
+    response['GOverlays'] = GOverlays
+    response['GPlanet'] = GPlanet
+    
+    return render_to_response("ebuildfind/index.html", response)
+
+
+def search(request):    
+    response = {"error":"Query should be at least 3 caracters long"}
+    query = ""
+    
+    if request.method == 'GET':
+        try: 
+            query = request.GET["q"]
+        except:
+            pass
+        
+    if(len(query)>2):
+        response["error"] = False
+        response["query"] = query
+        
+        results = whoosh.Search(query)
+        response["results"] = list()
+        
+        for result in results:
+            response["results"].append(result["permalink"])
+            
+    return render_to_response("ebuildfind/search.html", response)