[Pkg-rust-maintainers] Bug#1001330: sqop: Provide a sop alternative for sqop

Guillem Jover guillem at debian.org
Wed Jul 20 01:02:48 BST 2022


Control: tag -1 patch

Hi!

On Wed, 2021-12-08 at 20:39:52 +0100, Guillem Jover wrote:
> Package: sqop
> Version: 0.22.2-2
> Severity: wishlist

> One of the main advantages of the SOP CLI is that it is a standardized
> interface, which means having to hardcode specific implementations in
> code kind of defeats the point of that interface. It would be nice to
> be able to by default just use «sop» and use that interface behind
> an alternative (in the dpkg alternatives system), then the local admin
> can select any of the existing implementations. I'm not sure how you'd
> want to decide on the priority of the alternatives though, perhaps at
> least by level of compliance (although I don't mind greatly TBH :)?

I've implemented a proposal for this in the attached patch. It also
adds a «sop» virtual package (or at least pretends to, did not run any
debcargo command) so that other packages can depend on any
implementation of the interface.

I initially included alternatives also for the completion but I don't
think they support the «sop» name anyway (at least the bash and fish
ones), and I don't think they can act in a polymorphic way depending
on the file they have been loaded from either.

The currently proposed patch would not make it possible to easily
denote a default implementation though, so perhaps you'd prefer two
sets of virtual packages, one for the current default, and one for
any implementation. Or another option could be to introduce a real
«sop» package (which then could provide its own command completion
files too :), perhaps the spec, etc, and depend first on the preferred
implementation and the virtual package for any sop implementation such
as «sqop | sop-impl» or whatever. The drawback with the real package
approach is that it requires this artificial metapackage.

I think this would also deserve filing a request for an addition to
the Debian policy virtual-package list for coordination with other
potential SOP implementations, once the layout is settled.

Thanks,
Guillem
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rust-sequoia-sop_alternatives.patch
Type: text/x-diff
Size: 1663 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-rust-maintainers/attachments/20220720/9c6035e8/attachment.patch>


More information about the Pkg-rust-maintainers mailing list