[entropy.db] implement support for listAllExtraDownloads()
This commit is contained in:
@@ -4703,6 +4703,28 @@ class EntropyRepository(EntropyRepositoryBase):
|
||||
|
||||
return results
|
||||
|
||||
def listAllExtraDownloads(self, do_sort = True):
|
||||
"""
|
||||
Reimplemented from EntropyRepositoryBase.
|
||||
"""
|
||||
order_string = ''
|
||||
if do_sort:
|
||||
order_string = ' ORDER BY download'
|
||||
try:
|
||||
cur = self._cursor().execute("""
|
||||
SELECT download FROM packagedownloads
|
||||
""" + order_string)
|
||||
except OperationalError:
|
||||
if self._doesTableExist("packagedownloads"):
|
||||
raise
|
||||
return tuple()
|
||||
|
||||
if do_sort:
|
||||
results = self._cur2tuple(cur)
|
||||
else:
|
||||
results = self._cur2frozenset(cur)
|
||||
return results
|
||||
|
||||
def listAllFiles(self, clean = False, count = False):
|
||||
"""
|
||||
Reimplemented from EntropyRepositoryBase.
|
||||
|
||||
@@ -3505,6 +3505,19 @@ class EntropyRepositoryBase(TextInterface, EntropyRepositoryPluginStore):
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def listAllExtraDownloads(self, do_sort = True):
|
||||
"""
|
||||
List all package extra download URLs stored in repository.
|
||||
|
||||
@keyword do_sort: sort by name
|
||||
@type do_sort: bool
|
||||
@keyword full_path: return full URL (not just package file name)
|
||||
@type full_path: bool
|
||||
@return: tuple (or set if do_sort is True) of package download URLs
|
||||
@rtype: tuple or frozenset
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def listAllFiles(self, clean = False, count = False):
|
||||
"""
|
||||
List all file paths owned by packaged stored in repository.
|
||||
|
||||
Reference in New Issue
Block a user