Comments (4)
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.
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.
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.
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)
- Consider using `zopfli`'s new streaming encoder feature HOT 4
- cargo-deb looks up README.md in wrong dir when using workspace HOT 1
- Clarification on the "native" nature of packages HOT 3
- Consider adding 'target-dir' option HOT 1
- Allow dpkg-shlibdeps flags or Debian rules file HOT 1
- `conf-files` generates a `conffiles` file with a trailing empty line HOT 1
- Test failures for manifest and control tests on Arch Linux HOT 8
- [Feature-Request] Advanced Usage, "append" option for assets HOT 3
- rodio HOT 1
- `cargo deb` looks for target-specific configuration in target directory HOT 4
- [Feature Request] Option To Disable Variant Naming HOT 1
- Custom profile is not honored
- [Feature Request] Allow writing `depends` as a list instead of a string HOT 1
- [Feature Request]: Parallel Building HOT 1
- Including example binaries does not work HOT 2
- cargo deb does not handle links files
- Add a proper support for SOURCE_DATE_EPOCH HOT 1
- Introduce a separate library crate for working with deb files? HOT 2
- Support switching between xz and gzip formats at runtime HOT 1
- Mention in warnings that README contents are used if description field is missing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-deb.