From 8bd5e8201232c6bf80059c368d86bb494105e8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 2 Jan 2020 14:07:12 +0100 Subject: [PATCH] readme: add cargo config for packaged crates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabian Grünbichler --- README.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.rst b/README.rst index ff21651b..2af4eed3 100644 --- a/README.rst +++ b/README.rst @@ -17,3 +17,20 @@ we'll include teh ``.1``. When releasing a crate, the final commit should be the one stripping the ``-dev`` version and updating the ``debian/changelog``. + +Local (packaged) crates +======================= + +To use locally installed, packaged crates instead of crates.io put the +following into ./.cargo/config (or point CARGO_HOME to a directory containing +such a config file):: + + [source] + [source.debian-packages] + directory = "/usr/share/cargo/registry" + [source.crates-io] + replace-with = "debian-packages" + +This is akin to what happens when building with dh_cargo. Cargo.lock needs to +be deleted when switching between packaged crates and crates.io, since the +checksums are not compatible.