Skip to content

Commit

Permalink
[api] need to check given md5sum against srcmd5 and verifymd5
Browse files Browse the repository at this point in the history
to be on the safe side, we check for both
  • Loading branch information
coolo committed Jul 27, 2013
1 parent 94c84a2 commit f7c6ef4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/app/models/package.rb
Expand Up @@ -1130,7 +1130,7 @@ def buildstatus(opts)
code: 'lastfailures')
next if hist.nil?
hist.elements('jobhist') do |jh|
if jh['verifymd5'] == srcmd5
if jh['verifymd5'] == srcmd5 || jh['srcmd5'] == srcmd5
everbuilt = true
end
end
Expand All @@ -1146,7 +1146,7 @@ def buildstatus(opts)

# going through the job history to check if it built and if yes, succeeded
hist.elements('jobhist') do |jh|
next unless jh['verifymd5'] == srcmd5
next unless jh['verifymd5'] == srcmd5 || jh['srcmd5'] == srcmd5
everbuilt = true
if jh['code'] == 'succeeded' || jh['code'] == 'unchanged'
buildcode ='succeeded'
Expand Down

0 comments on commit f7c6ef4

Please sign in to comment.