"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "snapcraft/internal/project_loader/_config.py" between
snapcraft-4.5.1.tar.gz and snapcraft-4.5.2.tar.gz

About: Snapcraft is a build and packaging tool that makes it easy to incorporate components from different sources and build technologies or solutions.

_config.py  (snapcraft-4.5.1):_config.py  (snapcraft-4.5.2)
skipping to change at line 33 skipping to change at line 33
import jsonschema import jsonschema
from snapcraft import formatting_utils, plugins, project from snapcraft import formatting_utils, plugins, project
from snapcraft.internal import deprecations, repo, states, steps from snapcraft.internal import deprecations, repo, states, steps
from snapcraft.internal.meta.package_repository import PackageRepository from snapcraft.internal.meta.package_repository import PackageRepository
from snapcraft.internal.meta.snap import Snap from snapcraft.internal.meta.snap import Snap
from snapcraft.internal.pluginhandler._part_environment import ( from snapcraft.internal.pluginhandler._part_environment import (
get_snapcraft_global_environment, get_snapcraft_global_environment,
) )
from snapcraft.internal.repo import apt_key_manager from snapcraft.internal.repo import apt_key_manager, apt_sources_manager
from snapcraft.project._schema import Validator from snapcraft.project._schema import Validator
from . import errors, grammar_processing, replace_attr from . import errors, grammar_processing, replace_attr
from ._env import environment_to_replacements, runtime_env from ._env import environment_to_replacements, runtime_env
from ._extensions import apply_extensions from ._extensions import apply_extensions
from ._parts_config import PartsConfig from ._parts_config import PartsConfig
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@jsonschema.FormatChecker.cls_checks("icon-path") @jsonschema.FormatChecker.cls_checks("icon-path")
skipping to change at line 262 skipping to change at line 262
def install_package_repositories(self) -> None: def install_package_repositories(self) -> None:
package_repos = self._get_required_package_repositories() package_repos = self._get_required_package_repositories()
if not package_repos: if not package_repos:
return return
# Install pre-requisite packages for apt-key, if not installed. # Install pre-requisite packages for apt-key, if not installed.
repo.Repo.install_build_packages(package_names=["gnupg", "dirmngr"]) repo.Repo.install_build_packages(package_names=["gnupg", "dirmngr"])
key_assets = self.project._get_keys_path() key_assets = self.project._get_keys_path()
key_manager = apt_key_manager.AptKeyManager(key_assets=key_assets) key_manager = apt_key_manager.AptKeyManager(key_assets=key_assets)
sources_manager = apt_sources_manager.AptSourcesManager()
refresh_required = False refresh_required = False
for package_repo in self._get_required_package_repositories(): for package_repo in self._get_required_package_repositories():
refresh_required |= key_manager.install_package_repository_key( refresh_required |= key_manager.install_package_repository_key(
package_repo=package_repo package_repo=package_repo
) )
refresh_required |= package_repo.install() refresh_required |= sources_manager.install_package_repository_sourc
es(
package_repo=package_repo
)
if refresh_required: if refresh_required:
repo.Repo.refresh_build_packages() repo.Repo.refresh_build_packages()
def get_build_packages(self) -> Set[str]: def get_build_packages(self) -> Set[str]:
# Install/update configured package repositories. # Install/update configured package repositories.
self.install_package_repositories() self.install_package_repositories()
build_packages = self._global_grammar_processor.get_build_packages() build_packages = self._global_grammar_processor.get_build_packages()
build_packages |= set(self.project.additional_build_packages) build_packages |= set(self.project.additional_build_packages)
 End of changes. 3 change blocks. 
2 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)