Bandaid fix for Issue #316 #325

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

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
@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.

@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

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.

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

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

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

- 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 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 #316, based on #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