dnbert / prm

PRM Allows you to quickly build package repositories, inspired by Jordan Sissels' FPM
MIT License
250 stars 33 forks source link

with rpm - no implicit conversion of String into Integer #48

Closed trel closed 8 years ago

trel commented 8 years ago

This could be user error - I'm just getting started with prm.

I've got the deb side of the house working (using -d), but have not yet been successful with an rpm file.

[dltest]$ ruby --version
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]

[dltest]$ ls
bind-utils-9.8.2-0.37.rc1.el6_7.2.x86_64.rpm

[dltest]$ prm -t rpm -a x86_64 -r centos6 -p pool
/home/trel/.rvm/gems/ruby-2.2.1/gems/prm-0.2.12/lib/prm/rpm.rb:116:in `initialize': no implicit conversion of String into Integer (TypeError)
        from /home/trel/.rvm/gems/ruby-2.2.1/gems/prm-0.2.12/lib/prm/rpm.rb:116:in `open'
        from /home/trel/.rvm/gems/ruby-2.2.1/gems/prm-0.2.12/lib/prm/rpm.rb:116:in `block (2 levels) in build_rpm_repo'
        from /home/trel/.rvm/gems/ruby-2.2.1/gems/peach-0.5.1/lib/peach.rb:22:in `block (2 levels) in peach'
        from /home/trel/.rvm/gems/ruby-2.2.1/gems/peach-0.5.1/lib/peach.rb:22:in `each'
        from /home/trel/.rvm/gems/ruby-2.2.1/gems/peach-0.5.1/lib/peach.rb:22:in `block in peach'
        from /home/trel/.rvm/gems/ruby-2.2.1/gems/peach-0.5.1/lib/peach.rb:13:in `block (2 levels) in _peach_run'

Without the -d option (#38), is this the correct usage? The RPM file must be in the pwd?

dnbert commented 8 years ago

Doesn't look like the templates directory is getting passed to the library! I'm working on a patch now, then I'll upload to rubygems!

dnbert commented 8 years ago

https://github.com/dnbert/prm/commit/b432ac94047f61230efaef01276c08ca1c3475d7 should fix it! Looks like I was being a bit lazy with my File options. I haven't been using the RPM feature set much, please let me know if you find other bugs