Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/loader.py
Show All 9 Lines | |||||
from tempfile import mkdtemp | from tempfile import mkdtemp | ||||
from swh.core import tarball | from swh.core import tarball | ||||
from swh.loader.core.utils import clean_dangling_folders | from swh.loader.core.utils import clean_dangling_folders | ||||
from swh.loader.core.loader import BufferedLoader | from swh.loader.core.loader import BufferedLoader | ||||
from swh.model.hashutil import MultiHash, HASH_BLOCK_SIZE | from swh.model.hashutil import MultiHash, HASH_BLOCK_SIZE | ||||
from swh.storage.algos.snapshot import snapshot_get_all_branches | from swh.storage.algos.snapshot import snapshot_get_all_branches | ||||
from .build_revision import BuildRevision | |||||
DEBUG_MODE = '** DEBUG MODE **' | DEBUG_MODE = '** DEBUG MODE **' | ||||
class PackageLoader(BufferedLoader): | class PackageLoader(BufferedLoader, BuildRevision): | ||||
"""Package loader class for package manager loader | """Package loader class for package manager loader | ||||
A loader is a component of the Software Heritage architecture responsible | A loader is a component of the Software Heritage architecture responsible | ||||
for reading a source code origin and add new file contents in the object | for reading a source code origin and add new file contents in the object | ||||
storage and repository structure in the storage database. | storage and repository structure in the storage database. | ||||
The task of loader for package managers somehow similar for all | The task of loader for package managers somehow similar for all | ||||
of them, notably it includes querying of an API to get metadata and | of them, notably it includes querying of an API to get metadata and | ||||
▲ Show 20 Lines • Show All 306 Lines • Show Last 20 Lines |