Skip to content

Commit

Permalink
Merge pull request #4933 from travier/main-docs-crate-patch
Browse files Browse the repository at this point in the history
docs/HACKING: Update crate patching example
  • Loading branch information
cgwalters authored Apr 22, 2024
2 parents 01fb992 + d5e1fa2 commit faa5420
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,16 @@ like to install into the VM (e.g. bubblewrap, libsolv, etc...).

A common case is testing changes in the `ostree-rs-ext` crate. Once you have
your changes ready in a clone of the `ostree-rs-ext` repository, you can edit
rpm-ostree's `Cargo.toml` to point to it. For example:
rpm-ostree's `Cargo.toml` to point to it.

```
$ sed -i "s/ostree-ext = \".*\"/ostree-ext = { path = '..\/ostree-rs-ext\/lib\/' }/" Cargo.toml
...
[patch.crates-io]
ostree-ext = { path = "../ostree-rs-ext/lib/" }
```

Then build rpm-ostree with the normal commands.

See: <https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html>.
See the example from the
[Overriding Dependencies section of the Cargo Book](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html).

## Using GDB with the rpm-ostree daemon

Expand Down

0 comments on commit faa5420

Please sign in to comment.