Revert "Use the OBS_package name on Staging OBS project If a obs package has one... 76/117876/2
authorYonghee Han <onstudy@samsung.com>
Wed, 8 Mar 2017 02:06:29 +0000 (18:06 -0800)
committerYonghee Han <onstudy@samsung.com>
Wed, 8 Mar 2017 02:14:12 +0000 (18:14 -0800)
This reverts commit 3de9b73de25d8a44eebec86aa196dabf86a98e42.

Change-Id: I50c8ace327eb7afe388372ca6dfb648f6e783a2a

job_submitobs.py

index fb5981b..3c8cfb1 100755 (executable)
@@ -455,15 +455,9 @@ def main():
                 url = 'ssh://%s:%s' % (os.getenv('GERRIT_HOSTNAME'),
                                     os.getenv('GERRIT_SSHPORT'))
                 gerrit_project = os.getenv('GERRIT_PROJECT')
-                # get package name from xml files.
-                if obs_pkg:
-                   package = obs_pkg
-                else:
-                   #get package name from spec file name.
-                   package = spec.name
                 # create local package
-                print '\nCheckout %s/%s to local' % (obs_stg_prj, package)
-                localpkg = obspkg.ObsPackage(tmpdir, obs_stg_prj, package, \
+                print '\nCheckout %s/%s to local' % (obs_stg_prj, spec.name)
+                localpkg = obspkg.ObsPackage(tmpdir, obs_stg_prj, spec.name, \
                         apiurl, apiuser, apipasswd)
                 commit_msg = 'Submitter: %s <%s>\nComments: %s\nGit project: '\
                         '%s\nTag: %s\nCommit: %s %s' % (tagger['author'], \
@@ -472,7 +466,7 @@ def main():
                 # upload _service to obs
                 try:
                     upload_obs_service(url, gerrit_project, tag,
-                            event['newrev'], obs_stg_prj, build, package)
+                            event['newrev'], obs_stg_prj, build, spec.name)
                 except UploadError, err:
                     print err
                     return 1