diff --git a/libraries/entropy/db/__init__.py b/libraries/entropy/db/__init__.py index db78406a4..5ac23fa31 100644 --- a/libraries/entropy/db/__init__.py +++ b/libraries/entropy/db/__init__.py @@ -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. diff --git a/libraries/entropy/db/skel.py b/libraries/entropy/db/skel.py index 5329af1fd..80cc050bc 100644 --- a/libraries/entropy/db/skel.py +++ b/libraries/entropy/db/skel.py @@ -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.