[pbs-devel] [PATCH proxmox] readme: add command to satisfy build and regular dependencies

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon Jul 15 11:03:58 CEST 2024


this is a common gotcha when starting to work on this repository.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---

Notes:
    it's a bit rough, and probably a version that parses Cargo.toml instead would
    be even better, but it's better than nothing ;)

 README.rst | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/README.rst b/README.rst
index 2288f797..bbec9299 100644
--- a/README.rst
+++ b/README.rst
@@ -78,3 +78,26 @@ Some restrictions apply:
 - workspace dependency specifications cannot include ``optional``
  - if needed, the ``optional`` flag needs to be set at the member level when
    using a workspace dependency
+
+Installing all required packages
+================================
+
+Generating a source package via debcargo requires all dependencies, including
+optional ones, being present on the system. The build of that source package
+does not require all the optional dependencies (since it only tests the default
+feature set), therefor having all build-dependencies listed in `debian/control`
+installed is not enough to generate the source package.
+
+The following command prints a list of all build and regular dependencies
+listed in a debian/control file, which can be passed to `apt satisfy` to
+install them:
+
+```
+grep-dctrl -n -s Depends,Build-Depends -S -e '.*' */debian/control \
+| grep -v '${misc:Depends}' \
+| sed -e 's/ <!nocheck>//g' -e 's/ (= ${binary:Version})//g' \
+| sort -u \
+| sed -e 's/,$//g' \
+| tr '\n' ',' \
+| sed -e 's/,$//' -e 's/^,//g'
+```
-- 
2.39.2





More information about the pbs-devel mailing list