micropython / micropython/micropython
mpremote romfs deploy: Directory handling is arguably inconsistent with cp -r
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 22.1k
- Forks
- 9k
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 16
Description
Port, board and/or hardware
Board independent. Tested on RP2040
MicroPython version
MicroPython v1.25.0-dirty on 2025-04-19; Raspberry Pi Pico with RP2040
Built with romfs
Reproduction
Issue
$ mpremote deploy foo
where foo is a directory on the PC containing subdirectories
Expected behaviour
The command
$ mpremote cp -r foo :
copies the directory foo with contents and subdirectories to the host. This is consistent with
$ cp -r foo bar
Observed behaviour
By contrast
$ mpremote deploy foo
copies the contents of foo as per
$ cp -r foo/* bar
A typical project might consist of a Python package foo where the executable foo is contained in a directory holding documentation and other resources. The requirement is to copy foo and its contents. Currently this requires a workround involving a temporary directory and a symlink.
Additional Information
Options are either to change this behaviour or provide means of deploying either the directory + contents or contents alone.
Code of Conduct
Yes, I agree
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the mpremote deploy command and comparing its directory handling with mpremote cp -r foo :. Reproduce the difference using a directory with subdirectories, then add a regression test and make deploy support either directory-plus-contents or an explicit contents-only mode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100