debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #03214
[Bug 2115573] Re: Have dh-cargo-vendored-sources update debian/control rather than just verify it
> I thought the plan was that the two modes would be either output
> unconditionally on stdout or check the current value and output on
> stderr if mismatch?
Ah, I must have misunderstood our chat. Yes, that works fine for me.
> I'm not a huge fan of updating d/control directly, to be honest. How
> about going through substvars instead? We'd write the file in
> d/rust-vendor.substvars and check that d/source/options contains
> -Tdebian/rust-vendor.substvars. That way we don't have that horrible
> 10km-long line in d/control anymore.
I agree that it'd be great to get that out of d/control. So if we do
this, then when maintaining a Rust package, the maintainer will...
1. Replace the XS-Vendored-Sources-Rust line in d/control with something like `XS-Vendored-Sources-Rust: ${XS-Vendored-Sources-Rust}`
2. Add `-Tdebian/rust-vendor.substvars` to d/source.options.
3. Add a custom rule to d/rules that does something like `/usr/share/cargo/bin/dh-cargo-vendored-sources --output-expected > debian/rust-vendor.substvars`.
Am I understanding your proposal correctly?
If so, apart from adding the stdout option in the first place, the only
dh-cargo change we'd have to make would be adding the substvar hint you
mentioned, no? Seems like a good addition to me, but it feels discrete
enough to warrant a separate feature request IMO.
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to dh-cargo in Ubuntu.
https://bugs.launchpad.net/bugs/2115573
Title:
Have dh-cargo-vendored-sources update debian/control rather than just
verify it
Status in dh-cargo package in Ubuntu:
New
Bug description:
It would be helpful for package update automation if dh-cargo-
vendored-sources would be updated to directly update the XS-Vendored-
Sources-Rust field in debian/control rather than only verifying that
it is correct.
If updating debian/control directly is undesirable, an alternative is
to have a different command line option that directly outputs the
expected XS-Vendored-Sources-Rust line. This would avoid users needing
to parse stderr which feels awkward.
My usecase is inclusion in a custom rule in debian/rules to update the
vendoring of a package instead of a long list of instructions or
commands. The custom rule would be run locally by the package
contributor to prepare the updated package and not at buildtime. I
believe every Rust package in main needs to have either a rule or
script or documentation to do the vendoring, so I expect my requested
feature here would be widely used.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dh-cargo/+bug/2115573/+subscriptions
References