[entropy.spm] PortagePlugin: add resolve_spm_package_uid()

This commit is contained in:
Fabio Erculiani
2012-07-19 20:27:15 +02:00
parent 5a0d8cf7f5
commit 00a3d87b7d
2 changed files with 18 additions and 0 deletions
@@ -1817,6 +1817,12 @@ class PortagePlugin(SpmPlugin):
return counter
def resolve_spm_package_uid(self, package):
"""
Reimplemented from SpmPlugin class.
"""
return self.get_installed_package_metadata(package, "COUNTER")
def search_paths_owners(self, paths, exact_match = True):
"""
Reimplemented from SpmPlugin class.
+12
View File
@@ -596,6 +596,18 @@ class SpmPlugin(Singleton):
"""
raise NotImplementedError()
def resolve_spm_package_uid(self, package):
"""
Given a Source Package Manager atom, return its UID.
@param package: Source Package Manager atom
@type package: string
@return: Source Package Manager UID for package
@rtype: int
@raise KeyError: in case the package cannot be resolved into UID.
"""
raise NotImplementedError()
def convert_from_entropy_package_name(self, entropy_package_name):
"""
This function should be able to convert an Entropy package name (atom)