Hello community,

here is the log from the commit of package obs-service-tar_scm for 
openSUSE:Factory checked in at 2017-06-16 10:54:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-tar_scm (Old)
 and      /work/SRC/openSUSE:Factory/.obs-service-tar_scm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "obs-service-tar_scm"

Fri Jun 16 10:54:16 2017 rev:42 rq:503658 version:0.7.0.1496831936.d960322

Changes:
--------
--- /work/SRC/openSUSE:Factory/obs-service-tar_scm/obs-service-tar_scm.changes  
2017-05-16 14:45:44.762148253 +0200
+++ 
/work/SRC/openSUSE:Factory/.obs-service-tar_scm.new/obs-service-tar_scm.changes 
    2017-06-16 10:54:17.731619562 +0200
@@ -1,0 +2,19 @@
+Wed Jun 07 10:40:27 UTC 2017 - adr...@suse.de
+
+- Update to version 0.7.0.1496831936.d960322:
+  * fix for nonexistant build section in appimage.yml
+  * [lint] improve inline doc in TarSCM/tasks.py
+  * [lint] refactor attribute dataMap in TarSCM.tasks
+  * [lint] refactor invalid variable names in TarSCM.tasks
+  * [lint] remove variable helpers from TarSCM.tasks
+  * [lint] rename variable changes -> detected_changes in TarSCM.tasks
+  * [lint] fixed 'line-to-long' error in TarSCM.tasks
+  * more documentation for README.md
+  * Update control
+
+-------------------------------------------------------------------
+Wed Jun  7 08:53:48 UTC 2017 - adr...@suse.de
+
+- add python-yaml for debian distros
+
+-------------------------------------------------------------------

Old:
----
  obs-service-tar_scm-0.7.0.1492101301.747de50.tar.gz

New:
----
  obs-service-tar_scm-0.7.0.1496831936.d960322.tar.gz

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

Other differences:
------------------
++++++ obs-service-tar_scm.spec ++++++
--- /var/tmp/diff_new_pack.nDWpCp/_old  2017-06-16 10:54:19.015438835 +0200
+++ /var/tmp/diff_new_pack.nDWpCp/_new  2017-06-16 10:54:19.019438271 +0200
@@ -19,8 +19,8 @@
 %bcond_without obs_scm_testsuite
 
 Name:           obs-service-tar_scm
-%define version_unconverted 0.7.0.1492101301.747de50
-Version:        0.7.0.1492101301.747de50
+%define version_unconverted 0.7.0.1496831936.d960322
+Version:        0.7.0.1496831936.d960322
 Release:        0
 Summary:        An OBS source service: create tar ball from svn/git/hg
 License:        GPL-2.0+
@@ -45,6 +45,7 @@
 BuildRequires:  subversion
 %endif
 BuildRequires:  python >= 2.6
+BuildRequires:  python-unittest2
 Requires:       bzr
 Requires:       git-core
 Requires:       mercurial

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.nDWpCp/_old  2017-06-16 10:54:19.091428137 +0200
+++ /var/tmp/diff_new_pack.nDWpCp/_new  2017-06-16 10:54:19.095427575 +0200
@@ -5,4 +5,4 @@
             <param 
name="url">git://github.com/M0ses/obs-service-tar_scm.git</param>
           <param 
name="changesrevision">b742dfc0e12755cf306a95439494b5bdde7c0c61</param></service><service
 name="tar_scm">
                 <param 
name="url">git://github.com/openSUSE/obs-service-tar_scm.git</param>
-              <param 
name="changesrevision">8c65b8acb16e46f25c5b11d2a16378346d821923</param></service></servicedata>
\ No newline at end of file
+              <param 
name="changesrevision">03230fdf240addb3dd1ba3201beef50722cc87ac</param></service></servicedata>
\ No newline at end of file

++++++ debian.dsc ++++++
--- /var/tmp/diff_new_pack.nDWpCp/_old  2017-06-16 10:54:19.115424759 +0200
+++ /var/tmp/diff_new_pack.nDWpCp/_new  2017-06-16 10:54:19.115424759 +0200
@@ -11,7 +11,7 @@
 Package: obs-service-tar-scm
 Architecture: all
 Provides: obs-service-obs-scm, obs-service-tar
-Depends: ${misc:Depends}, ${python:Depends}, bzr, git, subversion, cpio, 
python-dateutil
+Depends: ${misc:Depends}, ${python:Depends}, bzr, git, subversion, cpio, 
python-dateutil, python-yaml
 Recommends: mercurial
 Description: An OBS source service: fetches SCM tarballs
  This is a source service for openSUSE Build Service.

++++++ obs-service-tar_scm-0.7.0.1492101301.747de50.tar.gz -> 
obs-service-tar_scm-0.7.0.1496831936.d960322.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1492101301.747de50/README.md 
new/obs-service-tar_scm-0.7.0.1496831936.d960322/README.md
--- old/obs-service-tar_scm-0.7.0.1492101301.747de50/README.md  2017-04-13 
18:35:01.000000000 +0200
+++ new/obs-service-tar_scm-0.7.0.1496831936.d960322/README.md  2017-06-07 
12:38:56.000000000 +0200
@@ -10,6 +10,38 @@
 
 The service can be used in combination with other services like 
[download_files](https://github.com/openSUSE/obs-service-download_files), 
[extract_file](https://github.com/openSUSE/obs-service-extract_file), 
[recompress](https://github.com/openSUSE/obs-service-recompress) or 
[set_version](https://github.com/openSUSE/obs-service-set_version) e.g. within 
the [GIT 
integration](https://en.opensuse.org/openSUSE:Build_Service_Concept_SourceService#Example_2:_GIT_integration)
 workflow.
 
+## Archive Formats
+
+### obscpio
+The `obscpio` archive format is the new OBS specific archive format based on 
`cpio` which can be consumed and generated by the [OBS Delta 
Store](http://openbuildservice.org/help/manuals/obs-reference-guide/cha.obs.architecture.html#delta_store)
 to store changes in an incremental way independently from your chosen SCM.
+The `obs_scm` service generates archives in this format, which is basically 
the `cpio` `newc` format.
+
+### tar
+The standard `tar` archive format is used as output format by the `tar` and 
`tar_scm` source services.
+
+## Services
+
+### tar_scm
+`tar_scm` is the legacy source service used to create a source tarball from a 
source code management tool.
+
+### obs_scm
+`obs_scm` uses the new `obscpio` archive format to store the sources.
+It is recommended to use `obs_scm` in favour to `tar_scm`, because it helps to 
save a lot of disk space on the server side, especially when used in continuous 
integration (e.g. nightly builds etc.).
+The usual source tarballs can be regenerated from this at build-time using the 
`tar` and `recompress` source services, so no changes to `.spec` files are 
required when switching to `obs_scm` and `obscpio`.
+
+`obs_scm` additionally generates a file named `<package>.obsinfo` which 
includes useful information from your SCM system, so this data can be accessed 
at build-time.
+
+### tar
+The `tar` source service creates a tarball out of `obscpio` archives.
+
+### snapcraft
+The `snapcraft` source service can be used to fetch sources before building a 
[`snappy` app (a.k.a. *snap*)](https://snapcraft.io/).
+It parses a `snapcraft.yml` file, for the SCM related parts and executes the 
corresponding services.
+
+### appimage
+The `appimage` source service can be used to fetch sources before building an 
[AppImage app](http://appimage.org/).
+It parses an `appimage.yml` file for the SCM related parts and executes the 
corresponding services.
+
 ## Installation
 The files in this top-level directory need to be installed using the following:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/tasks.py 
new/obs-service-tar_scm-0.7.0.1496831936.d960322/TarSCM/tasks.py
--- old/obs-service-tar_scm-0.7.0.1492101301.747de50/TarSCM/tasks.py    
2017-04-13 18:35:01.000000000 +0200
+++ new/obs-service-tar_scm-0.7.0.1496831936.d960322/TarSCM/tasks.py    
2017-06-07 12:38:56.000000000 +0200
@@ -1,3 +1,7 @@
+'''
+This module contains the class tasks
+'''
+
 import glob
 import copy
 import atexit
@@ -16,21 +20,26 @@
 
 
 class tasks():
+    '''
+    Class to create a task list for formats which can contain more then one scm
+    job like snapcraft or appimage
+    '''
     def __init__(self):
         self.task_list      = []
         self.cleanup_dirs   = []
         self.helpers        = helpers()
         self.changes        = changes()
         self.scm_object     = None
+        self.data_map       = None
 
     def cleanup(self):
         """Cleaning temporary directories."""
         logging.debug("Cleaning: %s", ' '.join(self.cleanup_dirs))
 
-        for d in self.cleanup_dirs:
-            if not os.path.exists(d):
+        for dirname in self.cleanup_dirs:
+            if not os.path.exists(dirname):
                 continue
-            shutil.rmtree(d)
+            shutil.rmtree(dirname)
         self.cleanup_dirs = []
         # Unlock to prevent dead lock in cachedir if exception
         # gets raised
@@ -38,19 +47,28 @@
             self.scm_object.unlock_cache()
 
     def generate_list(self, args):
+        '''
+        Generate list of scm jobs from appimage.yml, snapcraft.yml or a single
+        job from cli arguments.
+        '''
         scms = ['git', 'tar', 'svn', 'bzr', 'hg']
 
         if args.appimage:
             # we read the SCM config from appimage.yml
-            f = open('appimage.yml')
-            self.dataMap = yaml.safe_load(f)
-            f.close()
+            filehandle = open('appimage.yml')
+            self.data_map = yaml.safe_load(filehandle)
+            filehandle.close()
             args.use_obs_scm = True
+            build_scms = ()
+            try:
+                build_scms = self.data_map['build'].keys()
+            except TypeError:
+                pass
             # run for each scm an own task
             for scm in scms:
-                if scm not in self.dataMap['build'].keys():
+                if scm not in build_scms:
                     continue
-                for url in self.dataMap['build'][scm]:
+                for url in self.data_map['build'][scm]:
                     args.url = url
                     args.scm = scm
                     self.task_list.append(copy.copy(args))
@@ -58,46 +76,54 @@
         elif args.snapcraft:
             # we read the SCM config from snapcraft.yaml instead
             # getting it via parameters
-            f = open('snapcraft.yaml')
-            self.dataMap = yaml.safe_load(f)
-            f.close()
+            filehandle = open('snapcraft.yaml')
+            self.data_map = yaml.safe_load(filehandle)
+            filehandle.close()
             args.use_obs_scm = True
             # run for each part an own task
-            for part in self.dataMap['parts'].keys():
+            for part in self.data_map['parts'].keys():
                 args.filename = part
-                if 'source-type' not in self.dataMap['parts'][part].keys():
+                if 'source-type' not in self.data_map['parts'][part].keys():
                     continue
-                pep8_1 = self.dataMap['parts'][part]['source-type']
+                pep8_1 = self.data_map['parts'][part]['source-type']
                 if pep8_1 not in scms:
                     continue
                 # avoid conflicts with files
                 args.clone_prefix = "_obs_"
-                args.url = self.dataMap['parts'][part]['source']
-                self.dataMap['parts'][part]['source'] = part
-                args.scm = self.dataMap['parts'][part]['source-type']
-                del self.dataMap['parts'][part]['source-type']
+                args.url = self.data_map['parts'][part]['source']
+                self.data_map['parts'][part]['source'] = part
+                args.scm = self.data_map['parts'][part]['source-type']
+                del self.data_map['parts'][part]['source-type']
                 self.task_list.append(copy.copy(args))
 
         else:
             self.task_list.append(args)
 
     def process_list(self):
+        '''
+        process tasks from the task_list
+        '''
         for task in self.task_list:
             self._process_single_task(task)
 
     def finalize(self, args):
+        '''
+        final steps after processing task list
+        '''
         if args.snapcraft:
             # write the new snapcraft.yaml file
             # we prefix our own here to be sure to not overwrite user files,
             # if he is using us in "disabled" mode
             new_file = args.outdir + '/_service:snapcraft:snapcraft.yaml'
             with open(new_file, 'w') as outfile:
-                outfile.write(yaml.dump(self.dataMap,
+                outfile.write(yaml.dump(self.data_map,
                                         default_flow_style=False))
 
     def _process_single_task(self, args):
-        FORMAT  = "%(message)s"
-        logging.basicConfig(format=FORMAT, stream=sys.stderr,
+        '''
+        do the work for a single task
+        '''
+        logging.basicConfig(format="%(message)s", stream=sys.stderr,
                             level=logging.INFO)
         if args.verbose:
             logging.getLogger().setLevel(logging.DEBUG)
@@ -114,7 +140,6 @@
         # self.scm_object is need to unlock cache in cleanup
         # if exception occurs
         self.scm_object = scm_object   = scm_class(args, self)
-        helpers      = scm_object.helpers
 
         scm_object.fetch_upstream()
 
@@ -132,7 +157,7 @@
 
         logging.debug("DST: %s", dstname)
 
-        changes = scm_object.detect_changes()
+        detected_changes = scm_object.detect_changes()
 
         scm_object.prep_tree_for_archive(args.subdir, args.outdir,
                                          dstname=dstname)
@@ -154,7 +179,7 @@
             cli       = args
         )
 
-        if changes:
+        if detected_changes:
             changesauthor = self.changes.get_changesauthor(args)
 
             logging.debug("AUTHOR: %s", changesauthor)
@@ -166,12 +191,18 @@
             for filename in glob.glob('*.changes'):
                 new_changes_file = os.path.join(args.outdir, filename)
                 shutil.copy(filename, new_changes_file)
-                self.changes.write_changes(new_changes_file, changes['lines'],
+                self.changes.write_changes(new_changes_file,
+                                           detected_changes['lines'],
                                            changesversion, changesauthor)
             self.changes.write_changes_revision(args.url, args.outdir,
-                                                changes['revision'])
+                                                detected_changes['revision'])
 
     def get_version(self, scm_object, args):
+        '''
+        Generate final version number by detecting version from scm if not
+        given as cli option and applying versionrewrite_pattern and
+        versionprefix if given as cli option
+        '''
         version = args.version
         if version == '_auto_' or args.versionformat:
             version = self.detect_version(scm_object, args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1492101301.747de50/debian/control 
new/obs-service-tar_scm-0.7.0.1496831936.d960322/debian/control
--- old/obs-service-tar_scm-0.7.0.1492101301.747de50/debian/control     
2017-04-13 18:35:01.000000000 +0200
+++ new/obs-service-tar_scm-0.7.0.1496831936.d960322/debian/control     
2017-06-07 12:38:56.000000000 +0200
@@ -10,7 +10,7 @@
 Package: obs-service-tar-scm
 Architecture: all
 Provides: obs-service-obs-scm, obs-service-tar
-Depends: ${misc:Depends}, ${python:Depends}, bzr, git, subversion, cpio, 
python-dateutil
+Depends: ${misc:Depends}, ${python:Depends}, bzr, git, subversion, cpio, 
python-dateutil, python-yaml
 Recommends: mercurial
 Description: An OBS source service: fetches SCM tarballs
  This is a source service for openSUSE Build Service.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/tasks.py 
new/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/tasks.py
--- old/obs-service-tar_scm-0.7.0.1492101301.747de50/tests/tasks.py     
2017-04-13 18:35:01.000000000 +0200
+++ new/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/tasks.py     
2017-06-07 12:38:56.000000000 +0200
@@ -87,6 +87,13 @@
             self.assertEqual(tasks.task_list[0].__dict__[k], expected[k])
         self.assertEqual(len(tasks.task_list), 1)
 
+    def test_appimage_empty_build_git(self):
+        self.cli.snapcraft = False
+        self.cli.appimage = True
+        self._cd_fixtures_dir()
+        tasks = TarSCM.tasks()
+        tasks.generate_list(self.cli)
+
     def test_generate_task_list_multi_tasks(self):
         expected = {
             'libpipeline': {


Reply via email to