Skip to content

Commit

Permalink
Remove code for creating local links in staged requests
Browse files Browse the repository at this point in the history
It is not defined how to proceed when a request with local links is
staged. Both options are possible:
- Create links from the target package.
- Create links from the source package.

Until this is defined we remove the code to create links from the target
package.

Fixes #8712 and fixes #8693.

Co-authored-by: David Kang <dkang@suse.com>
  • Loading branch information
eduardoj and DavidKang committed Nov 14, 2019
1 parent 4335708 commit 8d7ac36
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/api/app/models/staging/staged_requests.rb
Expand Up @@ -111,10 +111,6 @@ def link_package(bs_request_action)
source_package = Package.get_by_project_and_name!(bs_request_action.source_project,
bs_request_action.source_package)

# it is possible that target_package doesn't exist
target_package = Package.get_by_project_and_name(bs_request_action.target_project,
bs_request_action.target_package)

query_options = { expand: 1 }
query_options[:rev] = bs_request_action.source_rev if bs_request_action.source_rev

Expand All @@ -129,13 +125,6 @@ def link_package(bs_request_action)
create_link(staging_project.name, link_package.name, User.session!, project: source_package.project.name,
package: source_package.name, rev: package_rev,
vrev: source_vrev)
# for multispec packages, we have to create local links to the main package
if target_package.present?
target_package.find_project_local_linking_packages.each do |local_linking_package|
linked_package = Package.find_or_create_by!(project: staging_project, name: local_linking_package.name)
create_link(staging_project.name, linked_package.name, User.session!, package: target_package.name, cicount: 'copy')
end
end

ProjectLogEntry.create!(
project: staging_project,
Expand Down

0 comments on commit 8d7ac36

Please sign in to comment.