Skip to content

Commit

Permalink
docs/HACKING: Update crate patching example
Browse files Browse the repository at this point in the history
Use patch as recommended in the documentation.
  • Loading branch information
travier committed Apr 22, 2024
1 parent 9e491fe commit d5e1fa2
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 d5e1fa2

Please sign in to comment.