Skip to content

Commit

Permalink
Fixes #38035 - fix hammer upload existing deb
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bucher committed Nov 21, 2024
1 parent 8201a7a commit 0c39761
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion app/lib/actions/pulp3/orchestration/repository/import_upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,22 @@ def plan(repository, smart_proxy, args)
plan_action(Pulp3::Repository::SaveVersion, repository, {force_fetch_version: true, tasks: tag_manifest_output[:pulp_tasks]})
else
if content_unit_href
artifact_output = { :content_unit_href => content_unit_href }
commit_output = {}
if repository.deb?
# find artifact-href
content_backend_service = smart_proxy.content_service('deb')
artifact_href = content_backend_service.content_api.read(content_unit_href).artifact

artifact_output = plan_action(Pulp3::Repository::SaveArtifact,
file,
repository,
smart_proxy,
nil,
args.dig(:unit_type_id),
args.merge({artifact_href: artifact_href})).output
else
artifact_output = { :content_unit_href => content_unit_href }
end
else
commit_output = plan_action(Pulp3::Repository::CommitUpload,
repository,
Expand Down

0 comments on commit 0c39761

Please sign in to comment.