GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
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)
input': undefined method
Added an exception block to catch NoMethodError
Perhaps the rescue statement should actually do something here?
Bandaid fix for Issue #316. Without digging too deep into commmit a88…
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.
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
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.
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!
- 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)