Coder Social home page Coder Social logo

Comments (4)

kornelski avatar kornelski commented on July 23, 2024

If you use weak linking and/or dlopen, it should work. Just don't specify the optional dependency at all. If you don't link to it using the usual program-breaking way, then cargo-deb's auto dependency feature won't see it either.

I think to handle it "properly" Debian uses multiple separate packages for optional features and some combinations of virtual packages and provides relationships, but cargo-deb doesn't bother with that.

from cargo-deb.

bradleyharden avatar bradleyharden commented on July 23, 2024

Sorry, I should probably explain a bit more.

My application is little more than a glorified bash script. It actually started as a bash script until I realized it would end up being too complicated, and I wanted actual types and data structures.

The application manages a series of tools run with Docker/Podman containers or with Vagrant and VirtualBox as full VMs. Right now, I use duct to control everything through process calls to those tools.

However, if hardware virtualization isn't enabled, then Vagrant and VirtualBox won't work anyway and aren't necessary. That just means any tools provided as VMs won't be available on that machine, which isn't a huge limitation, since most are available as containers.

So dlopen isn't really an option for me. I was imagining the solution would be something along the lines of the second approach you described. But I don't want users to have to manually check for hardware virtualization and modify their selected packages. I would like that to be handled on my end. What I don't know how to do is dynamically change the required packages based on that check.

from cargo-deb.

kornelski avatar kornelski commented on July 23, 2024

As far as I know, package dependencies in Debian are always a static declarative thing. They're an immutable constant for a .deb file. If you want different dependencies, then you create multiple .deb files, and build higher-level mechanism to choose which deb to install.

from cargo-deb.

bradley-harden-apl avatar bradley-harden-apl commented on July 23, 2024

Yes, I think I came to that conclusion after a separate conversation elsewhere. I think I will do exactly what you describe. Thanks for your help. Sorry for the spam.

from cargo-deb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.