Hello community,

here is the log from the commit of package openSUSE-release-tools for 
openSUSE:Factory checked in at 2018-01-10 23:37:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old)
 and      /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openSUSE-release-tools"

Wed Jan 10 23:37:08 2018 rev:39 rq:563156 version:20180109.2b037a0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes
    2018-01-06 18:50:58.670217330 +0100
+++ 
/work/SRC/openSUSE:Factory/.openSUSE-release-tools.new/openSUSE-release-tools.changes
       2018-01-10 23:37:12.662271906 +0100
@@ -1,0 +2,7 @@
+Tue Jan 09 22:19:39 UTC 2018 - [email protected]
+
+- Update to version 20180109.2b037a0:
+  * osclib/conf: allow devel projects to utilize tools that require conf.
+  * osclib/conf: order config defaults by priority.
+
+-------------------------------------------------------------------

Old:
----
  openSUSE-release-tools-20180105.7eaed34.obscpio

New:
----
  openSUSE-release-tools-20180109.2b037a0.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ openSUSE-release-tools.spec ++++++
--- /var/tmp/diff_new_pack.n66zbm/_old  2018-01-10 23:37:14.930165503 +0100
+++ /var/tmp/diff_new_pack.n66zbm/_new  2018-01-10 23:37:14.930165503 +0100
@@ -20,7 +20,7 @@
 %define source_dir osc-plugin-factory
 %define announcer_filename factory-package-news
 Name:           openSUSE-release-tools
-Version:        20180105.7eaed34
+Version:        20180109.2b037a0
 Release:        0
 Summary:        Tools to aid in staging and release work for openSUSE/SUSE
 License:        GPL-2.0+ and MIT

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.n66zbm/_old  2018-01-10 23:37:14.966163814 +0100
+++ /var/tmp/diff_new_pack.n66zbm/_new  2018-01-10 23:37:14.966163814 +0100
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param 
name="url">https://github.com/openSUSE/osc-plugin-factory.git</param>
-    <param 
name="changesrevision">7eaed349b38ed3e482f543abb717390b5d6b9afe</param>
+    <param 
name="changesrevision">61c83500d3ca8a21b772fc1100437411a8643a71</param>
   </service>
 </servicedata>

++++++ openSUSE-release-tools-20180105.7eaed34.obscpio -> 
openSUSE-release-tools-20180109.2b037a0.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180105.7eaed34/osclib/conf.py 
new/openSUSE-release-tools-20180109.2b037a0/osclib/conf.py
--- old/openSUSE-release-tools-20180105.7eaed34/osclib/conf.py  2018-01-05 
09:42:32.000000000 +0100
+++ new/openSUSE-release-tools-20180109.2b037a0/osclib/conf.py  2018-01-09 
23:12:11.000000000 +0100
@@ -15,6 +15,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 from ConfigParser import ConfigParser
+from collections import OrderedDict
 import io
 import os
 import operator
@@ -108,6 +109,26 @@
         'remote-config': False,
         'delreq-review': None,
         'main-repo': 'standard',
+        'priority': 100, # Lower than SLE-15 since less specific.
+    },
+    # Allows devel projects to utilize tools that require config, but not
+    # complete StagingAPI support.
+    r'(?P<project>.*$)': {
+        'staging': '%(project)s', # Allows for dashboard/config if desired.
+        'staging-group': None,
+        'staging-archs': '',
+        'staging-dvd-archs': '',
+        'rings': None,
+        'nonfree': None,
+        'rebuild': None,
+        'product': None,
+        'openqa': None,
+        'lock': None,
+        'lock-ns': None,
+        'delreq-review': None,
+        'main-repo': 'openSUSE_Factory',
+        'remote-config': False,
+        'priority': 1000, # Lowest priority as only a fallback.
     },
 }
 
@@ -144,7 +165,8 @@
     def populate_conf(self):
         """Add sane default into the configuration."""
         defaults = {}
-        for prj_pattern in DEFAULT:
+        default_ordered = OrderedDict(sorted(DEFAULT.items(), key=lambda i: 
i[1].get('priority', 99)))
+        for prj_pattern in default_ordered:
             match = re.match(prj_pattern, self.project)
             if match:
                 project = match.group('project')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180105.7eaed34/tests/config_tests.py 
new/openSUSE-release-tools-20180109.2b037a0/tests/config_tests.py
--- old/openSUSE-release-tools-20180105.7eaed34/tests/config_tests.py   
2018-01-05 09:42:32.000000000 +0100
+++ new/openSUSE-release-tools-20180109.2b037a0/tests/config_tests.py   
2018-01-09 23:12:11.000000000 +0100
@@ -1,5 +1,6 @@
 import unittest
 from osc import conf
+from osclib.conf import DEFAULT
 from osclib.conf import Config
 from osclib.stagingapi import StagingAPI
 
@@ -32,3 +33,25 @@
         self.config.apply_remote(self.api)
         # Ensure blank file not overridden.
         self.assertEqual(self.obs.dashboard_counts['config'], 1)
+
+    def test_pattern_order(self):
+        # Add pattern to defaults in order to identify which was matched.
+        for pattern in DEFAULT:
+            DEFAULT[pattern]['pattern'] = pattern
+
+        # A list of projects that should match each of the DEFAULT patterns.
+        projects = (
+            'openSUSE:Factory',
+            'openSUSE:Leap:15.0',
+            'SUSE:SLE-15:GA',
+            'SUSE:SLE-12:GA',
+            'GNOME:Factory',
+        )
+
+        # Ensure each pattern is match instead of catch-all pattern.
+        patterns = set()
+        for project in projects:
+            config = Config(project)
+            patterns.add(conf.config[project]['pattern'])
+
+        self.assertEqual(len(patterns), len(DEFAULT))

++++++ openSUSE-release-tools.obsinfo ++++++
--- /var/tmp/diff_new_pack.n66zbm/_old  2018-01-10 23:37:15.658131349 +0100
+++ /var/tmp/diff_new_pack.n66zbm/_new  2018-01-10 23:37:15.658131349 +0100
@@ -1,5 +1,5 @@
 name: openSUSE-release-tools
-version: 20180105.7eaed34
-mtime: 1515141752
-commit: 7eaed349b38ed3e482f543abb717390b5d6b9afe
+version: 20180109.2b037a0
+mtime: 1515535931
+commit: 2b037a0b81785cb07643773266c70df03d209710
 


Reply via email to