Skip to content

Commit 96e17b6

Browse files
committed
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 <[email protected]>
1 parent 7337e08 commit 96e17b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

micropython/mip/manifest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
metadata(version="0.4.0", description="On-device package installer for network-capable boards")
1+
metadata(version="0.4.1", description="On-device package installer for network-capable boards")
22

33
require("requests")
44

micropython/mip/mip/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def _install_package(package, index, target, version, mpy):
171171
def install(package, index=None, target=None, version=None, mpy=True):
172172
if not target:
173173
for p in sys.path:
174-
if p.endswith("/lib"):
174+
if not p.startswith("/rom") and p.endswith("/lib"):
175175
target = p
176176
break
177177
else:

0 commit comments

Comments
 (0)