From 96e17b65d128cac2328e10f317241d3a64aca2c7 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 11 Mar 2025 16:27:09 +1100 Subject: [PATCH] mip: Make mip.install() skip /rom*/lib directories. If a ROMFS is mounted then "/rom/lib" is usually in `sys.path` before the writable filesystem's "lib" entry. The ROMFS directory cannot be installed to, so skip it if found. Signed-off-by: Damien George --- micropython/mip/manifest.py | 2 +- micropython/mip/mip/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/micropython/mip/manifest.py b/micropython/mip/manifest.py index 2a35f8c5..9fb94ebc 100644 --- a/micropython/mip/manifest.py +++ b/micropython/mip/manifest.py @@ -1,4 +1,4 @@ -metadata(version="0.4.0", description="On-device package installer for network-capable boards") +metadata(version="0.4.1", description="On-device package installer for network-capable boards") require("requests") diff --git a/micropython/mip/mip/__init__.py b/micropython/mip/mip/__init__.py index 8920ad8f..7c0fb4d3 100644 --- a/micropython/mip/mip/__init__.py +++ b/micropython/mip/mip/__init__.py @@ -171,7 +171,7 @@ def _install_package(package, index, target, version, mpy): def install(package, index=None, target=None, version=None, mpy=True): if not target: for p in sys.path: - if p.endswith("/lib"): + if not p.startswith("/rom") and p.endswith("/lib"): target = p break else: