Skip to content

.deb control file broken by Provides param in FPM 0.4.20 #280

Closed
adamgibbins opened this Issue Oct 22, 2012 · 5 comments

4 participants

@adamgibbins

0.4.20 generates a control file like so:

Package: rubygem-builder
Version: 3.1.4
License: MIT
Vendor: Jim Weirich
Architecture: all
Maintainer: <agibbins@ldn-dev-agibbins>
Installed-Size: 104
#Pre-Depends: 
Provides: rubygem-builder = 3.1.4
Section: Languages/Development/Ruby
Priority: extra
Homepage: http://onestepback.org
Description: Builder provides a number of builder objects that make creating structured data
 simple to do.  Currently the following builder objects are supported:
 .
 * XML Markup
 * XML Events

This throws an error such as "E: Problem parsing Provides line" when trying to use the package.

The package generated by 0.4.19 (without the version number in the provides line) works fine. I believe you need to wrap most version numbers in brackets? e.g. "Provides: rubygem-builder (= 3.1.4)" although I haven't confirmed this.

@zllak
zllak commented Oct 25, 2012

I came across the same problem. The bug has been introduced in c3fcb81.
This syntax = does not seems to be valid in a Debian package.

The debian policy manual (http://www.debian.org/doc/debian-policy/ch-relationships.html) does not specify if a version can be given in the 'Provides' field.

This is a pretty severe regression, as with fpm 0.4.20, we can't create any debian package from a ruby gem.

@duggan
duggan commented Oct 26, 2012

Specifically it says:

"A Provides field may not contain version numbers, and the version number of the concrete package which provides a particular virtual package will not be considered when considering a dependency on or conflict with the virtual package name."

@zllak
zllak commented Oct 26, 2012

Nice for spotting this, I was reading it really too fast.
So, here, I'll let Jordan take a decision, cause if we just revert the commit, the bug will appear again in rpms, and if we let it, deb packages are broken.
We would need something that can be override in both rpm.rb or deb.rb, and not let the gem.rb file decide.

Any idea?

@jordansissel
Owner

the 'gem' package should have no knowledge about 'deb' packages, so the gem package is doing it correctly (making the provides simply 'foo = 1234' the deb or rpm packages are expected to convert this to a 'native' format later, clearly deb does not here for this field ;)

@zllak
zllak commented Oct 26, 2012

Sorry if I was not very clear, that was my point actually :)
I will try this week end to make something for the .deb format, to simply replace the 'Provides' field with the package name.

@prof-milki prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 18, 2014
jls - deb provides don't support versions (#280) 26b11cd
@prof-milki prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 18, 2014
jls - fix #280 and hae a test verify it. 0871170
@prof-milki prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 27, 2014
@jordansissel - deb provides don't support versions (#280) 340307e
@prof-milki prof-milki pushed a commit to prof-milki/xpm that referenced this issue Dec 27, 2014
@jordansissel - fix #280 and hae a test verify it. c2fe3f0
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.