diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2010-01-15 01:38:13 +0100 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2010-01-15 01:44:19 +0100 |
commit | e7773dee5669e65afbecc9f3f0a14497e7d6d5a5 (patch) | |
tree | ce44c223ee164b0334ebacbae64887a3a5c506f3 | |
parent | f3c4dc76ff8c950f39dfff80bd47144e1ba2420f (diff) | |
download | layman-e7773dee5669e65afbecc9f3f0a14497e7d6d5a5.tar.gz layman-e7773dee5669e65afbecc9f3f0a14497e7d6d5a5.tar.bz2 layman-e7773dee5669e65afbecc9f3f0a14497e7d6d5a5.zip |
Include quality indicator in overlay info display
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | layman/action.py | 3 | ||||
-rw-r--r-- | layman/overlay.py | 2 | ||||
-rw-r--r-- | layman/overlays/overlay.py | 12 |
4 files changed, 20 insertions, 1 deletions
@@ -8,7 +8,9 @@ Version TODO On addition all sources will be probed until a working one is found. This should help Layman through many firewalls. - - Include feed URIs in overlay info display, i.e. layman -i + - Include more information in overlay info display (i.e. layman -i): + - quality indicator (not guarantee) + - feed URIs - Improve usage display diff --git a/layman/action.py b/layman/action.py index 323d706..2701030 100644 --- a/layman/action.py +++ b/layman/action.py @@ -277,6 +277,7 @@ class Info: * Source : https://overlays.gentoo.org/svn/dev/wrobel * Contact : nobody@gentoo.org * Type : Subversion; Priority: 10 + * Quality : experimental * * Description: * Test @@ -357,6 +358,7 @@ class List: * Source : https://overlays.gentoo.org/svn/dev/wrobel * Contact : nobody@gentoo.org * Type : Subversion; Priority: 10 + * Quality : experimental * * Description: * Test @@ -368,6 +370,7 @@ class List: * Source : rsync://gunnarwrobel.de/wrobel-stable * Contact : nobody@gentoo.org * Type : Rsync; Priority: 50 + * Quality : experimental * * Description: * A collection of ebuilds from Gunnar Wrobel [wrobel@gentoo.org]. diff --git a/layman/overlay.py b/layman/overlay.py index f44c250..0ea11f0 100644 --- a/layman/overlay.py +++ b/layman/overlay.py @@ -166,6 +166,7 @@ class Overlays: Source : https://overlays.gentoo.org/svn/dev/wrobel Contact : nobody@gentoo.org Type : Subversion; Priority: 10 + Quality : experimental <BLANKLINE> Description: Test @@ -175,6 +176,7 @@ class Overlays: Source : rsync://gunnarwrobel.de/wrobel-stable Contact : nobody@gentoo.org Type : Rsync; Priority: 50 + Quality : experimental <BLANKLINE> Description: A collection of ebuilds from Gunnar Wrobel [wrobel@gentoo.org]. diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py index 60ffadd..179123c 100644 --- a/layman/overlays/overlay.py +++ b/layman/overlays/overlay.py @@ -63,6 +63,9 @@ OVERLAY_TYPES = dict((e.type_key, e) for e in ( DarcsOverlay )) +QUALITY_LEVELS = 'core|stable|testing|experimental|graveyard'.split('|') + + #=============================================================================== # # Class Overlay @@ -174,6 +177,11 @@ class Overlay(object): else: self.status = None + self.quality = u'experimental' + if 'quality' in xml.attrib: + if xml.attrib['quality'] in set(QUALITY_LEVELS): + self.quality = ensure_unicode(xml.attrib['quality']) + if 'priority' in xml.attrib: self.priority = int(xml.attrib['priority']) else: @@ -214,6 +222,7 @@ class Overlay(object): repo = ET.Element('repo') if self.status != None: repo.attrib['status'] = self.status + repo.attrib['quality'] = self.quality repo.attrib['priority'] = str(self.priority) name = ET.Element('name') name.text = self.name @@ -294,6 +303,7 @@ class Overlay(object): Source : https://overlays.gentoo.org/svn/dev/wrobel Contact : nobody@gentoo.org Type : Subversion; Priority: 10 + Quality : experimental <BLANKLINE> Description: Test @@ -321,6 +331,8 @@ class Overlay(object): else: result += u'\nType : ' + '/'.join(sorted(set(e.type for e in self.sources))) result += u'; Priority: ' + str(self.priority) + u'\n' + result += u'Quality : ' + self.quality + u'\n' + description = self.description description = re.compile(u' +').sub(u' ', description) |