Closed BKSalman closed 2 years ago
As you know, currently rpm-rs does not support rich/boolean dependency. So it is difficult to support it.
In your case, how about just specify file dependency : /usr/bin/ffmpeg
?
ah, I see,
you mean adding ffmpeg
as an asset?
if so, don't I need to add all of it's dependencies too?
welp, after slamming my head for a bit, I opened the rpm file in a hex editor and found out that they just append (ffmpeg or ffmpeg-free)
as plain text, so I just needed to do something like this
[package.metadata.generate-rpm.requires]
"(ffmpeg or ffmpeg-free)" = "*"
I intended to do the following:
[package.metadata.generate-rpm.requires]
"/usr/bin/ffmpeg" = "*"
Anyway, your investigation clearly that conditional dependency also supported in current implement. Thank you so much!
no problem! I was even trying to read the source code for rpmbuild
to figure out how they store that information, and do a PR on rpm-rs
, but my very first simple guess was right, but I didn't trust my guts XD
love your crate btw, thank you for making it!
Hello,
I'm making an rpm package for an app that depends on
ffmpeg
,but since
ffmpeg
is removed from fedora's default repos, I want to check if the user already hasffmpeg
or has access to it from a different repo, and download it,if NOT then install
ffmpeg-free
since it does what I needsomething similar to
Requires: (ffmpeg or ffmpeg-free)
in the spec fileI want to do that because if I just download
ffmpeg-free
regardless, it will conflict with ffmpeg as I tested on my machine,how do I do conditional dependencies in this situation?