Giter Club home page Giter Club logo

Comments (2)

stuart-warren avatar stuart-warren commented on August 15, 2024

feels like 524-525 should be moved above 516

@classmethod
def install_packages(
cls,
package_names: List[str],
*,
list_only: bool = False,
refresh_package_cache: bool = True,
) -> List[str]:
"""Install packages on the host system."""
if not package_names:
return []
install_required = False
package_names = sorted(package_names)
logger.debug("Requested build-packages: %s", package_names)
# Ensure we have an up-to-date cache first if we will have to
# install anything.
if not cls._check_if_all_packages_installed(package_names):
install_required = True
# Collect the list of marked packages to later construct a manifest
marked_packages = cls._get_packages_marked_for_installation(package_names)
marked_package_names = [name for name, _ in sorted(marked_packages)]
if not list_only:
if refresh_package_cache and install_required:
cls.refresh_packages_list()
if install_required:
cls._install_packages(package_names)
else:
logger.debug(
"Requested build-packages already installed: %s", package_names
)
# This result is a best effort approach for deps and virtual packages
# as they are not part of the installation list.
return cls._get_installed_package_versions(marked_package_names)

from craft-parts.

syncronize-issues-to-jira avatar syncronize-issues-to-jira commented on August 15, 2024

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2970.

This message was autogenerated

from craft-parts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.