Skip to content

Commit

Permalink
[api] fix handling of packages containing special chars in maintenanc…
Browse files Browse the repository at this point in the history
…e release

Conflicts:
	src/api/test/unit/code_quality_test.rb
  • Loading branch information
adrianschroeter committed Mar 4, 2015
1 parent 503cecf commit 5c23dea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/api/app/models/bs_request_action.rb
Expand Up @@ -515,15 +515,15 @@ def create_expand_package(packages, opts = {})
data = Directory.hashed(project: tprj.name, package: ltpkg)
e = data['linkinfo']
if e
suffix = ltpkg.gsub(/^#{e['package']}/, '')
suffix = ltpkg.gsub(/^#{Regexp.escape(e['package'])}/, '')
ltpkg = e['package']
tprj = Project.get_by_name(e['project'])
missing_ok_link=true if e['missingok']
else
tprj = nil
end
end
tpkg = tpkg.gsub(/#{suffix}$/, '') # strip distro specific extension
tpkg = tpkg.gsub(/#{Regexp.escape(suffix)}$/, '') # strip distro specific extension
tpkg = self.target_package if self.target_package # already given

# maintenance incident actions need a releasetarget
Expand Down
4 changes: 2 additions & 2 deletions src/api/test/unit/code_quality_test.rb
Expand Up @@ -77,8 +77,8 @@ def setup
'BsRequest#apply_default_reviewers' => 129.52,
'BsRequest#webui_actions' => 130.13,
'BsRequest::new_from_xml' => 113.77,
'BsRequestAction#check_action_permission!' => 232.82,
'BsRequestAction#create_expand_package' => 291.31,
'BsRequestAction#check_action_permission!' => 247.43,
'BsRequestAction#create_expand_package' => 422.78,
'BsRequestAction#default_reviewers' => 141.02,
'BsRequestAction#store_from_xml' => 88.01,
'BsRequestActionMaintenanceIncident#merge_into_maintenance_incident' => 166.26,
Expand Down

0 comments on commit 5c23dea

Please sign in to comment.