docs: install from the repo, since defib was never published to PyPI - #128
Conversation
README and the web UI's frame-blast fallback both tell people to run `uv tool install defib` / `pipx install defib`. There is no `defib` on PyPI — https://pypi.org/pypi/defib/json is a 404 — so both commands fail for anyone who has not already got the tool some other way. This is not theoretical. OpenIPC/firmware#2299 is a user recovering a bricked hi3518ev200: a frame-blast chip, so the web UI sent them to exactly the line above. They got defib working eventually, but when a fix landed and they were asked to reinstall, the install went to a different place than the copy on their PATH and they spent two rounds reporting results from the old build against a bug that was already fixed. Point both at the git URL, and add the uvx one-liner — it needs no install at all and cannot be shadowed by an active virtualenv, which is what went wrong in that issue. Publishing to PyPI would also close this and is worth doing; it needs a maintainer with the account, so the docs fix goes first.
PR Summary by QodoFix CLI installation and recovery commands to use GitHub
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
Qodo caught this on #128. `<chip>` inside a bash block is not an inert placeholder — the shell splits it into two redirections: $ cd /tmp/cn && : > chip $ bash -c 'echo ARGS: defib burn -c <chip> -p /dev/ttyUSB0 -t' $ cat ./-p ARGS: defib burn -c /dev/ttyUSB0 -t `<chip` redirects stdin, then `>` with the following word redirects stdout into a file literally named `-p`. What defib actually receives is `-c /dev/ttyUSB0 -t`, so the chip name becomes the port. Without a file named `chip` in the cwd it fails "chip: No such file or directory"; with one it runs the wrong command and drops a junk `-p` file that is awkward to delete. Use hi3516ev300, matching every other example in the README, and say to substitute. The web/index.html line is unaffected — it interpolates the selected chip before display.
The problem
Two places tell users to install from PyPI:
README.md—uv tool install defib/pipx install defibweb/index.html:621— the fallback shown when the browser build refuses a frame-blast SoCThere is no
defibpackage on PyPI, so both commands fail.Why it matters
OpenIPC/firmware#2299 is a user recovering a bricked hi3518ev200 over UART. hi3518ev200 is a
frame-blast chip, so the web UI showed them precisely the broken line. They got there in the end,
but when #126 landed and they were asked to reinstall and retry, the new copy went somewhere other
than the
defibon theirPATH— an active virtualenv shadowed~/.local/bin— and they reportedtwo more rounds of results from the old build against a bug that was already fixed.
The change
uv tool install git+https://github.com/OpenIPC/defib # or pipx install git+https://github.com/OpenIPC/defibplus a
uvxone-liner in both places, which needs no install and cannot be shadowed by an activevirtualenv:
Not in scope
Publishing to PyPI would also fix this and is probably worth doing — it needs a maintainer with the
account, so the docs fix goes first.
Test plan
uv tool install git+https://github.com/OpenIPC/defib— installs,defib list-chipsprints 123 chipsuvx --from git+https://github.com/OpenIPC/defib defib list-chips— works with nothing installednode --checkover all three<script>blocks inweb/index.html— parsesEvaluated the edited template literal; renders as