Bug 772882

Summary: uploading task with duplicate requires fails
Product: [Retired] Beaker Reporter: Jan Stancek <jstancek>
Component: schedulerAssignee: Yang Ren <ryang>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.8CC: bpeck, dcallagh, gozen, jburke, mcsontos, mgrigull, pbunyan, rmancy, stl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-13 23:55:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jan Stancek 2012-01-10 08:31:32 UTC
Description of problem:
When new version of task introduces duplicate "Requires", upload to beaker fails with 500 Internal error in WEBUI is used. If "bkradd" is used it ends with:
Exception: <Fault 1: "<class 'bkr.common.bexceptions.BX'>:u'Cannot import duplicate task tmp-scratch-jstancek2-1.0-6.noarch.rpm'">

Version-Release number of selected component (if applicable):
0.8

How reproducible:
100%

Steps to Reproduce:
1. add duplicate "Requires" to task, for example:
+       @echo "Requires:     rusers" >> $(METADATA)
+       @echo "Requires:     rusers" >> $(METADATA)
2. upload modified task to beaker
3. upload fails -> PROBLEM

Actual results:
fails with no clue what happened,
new rpm can be found at /rpms, but task record is not updated

Expected results:
upload works without issues or fails and gives more useful message

Additional info:
It seems to work if you add duplicate requires separately.
1. add one, upload to beaker
2. add another, upload to beaker