Install a dev-platform with ALL declared packages using a new `--with-all-packages` option // Resolve #3345

This commit is contained in:
Ivan Kravets committed 2020-01-24 20:20:56 +02:00
1 parent a62bc3846e
commit 20334772b5
4 files changed
+15 -3

No files matched your search

+9 -2
View File
@@ -299,14 +299,20 @@ def platform_show(platform, json_output): # pylint: disable=too-many-branches
@click.option("--with-package", multiple=True)
@click.option("--without-package", multiple=True)
@click.option("--skip-default-package", is_flag=True)
@click.option("--with-all-packages", is_flag=True)
@click.option(
"-f",
"--force",
is_flag=True,
help="Reinstall/redownload dev/platform and its packages if exist",
)
def platform_install(
platforms, with_package, without_package, skip_default_package, force
def platform_install( # pylint: disable=too-many-arguments
platforms,
with_package,
without_package,
skip_default_package,
with_all_packages,
force,
):
pm = PlatformManager()
for platform in platforms:
@@ -315,6 +321,7 @@ def platform_install(
with_packages=with_package,
without_packages=without_package,
skip_default_package=skip_default_package,
with_all_packages=with_all_packages,
force=force,
):
click.secho(
+4
View File
@@ -74,6 +74,7 @@ class PlatformManager(BasePkgManager):
with_packages=None,
without_packages=None,
skip_default_package=False,
with_all_packages=False,
after_update=False,
silent=False,
force=False,
@@ -84,6 +85,9 @@ class PlatformManager(BasePkgManager):
)
p = PlatformFactory.newPlatform(platform_dir)
if with_all_packages:
with_packages = list(p.packages.keys())
# don't cleanup packages or install them after update
# we check packages for updates in def update()
if after_update: