New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bandaid fix for Issue #316 #325

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@rtucker-mozilla

rtucker-mozilla commented Jan 2, 2013

Bandaid fix for Issue #316

/usr/lib64/ruby/gems/1.9.1/gems/fpm-0.4.25/lib/fpm/package/rpm.rb:190:in input': undefined methoddirectories' for #RPM::File:0x00000000b05068 (NoMethodError)

Added an exception block to catch NoMethodError

Perhaps the rescue statement should actually do something here?

@@ -187,7 +187,11 @@ def input(path)
#input.replaces += replaces
self.config_files += rpm.config_files
self.directories += rpm.directories
begin
self.directories += rpm.directories

This comment has been minimized.

@jordansissel

jordansissel Jan 2, 2013

Owner

this isn't the right fix, as you admit ;)

RPM::File doesn't even have a .directories method, though it has a config_files one. I"ll see about finding the right thing.

This comment has been minimized.

@rtucker-mozilla

rtucker-mozilla Jan 2, 2013

Agreed.

I wasn't sure of some planning that perhaps .directories would get added at some point, in which case this could actually do something, or if I was missing something else all together.

Thanks for taking the time to review this

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Jan 2, 2013

I think the most immediate fix should be to just comment out the rpm.directories line and make a TODO for using it again once RPM::File supports it.

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Jan 2, 2013

Did some digging using the fedora 17 mysql-server rpm

This rpm declares in the %files server section: %dir /var/run/mysqld

I can find no rpm tag that describes this feature (labelling something a %dir), so I assume it is just a hint to package the directory itself, not the contents, so it would only show up in the rpm. It's possible we could emulate this by searching the cpio for empty directories, but I'll wait until someone asks for that feature.

For now, I will simply comment it out with a todo! Thanks for finding this bug :0

1 similar comment
@jordansissel

This comment has been minimized.

Owner

jordansissel commented Jan 2, 2013

Did some digging using the fedora 17 mysql-server rpm

This rpm declares in the %files server section: %dir /var/run/mysqld

I can find no rpm tag that describes this feature (labelling something a %dir), so I assume it is just a hint to package the directory itself, not the contents, so it would only show up in the rpm. It's possible we could emulate this by searching the cpio for empty directories, but I'll wait until someone asks for that feature.

For now, I will simply comment it out with a todo! Thanks for finding this bug :0

@rtucker-mozilla

This comment has been minimized.

rtucker-mozilla commented Jan 2, 2013

Glad that I could help. Keep up the great work, fpm rocks!

jordansissel added a commit that referenced this pull request Jan 2, 2013

- There is no RPM::File#directories method, plus it seems like rpm
  doesn't even record the "%dir" data, instead it just packages an empty
  directory into the cpio.

  fixes #316, based on #325 (patch by rtucker-mozilla)

prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 18, 2014

jls
- There is no RPM::File#directories method, plus it seems like rpm
  doesn't even record the "%dir" data, instead it just packages an empty
  directory into the cpio.

  fixes jordansissel#316, based on jordansissel#325 (patch by rtucker-mozilla)

prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 27, 2014

- There is no RPM::File#directories method, plus it seems like rpm
  doesn't even record the "%dir" data, instead it just packages an empty
  directory into the cpio.

  fixes jordansissel#316, based on jordansissel#325 (patch by rtucker-mozilla)

jordansissel added a commit that referenced this pull request Apr 24, 2015

- There is no RPM::File#directories method, plus it seems like rpm
  doesn't even record the "%dir" data, instead it just packages an empty
  directory into the cpio.

  fixes #316, based on #325 (patch by rtucker-mozilla)

jordansissel added a commit that referenced this pull request Jun 20, 2016

- There is no RPM::File#directories method, plus it seems like rpm
  doesn't even record the "%dir" data, instead it just packages an empty
  directory into the cpio.

  fixes #316, based on #325 (patch by rtucker-mozilla)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment