DXLTTC-785 First SR acceptance problem. 66/138366/1
authorYonghee Han <onstudy@samsung.com>
Wed, 12 Jul 2017 02:43:46 +0000 (11:43 +0900)
committerYonghee Han <onstudy@samsung.com>
Wed, 12 Jul 2017 02:44:08 +0000 (11:44 +0900)
PROBLEM : If you have a linked package when you first accept it, it will be added to linked package.

SOLUTION : First, create initial package and will be added to SR package.

Change-Id: I21ee6a4beccd9953f8503f789bdad49502da25e4

job_repa.py

index e95e4c4..21cf78f 100644 (file)
@@ -108,6 +108,14 @@ def accept_or_reject(build, prerelease_proj, git_tag, state, comment=''):
         if not is_aggregate_package(build, prerelease_proj, p):
             source_packages.append(p)
 
+    # If source_packages is not exists in target_prj
+    # create a package in target_prj
+    if state == 'accepted':
+        org_target_packages=build.get_package_list(target_prj)
+        for package in source_packages:
+            if not package in org_target_packages:
+                build.create_package(target_prj, package)
+
     reqid = build.create_sr(prerelease_proj, source_packages,
                           target_prj, message=message)