jordansissel / fpm

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Other
11.09k stars 1.07k forks source link

Specify minimum dependencies? #1985

Open jagilbert27 opened 1 year ago

jagilbert27 commented 1 year ago

As an rpm package developer I would like to use fpm to make an rpm package that requires dotnet-runtime 6.0 or greater so the package will install on linux machines with a dotnet-runtime of 6.0 or greater

It works if I specify a specific version:

$ apt install dotnet-runtime-6.0
$ fpm --name foo --depends 'dotnet-runtime-6.0'
$ rpm --install foo.392ab34-1.noarch.x86_64.rpm

This does not work:

$ apt remove dotnet-runtime-6.0
$ apt install dotnet-runtime-7.0
$ fpm --name foo --depends 'dotnet-runtime >= 6.0'
$ rpm --install foo.392ab34-1.noarch.x86_64.rpm
     error: Failed dependencies:
        dotnet-runtime >= 6.0 is needed by filecleaner-1a57c69-1.noarch.x86_64
$sudo rpm -qR foo-1a57c69-1.noarch.x86_64.rpm
     dotnet-runtime >= 6.0
     rpmlib(CompressedFileNames) <= 3.0.4-1
     rpmlib(PayloadFilesHavePrefix) <= 4.0-1

I've also tried variations on this without success as described here

-- depends: '(dotnet-runtime-6.0 or dotnet-runtime-7.0)'

Cheers,