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

Gabriel Goller g.goller at proxmox.com
Mon Jul 15 11:58:02 CEST 2024


On 15.07.2024 11:03, Fabian Grünbichler wrote:
>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

s/being/to be/
is more fitting IMO.

>+does not require all the optional dependencies (since it only tests the default
>+feature set), therefor having all build-dependencies listed in `debian/control`

s/therefor/therefore/

>+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'
>+```

Otherwise tested the command, it works great!
A small cosmetic nit though:

     sed -e 's/,$/\n/' -e 's/^,//g

So that we have a new line after the last element.





More information about the pbs-devel mailing list