Project

General

Profile

Bug #27729

hammer repository upload content failing on rpm uploads

Added by Partha Aji about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer
Target version:
Difficulty:
easy
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

$ hammer -d repository upload-content --id=245 --path ./walrus-5.21-1.noarch.rpm

....
<NameError> undefined local variable or method `option_content_type' for #<HammerCLIKatello::Repository::UploadContentCommand:0x00000000042ded40>
Did you mean?  option_content
               option_content=
               @option_content
    /home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/repository.rb:449:in `import_uploads'
    /home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/repository.rb:395:in `upload_file'
    /home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/repository.rb:339:in `block (2 levels) in execute'
    /home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/repository.rb:339:in `open'
    /home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/repository.rb:339:in `block in execute'
    /home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/repository.rb:337:in `each'
    /home/vagrant/hammer-cli-katello/lib/hammer_cli_katello/repository.rb:337:in `execute'
    /home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /home/vagrant/.gem/ruby/gems/hammer_cli-0.17.1/lib/hammer_cli/abstract.rb:69:in `run'
    /home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /home/vagrant/.gem/ruby/gems/hammer_cli-0.17.1/lib/hammer_cli/abstract.rb:69:in `run'
    /home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /home/vagrant/.gem/ruby/gems/hammer_cli-0.17.1/lib/hammer_cli/abstract.rb:69:in `run'
    /home/vagrant/.gem/ruby/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
    /home/vagrant/.gem/ruby/gems/hammer_cli-0.17.1/bin/hammer:147:in `<top (required)>'
    /home/vagrant/.gem/ruby/bin/hammer:23:in `load'
    /home/vagrant/.gem/ruby/bin/hammer:23:in `<main>'
....

Unintended side effect of https://projects.theforeman.org/issues/26135

Associated revisions

Revision d4a88c8a (diff)
Added by Partha Aji about 1 year ago

Fixes #27729 - Upload rpm without --content-type (#690)

hammer repository upload-content --id=245 --path ./t.rpm
This command failed with
`undefined local variable or method `option_content_type`

This commit addresses this issue

History

#1 Updated by The Foreman Bot about 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/690 added

#2 Updated by Partha Aji about 1 year ago

  • Status changed from Ready For Testing to Closed

#3 Updated by Chris Roberts about 1 year ago

  • Target version set to Katello 3.13.0
  • Found in Releases Katello 3.12.3 added

#4 Updated by Jonathon Turel about 1 year ago

  • Triaged changed from No to Yes

Also available in: Atom PDF