forked from platformio/platformio-core
Follow SemVer complaint version constraints when checking library updates // Resolve #1281
This commit is contained in:
@ -37,8 +37,9 @@ PlatformIO Core 5
|
|||||||
* New **Package Management System**
|
* New **Package Management System**
|
||||||
|
|
||||||
- Integrated PlatformIO Core with the new PlatformIO Registry
|
- Integrated PlatformIO Core with the new PlatformIO Registry
|
||||||
- Strict dependency declaration using owner name (resolves name conflicts) (`issue #1824 <https://github.com/platformio/platformio-core/issues/1824>`_)
|
- Support for owner-based dependency declaration (resolves name conflicts) (`issue #1824 <https://github.com/platformio/platformio-core/issues/1824>`_)
|
||||||
- Automatically save dependencies to `"platformio.ini" <https://docs.platformio.org/page/projectconf.html>`__ when installing using PlatformIO CLI (`issue #2964 <https://github.com/platformio/platformio-core/issues/2964>`_)
|
- Automatically save dependencies to `"platformio.ini" <https://docs.platformio.org/page/projectconf.html>`__ when installing using PlatformIO CLI (`issue #2964 <https://github.com/platformio/platformio-core/issues/2964>`_)
|
||||||
|
- Follow SemVer complaint version constraints when checking library updates `issue #1281 <https://github.com/platformio/platformio-core/issues/1281>`_)
|
||||||
- Dropped support for "packageRepositories" section in "platform.json" manifest (please publish packages directly to the registry)
|
- Dropped support for "packageRepositories" section in "platform.json" manifest (please publish packages directly to the registry)
|
||||||
|
|
||||||
* **Build System**
|
* **Build System**
|
||||||
|
@ -254,8 +254,9 @@ def lib_update( # pylint: disable=too-many-arguments
|
|||||||
for storage_dir in storage_dirs:
|
for storage_dir in storage_dirs:
|
||||||
if not json_output:
|
if not json_output:
|
||||||
print_storage_header(storage_dirs, storage_dir)
|
print_storage_header(storage_dirs, storage_dir)
|
||||||
|
lib_deps = ctx.meta.get(CTX_META_STORAGE_LIBDEPS_KEY, {}).get(storage_dir, [])
|
||||||
lm = LibraryPackageManager(storage_dir)
|
lm = LibraryPackageManager(storage_dir)
|
||||||
_libraries = libraries or lm.get_installed()
|
_libraries = libraries or lib_deps or lm.get_installed()
|
||||||
|
|
||||||
if only_check and json_output:
|
if only_check and json_output:
|
||||||
result = []
|
result = []
|
||||||
@ -286,9 +287,13 @@ def lib_update( # pylint: disable=too-many-arguments
|
|||||||
to_spec = (
|
to_spec = (
|
||||||
None if isinstance(library, PackageItem) else PackageSpec(library)
|
None if isinstance(library, PackageItem) else PackageSpec(library)
|
||||||
)
|
)
|
||||||
lm.update(
|
try:
|
||||||
library, to_spec=to_spec, only_check=only_check, silent=silent
|
lm.update(
|
||||||
)
|
library, to_spec=to_spec, only_check=only_check, silent=silent
|
||||||
|
)
|
||||||
|
except UnknownPackageError as e:
|
||||||
|
if library not in lib_deps:
|
||||||
|
raise e
|
||||||
|
|
||||||
if json_output:
|
if json_output:
|
||||||
return click.echo(
|
return click.echo(
|
||||||
|
Reference in New Issue
Block a user