From d5e1fa2eb5acd1847befd2aaa0c8532041450de3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Fri, 19 Apr 2024 19:34:57 +0200 Subject: [PATCH] docs/HACKING: Update crate patching example Use patch as recommended in the documentation. --- docs/HACKING.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/HACKING.md b/docs/HACKING.md index 84c0521048..61f53af9cb 100644 --- a/docs/HACKING.md +++ b/docs/HACKING.md @@ -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: . +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