Exemple #1
0
    def __init__(self, rootdir, sources=None, project_options=None) -> None:
        super().__init__(rootdir)
        self._downloaddir = os.path.join(rootdir, "download")

        if not project_options:
            project_options = snapcraft.ProjectOptions()

        self._apt = _AptCache(project_options.deb_arch, sources_list=sources)

        self._cache = cache.AptStagePackageCache(
            sources_digest=self._apt.sources_digest())
Exemple #2
0
    def __init__(self, rootdir, sources=None, project_options=None):
        super().__init__(rootdir)
        self._downloaddir = os.path.join(rootdir, 'download')
        os.makedirs(self._downloaddir, exist_ok=True)

        if not project_options:
            project_options = snapcraft.ProjectOptions()

        self._apt = _AptCache(project_options.deb_arch,
                              sources_list=sources,
                              use_geoip=project_options.use_geoip)

        self._cache = cache.AptStagePackageCache(
            sources_digest=self._apt.sources_digest())
Exemple #3
0
    def __init__(
        self,
        rootdir,
        sources: Optional[List[str]] = None,
        keyrings: Optional[List[str]] = None,
        project_options=None,
    ) -> None:
        super().__init__(rootdir)
        self._downloaddir = os.path.join(rootdir, "download")

        if sources is None:
            sources = list()

        if keyrings is None:
            keyrings = list()

        self._apt = _AptCache(sources=sources, keyrings=keyrings)

        self._cache = cache.AptStagePackageCache(
            sources_digest=self._apt.sources_digest())