Skip to content

Commit

Permalink
[api] disable acceptinfo for release request until we clarified how t…
Browse files Browse the repository at this point in the history
…o deal with old revision
  • Loading branch information
adrianschroeter committed Apr 17, 2014
1 parent d05b210 commit 2f0f5a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/api/app/helpers/maintenance_helper.rb
Expand Up @@ -177,7 +177,8 @@ def release_package_copy_sources(action, sourcePackage, targetPackageName, targe
cp_path << Suse::Backend.build_query_from_hash(cp_params, [:cmd, :user, :oproject, :opackage, :comment, :requestid, :expand, :withvrev, :noservice, :withacceptinfo])
result = Suse::Backend.post cp_path, nil
result = Xmlhash.parse(result.body)
action.set_acceptinfo(result["acceptinfo"]) if action
# further discussion is needed from where we take the origin source revision on maintenance release
# action.set_acceptinfo(result["acceptinfo"]) if action
end

def copy_binaries(filterSourceRepository, sourcePackage, targetPackageName, targetProject, setrelease)
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/mixins/submit_request_source_diff.rb
Expand Up @@ -107,7 +107,7 @@ def find_target_pkg
def overwrite_target_by_link(spkg)
# the target is by default the _link target
# maintenance_release creates new packages instance, but are changing the source only according to the link
return unless !action.target_package or [:maintenance_incident].include? action.action_type
return unless !action.target_package or [:maintenance_incident, :maintenance_release].include? action.action_type
data = Xmlhash.parse(ActiveXML.backend.direct_http(URI("/source/#{URI.escape(action.source_project)}/#{URI.escape(spkg)}")))
e = data['linkinfo']
return unless e
Expand Down
8 changes: 4 additions & 4 deletions src/api/test/functional/maintenance_test.rb
Expand Up @@ -573,10 +573,10 @@ def test_mbranch_and_maintenance_per_package_request
get "/request/#{reqid}"
assert_response :success
# check for acceptinfo
assert_xml_tag :parent => { :tag => 'action', :attributes => { :type=> 'maintenance_release'} },
:tag => 'source', :attributes => { :project=> 'My:Maintenance:0', :package=> 'pack2.BaseDistro3'},
:tag => 'target', :attributes => { :project=> 'BaseDistro3', :package=> 'pack2.0'},
:tag => 'acceptinfo', :attributes => { :rev=> '1', :srcmd5=> 'd4009ce72631596f0b7f691e615cfe2c', :osrcmd5 => "d41d8cd98f00b204e9800998ecf8427e" }
# assert_xml_tag :parent => { :tag => 'action', :attributes => { :type=> 'maintenance_release'} },
# :tag => 'source', :attributes => { :project=> 'My:Maintenance:0', :package=> 'pack2.BaseDistro3'},
# :tag => 'target', :attributes => { :project=> 'BaseDistro3', :package=> 'pack2.0'},
# :tag => 'acceptinfo', :attributes => { :rev=> '1', :srcmd5=> 'd4009ce72631596f0b7f691e615cfe2c', :osrcmd5 => "d41d8cd98f00b204e9800998ecf8427e" }

# diffing works
post "/request/#{reqid}?cmd=diff&view=xml", nil
Expand Down

0 comments on commit 2f0f5a2

Please sign in to comment.