"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "snapcraft_legacy/internal/build_providers/_base_provider.py" between
snapcraft-7.2.4.tar.gz and snapcraft-7.2.5.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.

_base_provider.py  (snapcraft-7.2.4):_base_provider.py  (snapcraft-7.2.5)
skipping to change at line 263 skipping to change at line 263
self._run(["apt-get", "dist-upgrade", "--yes"]) self._run(["apt-get", "dist-upgrade", "--yes"])
# Install any packages that might be missing from the base # Install any packages that might be missing from the base
# image, but may be required for snapcraft to function. # image, but may be required for snapcraft to function.
self._run(["apt-get", "install", "--yes", "apt-transport-https"]) self._run(["apt-get", "install", "--yes", "apt-transport-https"])
# Always setup snapcraft after a start to bring it up to speed with # Always setup snapcraft after a start to bring it up to speed with
# what is on the host. # what is on the host.
self._setup_snapcraft() self._setup_snapcraft()
self._setup_snapd()
# Always update snapd proxy settings to match current http(s) proxy # Always update snapd proxy settings to match current http(s) proxy
# settings. # settings.
self._setup_snapd_proxy() self._setup_snapd_proxy()
# Install any CA certificates requested by the user. # Install any CA certificates requested by the user.
certs_path = self.build_provider_flags.get("SNAPCRAFT_ADD_CA_CERTIFICATE S") certs_path = self.build_provider_flags.get("SNAPCRAFT_ADD_CA_CERTIFICATE S")
if certs_path: if certs_path:
self._add_ca_certificates(pathlib.Path(certs_path)) self._add_ca_certificates(pathlib.Path(certs_path))
def _add_ca_certificates(self, certs_path: pathlib.Path) -> None: def _add_ca_certificates(self, certs_path: pathlib.Path) -> None:
skipping to change at line 508 skipping to change at line 510
build_base = self.project._get_build_base() build_base = self.project._get_build_base()
if build_base != "core20": if build_base != "core20":
snap_injector.add(snap_name=build_base) snap_injector.add(snap_name=build_base)
# Inject snapcraft and its base. # Inject snapcraft and its base.
snap_injector.add(snap_name="core20") snap_injector.add(snap_name="core20")
snap_injector.add(snap_name="snapcraft") snap_injector.add(snap_name="snapcraft")
snap_injector.apply() snap_injector.apply()
def _setup_snapd(self) -> None:
"""Configure snapd and wait until ready."""
self._run(["systemctl", "start", "snapd.socket"])
# Restart, not start, the service in case the environment
# has changed and the service is already running.
self._run(["systemctl", "restart", "snapd.service"])
self._run(["snap", "wait", "system", "seed.loaded"])
def _setup_snapd_proxy(self) -> None: def _setup_snapd_proxy(self) -> None:
"""Configure snapd proxy settings from http(s)_proxy.""" """Configure snapd proxy settings from http(s)_proxy."""
http_proxy = self.build_provider_flags.get("http_proxy") http_proxy = self.build_provider_flags.get("http_proxy")
if http_proxy: if http_proxy:
self._run(["snap", "set", "system", f"proxy.http={http_proxy}"]) self._run(["snap", "set", "system", f"proxy.http={http_proxy}"])
else: else:
self._run(["snap", "unset", "system", "proxy.http"]) self._run(["snap", "unset", "system", "proxy.http"])
https_proxy = self.build_provider_flags.get("https_proxy") https_proxy = self.build_provider_flags.get("https_proxy")
if https_proxy: if https_proxy:
 End of changes. 2 change blocks. 
0 lines changed or deleted 12 lines changed or added

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