kornelski / cargo-deb

A cargo subcommand that generates Debian packages from information in Cargo.toml
https://lib.rs/cargo-deb
MIT License
404 stars 48 forks source link

[Feature Request] Allow writing `depends` as a list instead of a string #88

Closed swlynch99 closed 1 year ago

swlynch99 commented 1 year ago

I have a package that has a number of dependencies on other binaries (so $auto doesn't pick them up). The depends list for this package has pretty quickly ended up running all the way off the edge of my screen. It would be much nicer if this could also be written as a list of dependencies instead of a string.

So, instead of writing

[package.metadata.deb]
# ...
depends = "$auto, some-dependency-1, some-depencency-2, some-dependency-3, etc"

it would be nice if it could also be written as

[package.metadata.deb]
# ...
depends = [
  "$auto",
  "some-dependency-1",
  "some-dependency-2",
  "some-dependency-3",
  "etc"
]

and then cargo-deb joins that back into the depends string above.

I would be happy to contribute a PR for this if you think it is worth doing.

kornelski commented 1 year ago

Yes, this is a good idea.

But please keep backwards compatibility and still support the string. Serde supports that via untagged attribute on enums.