aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevan Franchini <twitch153@gentoo.org>2015-08-27 23:37:32 -0400
committerDevan Franchini <twitch153@gentoo.org>2015-08-27 23:40:15 -0400
commit794f56f5ae531a5b24200ad3c0d6cf7112305da8 (patch)
tree35699d1071277270fcba335d05f4766e596f4daa /layman/api.py
parentoverlay.py: Modifies __eq__ attribute requirements (diff)
downloadlayman-794f56f5ae531a5b24200ad3c0d6cf7112305da8.tar.gz
layman-794f56f5ae531a5b24200ad3c0d6cf7112305da8.tar.bz2
layman-794f56f5ae531a5b24200ad3c0d6cf7112305da8.zip
Deprecates get_all_info() function
The api function get_all_info() is being deprecated as it was much slower than the get_info_str() function and was no longer used in layman's code. The only instance found making use of it was older test code which has been changed to also use the get_info_str() function. external.py: Deprecates the get_all_info() function and adds multiple owner testing compatibility. api.py: Removes the get_all_info() function. cli.py: Removes commented out use of get_all_info() function. global-overlays.json: Changes structure of 'owner' attribute to reflect changes for multiple owner support.
Diffstat (limited to 'layman/api.py')
-rwxr-xr-xlayman/api.py69
1 files changed, 0 insertions, 69 deletions
diff --git a/layman/api.py b/layman/api.py
index 0718dce..20fe402 100755
--- a/layman/api.py
+++ b/layman/api.py
@@ -237,75 +237,6 @@ class LaymanAPI(object):
return True
- def get_all_info(self, repos, local=False):
- """retrieves the recorded information about the repo(s)
- specified by repo-id
-
- @type repos: list of strings or string
- @param repos: ['repo-id1', ...] or 'repo-id'
- @rtype list of tuples [(str, bool, bool),...]
- @return: dictionary of dictionaries
- {'ovl1':
- {'name': str,
- 'owner_name': str,
- 'owner_email': str,
- ' homepage': str,
- 'description': str,
- 'src_uris': list of str ['uri1',...]
- 'src_type': str,
- 'priority': int,
- 'quality': str
- 'status':,
- 'official': bool,
- 'supported': bool,
- },
- 'ovl2': {...}
- }
- """
-
- repos = self._check_repo_type(repos, "get_info")
- result = {}
-
- if local:
- db = self._get_installed_db()
- else:
- db = self._get_remote_db()
-
- for ovl in repos:
- if not self.is_repo(ovl):
- self.output.error(UnknownOverlayMessage(ovl))
- result[ovl] = ('', False, False)
- continue
- try:
- overlay = db.select(ovl)
- except UnknownOverlayException as error:
- self._error(error)
- result[ovl] = ('', False, False)
- else:
- result[ovl] = {
- 'name': overlay.name,
- 'owner_name': overlay.owner_name,
- 'owner_email': overlay.owner_email,
- 'homepage': overlay.homepage,
- 'irc': overlay.irc,
- 'description': [e for e in overlay.descriptions],
- 'feeds': overlay.feeds,
- 'sources': [(e.src, e.type, e.branch) \
- for e in overlay.sources],
- #'src_uris': [e.src for e in overlay.sources],
- 'src_uris': overlay.source_uris(),
- 'src_types': overlay.source_types(),
- #'src_types': [e.type for e in overlay.sources],
- 'priority': overlay.priority,
- 'quality': overlay.quality,
- 'status': overlay.status,
- 'official': overlay.is_official(),
- 'supported': overlay.is_supported(),
- }
-
- return result
-
-
def get_info_str(self, repos, local=True, verbose=False, width=0):
"""retrieves the string representation of the recorded information
about the repo(s) specified by ovl