Hello community,

here is the log from the commit of package osc for openSUSE:Factory checked in 
at 2016-04-12 19:38:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/osc (Old)
 and      /work/SRC/openSUSE:Factory/.osc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "osc"

Changes:
--------
--- /work/SRC/openSUSE:Factory/osc/osc.changes  2016-04-11 10:26:31.000000000 
+0200
+++ /work/SRC/openSUSE:Factory/.osc.new/osc.changes     2016-04-12 
19:38:34.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Apr 11 08:50:29 UTC 2016 - adr...@suse.de
+
+- 0.154.0
+  - support for new obs_scm services (OBS 2.7 needed)
+  - show errors on branch failures again
+
+-------------------------------------------------------------------

Old:
----
  osc-0.153.0.tar.gz

New:
----
  osc-0.154.0.tar.gz

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

Other differences:
------------------
++++++ osc.spec ++++++
--- /var/tmp/diff_new_pack.VBSp58/_old  2016-04-12 19:38:35.000000000 +0200
+++ /var/tmp/diff_new_pack.VBSp58/_new  2016-04-12 19:38:35.000000000 +0200
@@ -16,8 +16,10 @@
 #
 
 
+%define version_unconverted 0.154.0
+
 Name:           osc
-Version:        0.153.0
+Version:        0.154.0
 Release:        0
 Summary:        Open Build Service Commander
 License:        GPL-2.0+

++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.VBSp58/_old  2016-04-12 19:38:35.000000000 +0200
+++ /var/tmp/diff_new_pack.VBSp58/_new  2016-04-12 19:38:35.000000000 +0200
@@ -1,5 +1,5 @@
 pkgname=osc
-pkgver=0.153.0
+pkgver=0.154.0
 pkgrel=0
 pkgdesc="Open Build Service client"
 arch=('i686' 'x86_64')

++++++ _service ++++++
--- /var/tmp/diff_new_pack.VBSp58/_old  2016-04-12 19:38:35.000000000 +0200
+++ /var/tmp/diff_new_pack.VBSp58/_new  2016-04-12 19:38:35.000000000 +0200
@@ -1,7 +1,7 @@
 <services>
   <service name="tar_scm" mode="disabled">
-    <param name="version">0.153.0</param>
-    <param name="revision">0.153.0</param>
+    <param name="version">0.154.0</param>
+    <param name="revision">0.154.0</param>
     <param name="url">git://github.com/openSUSE/osc.git</param>
     <param name="scm">git</param>
   </service>

++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.VBSp58/_old  2016-04-12 19:38:35.000000000 +0200
+++ /var/tmp/diff_new_pack.VBSp58/_new  2016-04-12 19:38:35.000000000 +0200
@@ -1,4 +1,4 @@
-osc (0.153.0) unstable; urgency=low
+osc (0.154.0) unstable; urgency=low
   - Update to 0.135.0
 
  -- Adrian Schroeter <adr...@suse.de>  Wed, 28 Jun 2012 10:00:00 +0200

++++++ osc-0.153.0.tar.gz -> osc-0.154.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.153.0/NEWS new/osc-0.154.0/NEWS
--- old/osc-0.153.0/NEWS        2016-03-04 08:38:36.000000000 +0100
+++ new/osc-0.154.0/NEWS        2016-04-11 10:49:56.000000000 +0200
@@ -1,3 +1,8 @@
+0.154
+  - switch to new obs_scm service when adding git URL's
+  - set OSC_VERSION environment for source services
+    (allows to work in local git checkouts when using obs_scm)
+
 0.153
   - "my sr" is using the server side request collection to get right results
   - maintenance request offers to supersede old, but still open requests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.153.0/osc/commandline.py 
new/osc-0.154.0/osc/commandline.py
--- old/osc-0.153.0/osc/commandline.py  2016-03-04 08:38:36.000000000 +0100
+++ new/osc-0.154.0/osc/commandline.py  2016-04-11 10:49:56.000000000 +0200
@@ -3160,7 +3160,7 @@
     @cmdln.alias('sm')
     @cmdln.alias('maintained')
     def do_mbranch(self, subcmd, opts, *args):
-        """${cmd_name}: Search or banch multiple instances of a package
+        """${cmd_name}: Search or branch multiple instances of a package
 
         This command is used for searching all relevant instances of packages
         and creating links of them in one project.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.153.0/osc/core.py new/osc-0.154.0/osc/core.py
--- old/osc-0.153.0/osc/core.py 2016-03-04 08:38:36.000000000 +0100
+++ new/osc-0.154.0/osc/core.py 2016-04-11 10:49:56.000000000 +0200
@@ -5,7 +5,7 @@
 
 from __future__ import print_function
 
-__version__ = '0.153.0'
+__version__ = '0.154.0'
 
 # __store_version__ is to be incremented when the format of the working copy
 # "store" changes in an incompatible way. Please add any needed migration
@@ -257,7 +257,7 @@
     """
     def __init__(self):
         """creates an empty serviceinfo instance"""
-        self.services = None
+        self.services = []
         self.project  = None
         self.package  = None
 
@@ -265,34 +265,36 @@
         """read in the source services <services> element passed as
         elementtree node.
         """
-        if serviceinfo_node == None:
+        def error(msg, xml):
+            data = 'invalid service format:\n%s' % ET.tostring(xml, 
encoding=ET_ENCODING)
+            raise ValueError("%s\n\n%s" % (data, msg))
+
+        if serviceinfo_node is None:
             return
-        if not append or self.services == None:
+        if not append:
             self.services = []
         services = serviceinfo_node.findall('service')
 
         for service in services:
             name = service.get('name')
             if len(name) < 3 or '/' in name:
-                raise oscerr.APIError("invalid service name")
-            mode = service.get('mode', None)
-            data = { 'name' : name, 'mode' : '' }
-            if mode:
-                data['mode'] = mode
-            try:
-                command = [ name ]
-                for param in service.findall('param'):
-                    option = param.get('name', None)
-                    value = ""
-                    if param.text:
-                        value = param.text
-                    command.append("--"+option)
-                    command.append(value)
-                data['command'] = command
-                self.services.append(data)
-            except:
-                msg = 'invalid service format:\n%s' % 
ET.tostring(serviceinfo_node, encoding=ET_ENCODING)
-                raise oscerr.APIError(msg)
+                error("invalid service name: %s" % name, service)
+            mode = service.get('mode', '')
+            data = { 'name' : name, 'mode' : mode }
+            command = [ name ]
+            for param in service.findall('param'):
+                option = param.get('name')
+                if option is None:
+                    error("%s: a parameter requires a name" % name, service)
+                value = ''
+                if param.text:
+                    value = param.text
+                command.append('--' + option)
+                # hmm is this reasonable or do we want to allow real
+                # options (e.g., "--force" (without an argument)) as well?
+                command.append(value)
+            data['command'] = command
+            self.services.append(data)
 
     def getProjectGlobalServices(self, apiurl, project, package):
         # get all project wide services in one file, we don't store it yet
@@ -341,21 +343,27 @@
 
     def addSetVersion(self, serviceinfo_node):
         r = serviceinfo_node
-        s = ET.Element( "service", name="set_version" )
+        s = ET.Element( "service", name="set_version", mode="buildtime" )
         r.append( s )
         return r
 
     def addGitUrl(self, serviceinfo_node, url_string):
         r = serviceinfo_node
-        s = ET.Element( "service", name="tar_scm" )
+        s = ET.Element( "service", name="obs_scm" )
         ET.SubElement(s, "param", name="url").text = url_string
         ET.SubElement(s, "param", name="scm").text = "git"
         r.append( s )
         return r
 
+    def addTarUp(self, serviceinfo_node):
+        r = serviceinfo_node
+        s = ET.Element( "service", name="tar", mode="buildtime" )
+        r.append( s )
+        return r
+
     def addRecompressTar(self, serviceinfo_node):
         r = serviceinfo_node
-        s = ET.Element( "service", name="recompress" )
+        s = ET.Element( "service", name="recompress", mode="buildtime" )
         ET.SubElement(s, "param", name="file").text = "*.tar"
         ET.SubElement(s, "param", name="compression").text = "xz"
         r.append( s )
@@ -379,6 +387,9 @@
             data = { 'name' : singleservice, 'command' : [ singleservice ], 
'mode' : '' }
             allservices = [data]
 
+        # services can detect that they run via osc this way
+        os.putenv("OSC_VERSION", get_osc_version())
+
         # set environment when using OBS 2.3 or later
         if self.project != None:
             os.putenv("OBS_SERVICE_PROJECT", self.project)
@@ -401,7 +412,7 @@
                 continue
             temp_dir = None
             try:
-                temp_dir = tempfile.mkdtemp()
+                temp_dir = tempfile.mkdtemp(dir=dir, suffix='.%s.service' % 
service['name'])
                 cmd = service['command']
                 if not os.path.exists("/usr/lib/obs/service/"+cmd[0]):
                     raise oscerr.PackageNotInstalled("obs-service-%s"%cmd[0])
@@ -419,11 +430,11 @@
 
                 if service['mode'] == "disabled" or service['mode'] == 
"trylocal" or service['mode'] == "localonly" or callmode == "local" or callmode 
== "trylocal":
                     for filename in os.listdir(temp_dir):
-                        shutil.move( os.path.join(temp_dir, filename), 
os.path.join(dir, filename) )
+                        os.rename(os.path.join(temp_dir, filename), 
os.path.join(dir, filename))
                 else:
                     name = service['name']
                     for filename in os.listdir(temp_dir):
-                        shutil.move( os.path.join(temp_dir, filename), 
os.path.join(dir, "_service:"+name+":"+filename) )
+                        os.rename(os.path.join(temp_dir, filename), 
os.path.join(dir, "_service:"+name+":"+filename))
             finally:
                 if temp_dir is not None:
                     shutil.rmtree(temp_dir)
@@ -5073,11 +5084,11 @@
         if missingok:
            if root and root.get('code') == "not_missing":
               raise oscerr.NotMissing("Package exists already via project 
link, but link will point to given project")
-        if not return_existing:
-            raise
         summary = root.find('summary')
         if summary is None:
             raise oscerr.APIError('unexpected response:\n%s' % 
ET.tostring(root, encoding=ET_ENCODING))
+        if not return_existing:
+            raise oscerr.APIError('failed to branch: %s' % summary.text)
         m = re.match(r"branch target package already exists: (\S+)/(\S+)", 
summary.text)
         if not m:
             e.msg += '\n' + summary.text
@@ -6639,6 +6650,7 @@
     stripETxml( services )
     si = Serviceinfo()
     s = si.addGitUrl(services, url)
+    s = si.addTarUp(services)
     s = si.addRecompressTar(services)
     s = si.addSetVersion(services)
     si.read(s)

++++++ osc.dsc ++++++
--- /var/tmp/diff_new_pack.VBSp58/_old  2016-04-12 19:38:35.000000000 +0200
+++ /var/tmp/diff_new_pack.VBSp58/_new  2016-04-12 19:38:35.000000000 +0200
@@ -1,6 +1,6 @@
 Format: 1.0
 Source: osc
-Version: 0.153.0
+Version: 0.154.0
 Binary: osc
 Maintainer: Adrian Schroeter <adr...@suse.de>
 Architecture: any


Reply via email to