404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.147.74.100: ~ $
# This file is part of cloud-init. See LICENSE file for license information.
from abc import ABC, abstractmethod
from typing import Iterable, List

from cloudinit import helpers

UninstalledPackages = List[str]


class PackageManager(ABC):
    name: str

    def __init__(self, runner: helpers.Runners, **kwargs):
        self.runner = runner

    @classmethod
    def from_config(cls, runner: helpers.Runners, cfg) -> "PackageManager":
        return cls(runner)

    @abstractmethod
    def update_package_sources(self):
        ...

    @abstractmethod
    def install_packages(self, pkglist: Iterable) -> UninstalledPackages:
        """Install the given packages.

        Return a list of packages that failed to install.
        Overriding classes should NOT raise an exception if packages failed
        to install. Instead, log the error and return what couldn't be
        installed so other installed package managers may be attempted.
        """

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
__init__.py File 77 B 0644
apt.py File 7.89 KB 0644
package_manager.py File 959 B 0644
snap.py File 1.06 KB 0644
utils.py File 324 B 0644