Hello community,

here is the log from the commit of package spec-cleaner for openSUSE:Factory 
checked in at 2014-11-18 22:45:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/spec-cleaner (Old)
 and      /work/SRC/openSUSE:Factory/.spec-cleaner.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "spec-cleaner"

Changes:
--------
--- /work/SRC/openSUSE:Factory/spec-cleaner/spec-cleaner.changes        
2014-10-14 07:12:47.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.spec-cleaner.new/spec-cleaner.changes   
2014-11-18 22:46:22.000000000 +0100
@@ -1,0 +2,8 @@
+Sat Nov 15 10:10:29 UTC 2014 - tchva...@suse.com
+
+- Remove PKGBUILD until service-download_files is fixed to work fine
+  with them
+- Version bump to 0.6.4:
+  * Various small fixes and macro expansion.
+
+-------------------------------------------------------------------

Old:
----
  spec-cleaner-0.6.3.tar.gz

New:
----
  spec-cleaner-0.6.4.tar.gz

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

Other differences:
------------------
++++++ spec-cleaner.spec ++++++
--- /var/tmp/diff_new_pack.C3UAjB/_old  2014-11-18 22:46:23.000000000 +0100
+++ /var/tmp/diff_new_pack.C3UAjB/_new  2014-11-18 22:46:23.000000000 +0100
@@ -20,7 +20,7 @@
 # This is used for Fedora, we need to sync this
 %{!?py3_ver: %define py3_ver %{python3_version}}
 Name:           spec-cleaner
-Version:        0.6.3
+Version:        0.6.4
 Release:        0
 Summary:        .spec file cleaner
 License:        BSD-3-Clause

++++++ spec-cleaner-0.6.3.tar.gz -> spec-cleaner-0.6.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spec-cleaner-spec-cleaner-0.6.3/data/excludes-bracketing.txt 
new/spec-cleaner-spec-cleaner-0.6.4/data/excludes-bracketing.txt
--- old/spec-cleaner-spec-cleaner-0.6.3/data/excludes-bracketing.txt    
2014-10-10 17:20:17.000000000 +0200
+++ new/spec-cleaner-spec-cleaner-0.6.4/data/excludes-bracketing.txt    
2014-11-15 10:57:07.000000000 +0100
@@ -37,9 +37,12 @@
 install_info_delete
 jpackage_script
 ix86
+kf5_makeinstall
 lang
 lang_package
+make_jobs
 make_install
+make_jobs
 mime_database_post[^\s]*
 package
 patch[0-9]*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spec-cleaner-spec-cleaner-0.6.3/spec_cleaner/__init__.py 
new/spec-cleaner-spec-cleaner-0.6.4/spec_cleaner/__init__.py
--- old/spec-cleaner-spec-cleaner-0.6.3/spec_cleaner/__init__.py        
2014-10-10 17:20:17.000000000 +0200
+++ new/spec-cleaner-spec-cleaner-0.6.4/spec_cleaner/__init__.py        
2014-11-15 10:57:07.000000000 +0100
@@ -4,7 +4,7 @@
 # All rights reserved.
 # See COPYING for details.
 
-__version__ = '0.6.3'
+__version__ = '0.6.4'
 
 import os
 import sys
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spec-cleaner-spec-cleaner-0.6.3/spec_cleaner/rpmexception.py 
new/spec-cleaner-spec-cleaner-0.6.4/spec_cleaner/rpmexception.py
--- old/spec-cleaner-spec-cleaner-0.6.3/spec_cleaner/rpmexception.py    
2014-10-10 17:20:17.000000000 +0200
+++ new/spec-cleaner-spec-cleaner-0.6.4/spec_cleaner/rpmexception.py    
2014-11-15 10:57:07.000000000 +0100
@@ -22,5 +22,5 @@
 
 class RpmException(RpmBaseException):
     """
-    Exception raised by wrong arguments pased by cli
+    Exception raised by wrong parsed content from rpm
     """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spec-cleaner-spec-cleaner-0.6.3/spec_cleaner/rpmsection.py 
new/spec-cleaner-spec-cleaner-0.6.4/spec_cleaner/rpmsection.py
--- old/spec-cleaner-spec-cleaner-0.6.3/spec_cleaner/rpmsection.py      
2014-10-10 17:20:17.000000000 +0200
+++ new/spec-cleaner-spec-cleaner-0.6.4/spec_cleaner/rpmsection.py      
2014-11-15 10:57:07.000000000 +0100
@@ -84,10 +84,11 @@
                   newline:
                 self.lines.append('')
             # remove the newlines around ifs if they are not wanted
-            if self.lines[-1] == '' and \
-                  (self.lines[-2].startswith('%if') or
-                  self.lines[-2].startswith('%else')):
-                self.lines.pop()
+            if len(self.lines) >= 2:
+                if self.lines[-1] == '' and \
+                      (self.lines[-2].startswith('%if') or
+                      self.lines[-2].startswith('%else')):
+                    self.lines.pop()
 
         for line in self.lines:
             fout.write(line + '\n')
@@ -215,9 +216,8 @@
 
     def replace_preamble_macros(self, line):
         """
-        Replace %{S:0} for %{SOURCE:0} and so on.
+        Replace %{S:0} for %{SOURCE0} and so on.
         """
-        for i in map(str,list(range(100))):
-            line = line.replace('%{P:' + i + '}', '%{PATCH' + i + '}')
-            line = line.replace('%{S:' + i + '}', '%{SOURCE' + i + '}')
+        line = re.sub(r'%{P:(\d+)}', r'%{PATCH\1}', line)
+        line = re.sub(r'%{S:(\d+)}', r'%{SOURCE\1}', line)
         return line
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spec-cleaner-spec-cleaner-0.6.3/tests/acceptance-tests.py 
new/spec-cleaner-spec-cleaner-0.6.4/tests/acceptance-tests.py
--- old/spec-cleaner-spec-cleaner-0.6.3/tests/acceptance-tests.py       
2014-10-10 17:20:17.000000000 +0200
+++ new/spec-cleaner-spec-cleaner-0.6.4/tests/acceptance-tests.py       
2014-11-15 10:57:07.000000000 +0100
@@ -28,12 +28,14 @@
         self.tmp_dir = tempfile.mkdtemp()
         self.tmp_file_rerun = tempfile.NamedTemporaryFile()
 
+
     def tearDown(self):
         """
         Remove the tmp directory
         """
         shutil.rmtree(self.tmp_dir)
 
+
     def _difftext(self, lines1, lines2, junk=None):
         junk = junk or (' ', '\t')
         # result is a generator
@@ -45,6 +47,7 @@
             if not line.startswith(' '):
                 self.fail(''.join(read + list(result)))
 
+
     def assertStreamEqual(self, stream1, stream2, junk=None):
         """compare two streams (using difflib and readlines())"""
         # if stream2 is stream2, readlines() on stream1 will also read lines
@@ -57,18 +60,21 @@
         # ocmpare
         self._difftext(stream1.readlines(), stream2.readlines(), junk)
 
+
     def _get_input_dir(self):
         """
         Return path for input files used by tests
         """
         return os.path.join(os.getcwd(), 'tests/in/')
 
+
     def _get_fixtures_dir(self):
         """
         Return path for representative output specs
         """
         return os.path.join(os.getcwd(), 'tests/out/')
 
+
     def _obtain_list_of_tests(self):
         """
         Generate list of tests we are going to use according to what is on hdd
@@ -82,6 +88,7 @@
 
         return test_files
 
+
     def _run_individual_test(self, infile, outfile):
         """
         Run the cleaner as specified and store the output for further 
comparison.
@@ -89,6 +96,7 @@
         cleaner = RpmSpecCleaner(infile, outfile, True, False, False, 
'vimdiff')
         cleaner.run()
 
+
     @patch('spec_cleaner.rpmcopyright.datetime')
     def test_input_files(self, datetime_mock):
         datetime_mock.datetime.now.return_value = (datetime.datetime(2013, 1, 
1))
@@ -107,10 +115,11 @@
             with open(compare) as ref, open(self.tmp_file_rerun.name) as test:
                 self.assertStreamEqual(ref, test)
 
+
     @patch('spec_cleaner.rpmcopyright.datetime')
     def test_inline_function(self, datetime_mock):
         datetime_mock.datetime.now.return_value = (datetime.datetime(2013, 1, 
1))
-        # grab first test ; copy it to tmp and then run inlining there
+
         test = self._obtain_list_of_tests()[0]
         infile = os.path.join(self.input_dir, test)
         compare = os.path.join(self.fixtures_dir, test)
@@ -122,3 +131,26 @@
 
         with open(compare) as ref, open(tmp_file) as test:
             self.assertStreamEqual(ref, test)
+
+
+    @patch('spec_cleaner.rpmcopyright.datetime')
+    def test_regular_output(self, datetime_mock):
+        datetime_mock.datetime.now.return_value = (datetime.datetime(2013, 1, 
1))
+
+        test = self._obtain_list_of_tests()[0]
+        infile = os.path.join(self.input_dir, test)
+        cleaner = RpmSpecCleaner(infile, '', True, False, False, 'gvimdiff')
+        cleaner.run()
+
+
+    @patch('spec_cleaner.rpmcopyright.datetime')
+    @patch('subprocess.call')
+    def test_diff_function(self, datetime_mock, subprocess_mock):
+        datetime_mock.datetime.now.return_value = (datetime.datetime(2013, 1, 
1))
+        subprocess_mock.subprocess.call.return_value = True
+
+        test = self._obtain_list_of_tests()[0]
+        infile = os.path.join(self.input_dir, test)
+
+        cleaner = RpmSpecCleaner(infile, '', True, False, True, 'gvimdiff')
+        cleaner.run()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spec-cleaner-spec-cleaner-0.6.3/tests/in/sources.spec 
new/spec-cleaner-spec-cleaner-0.6.4/tests/in/sources.spec
--- old/spec-cleaner-spec-cleaner-0.6.3/tests/in/sources.spec   1970-01-01 
01:00:00.000000000 +0100
+++ new/spec-cleaner-spec-cleaner-0.6.4/tests/in/sources.spec   2014-11-15 
10:57:07.000000000 +0100
@@ -0,0 +1,10 @@
+Source1: something
+Source2: somethingelse
+Source200: ou
+Source300: godknowswhat
+
+%setup -q
+cp %{S:1} %{buildroot}
+cp %{S:2} %{buildroot}
+cp %{S:200} %{buildroot}
+cp %{S:300} %{buildroot}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/spec-cleaner-spec-cleaner-0.6.3/tests/out/sources.spec 
new/spec-cleaner-spec-cleaner-0.6.4/tests/out/sources.spec
--- old/spec-cleaner-spec-cleaner-0.6.3/tests/out/sources.spec  1970-01-01 
01:00:00.000000000 +0100
+++ new/spec-cleaner-spec-cleaner-0.6.4/tests/out/sources.spec  2014-11-15 
10:57:07.000000000 +0100
@@ -0,0 +1,28 @@
+#
+# spec file for package sources
+#
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
+
+
+Source1:        something
+Source2:        somethingelse
+Source200:      ou
+Source300:      godknowswhat
+%setup -q
+cp %{SOURCE1} %{buildroot}
+cp %{SOURCE2} %{buildroot}
+cp %{SOURCE200} %{buildroot}
+cp %{SOURCE300} %{buildroot}
+

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to