Change the filter regular of generating snapshot.
authorZhuoX Li <zhuox.li@intel.com>
Fri, 23 May 2014 05:56:57 +0000 (13:56 +0800)
committerLin Yang <lin.a.yang@intel.com>
Thu, 5 Jun 2014 04:08:03 +0000 (12:08 +0800)
When some targets of OBS project are disabled, we should create
snapshot/prerelease repos.

Change-Id: I7f79f2a45a7a346362611a84e36a2eafde14332f
Fixes: #1908

job_create_snapshot.py
job_pre_release_obs.py

index 9dc34e7..efc5baa 100755 (executable)
@@ -158,7 +158,7 @@ def main():
     # them not published
     repo_status = build.get_repo_state(project)
     for target_arch, status in repo_status.items():
-        if status != 'published':
+        if status not in ['published', 'unpublished']:
             print "The project: %s target: %s repo isn't published yet" \
                   % (project, target_arch)
 
index d6b6a2b..b95dae3 100755 (executable)
@@ -244,7 +244,7 @@ def main(action):
         # them not published
         repo_status = build.get_repo_state(project)
         for target_arch, status in repo_status.items():
-            if status != 'published':
+            if status not in ['published', 'unpublished']:
                 print "Skipping prerelease repository creation as OBS "\
                       "repository: %s/%s/%s is't published yet." \
                       % (project, repo, target_arch)