Skip to content

regression: provides 'rubygem(foo)' vs 'rubygem-foo' #372

Closed
jordansissel opened this Issue Mar 1, 2013 · 2 comments

2 participants

@jordansissel
Owner

The commit causing this regression is here: 548fe68

It is obvious to me that the above patch is correct - it makes the default behavior more aligned with respect to RedHat package practices.

However, older fpms generated rpms with "Provides: rubygems-foo" or whatnot, so to enable backwards compatibility, fpm should include the old Provides value as well as the new rubygems(blah) value.

Reported by eam on irc.

@r4um
Collaborator
r4um commented Mar 7, 2013

Installing rubygem-foo results in rubygem-foo being provided automatically.

$ fpm -s dir -t rpm open4
Successfully installed open4-1.3.0
1 gem installed
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.RC1Xft
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.IBqLsK
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.pXFUF1
Processing files: rubygem-open4-1.3.0-1.noarch
Wrote: /tmp/package-rpm-build20130307-31188-12m8njy/RPMS/noarch/rubygem-open4-1.3.0-1.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.C562mA
Created rpm {"path":"rubygem-open4-1.3.0-1.noarch.rpm"}
$ rpm -qlp --provides rubygem-open4-1.3.0-1.noarch.rpm
rubygem(open4) = 1.3.0
rubygem-open4 = 1:1.3.0-1
---cut file list---
$ sudo yum install ./rubygem-open4-1.3.0-1.noarch.rpm
$ rpm -q --whatprovides rubygem-open4
rubygem-open4-1.3.0-1.noarch
$ rpm -q --whatprovides 'rubygem(open4)'
rubygem-open4-1.3.0-1.noarch
$ rpm --version
RPM version 4.8.0

Adding rubygem-open4 also as a provides (Same steps with modified fpm to add rubygem-foo
provides also) just result in duplicates.

$ rpm -qlp --provides rubygem-open4-1.3.0-1.noarch.rpm
rubygem-open4 = 1.3.0
rubygem(open4) = 1.3.0
rubygem-open4 = 1:1.3.0-1
---cut file list---
$ rpm -q --whatprovides rubygem-open4
rubygem-open4-1.3.0-1.noarch
rubygem-open4-1.3.0-1.noarch

Perhaps a problem when the gem is named something else (--gem-package-name-prefix) ? From the
code doesn't seem like rubygem(foo) or rubygem-foo provides is added in that case.

Or needed for older versions of rpm ?

Adding eam, /cc @eam

@r4um
Collaborator
r4um commented Jul 29, 2013

Closing, package created rubygem-foo automatically provides package rubygem-foo.

@r4um r4um closed this Jul 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.