commit spec-cleaner for openSUSE:Factory
Hello community, here is the log from the commit of package spec-cleaner for openSUSE:Factory checked in at 2018-02-28 20:03:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/spec-cleaner (Old) and /work/SRC/openSUSE:Factory/.spec-cleaner.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "spec-cleaner" Wed Feb 28 20:03:16 2018 rev:49 rq:580985 version:1.0.4 Changes: -------- --- /work/SRC/openSUSE:Factory/spec-cleaner/spec-cleaner.changes 2018-02-21 14:11:08.918886982 +0100 +++ /work/SRC/openSUSE:Factory/.spec-cleaner.new/spec-cleaner.changes 2018-02-28 20:03:20.990622218 +0100 @@ -1,0 +2,6 @@ +Wed Feb 28 14:34:58 UTC 2018 - tchvatal@suse.com + +- Fix issue with the %doc -> %license conversion in some complex + cases, multiple licenses at once, prefixed licenses + +------------------------------------------------------------------- Old: ---- spec-cleaner-1.0.3.tar.gz New: ---- spec-cleaner-1.0.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ spec-cleaner.spec ++++++ --- /var/tmp/diff_new_pack.fRjJFb/_old 2018-02-28 20:03:21.966586904 +0100 +++ /var/tmp/diff_new_pack.fRjJFb/_new 2018-02-28 20:03:21.974586615 +0100 @@ -18,7 +18,7 @@ Name: spec-cleaner -Version: 1.0.3 +Version: 1.0.4 Release: 0 Summary: .spec file cleaner License: BSD-3-Clause ++++++ spec-cleaner-1.0.3.tar.gz -> spec-cleaner-1.0.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-spec-cleaner-1.0.3/.gitignore new/spec-cleaner-spec-cleaner-1.0.4/.gitignore --- old/spec-cleaner-spec-cleaner-1.0.3/.gitignore 2018-02-14 20:54:57.000000000 +0100 +++ new/spec-cleaner-spec-cleaner-1.0.4/.gitignore 2018-02-28 15:29:54.000000000 +0100 @@ -7,5 +7,6 @@ .cache .coverage .coveralls.yml +.pytest_cache .tox *~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-spec-cleaner-1.0.3/obs/clean_spec_file new/spec-cleaner-spec-cleaner-1.0.4/obs/clean_spec_file --- old/spec-cleaner-spec-cleaner-1.0.3/obs/clean_spec_file 2018-02-14 20:54:57.000000000 +0100 +++ new/spec-cleaner-spec-cleaner-1.0.4/obs/clean_spec_file 2018-02-28 15:29:54.000000000 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/bin/sh # this is just a wrapper calling spec-cleaner binary MYOUTDIR=/tmp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-spec-cleaner-1.0.3/obs/format_spec_file new/spec-cleaner-spec-cleaner-1.0.4/obs/format_spec_file --- old/spec-cleaner-spec-cleaner-1.0.3/obs/format_spec_file 2018-02-14 20:54:57.000000000 +0100 +++ new/spec-cleaner-spec-cleaner-1.0.4/obs/format_spec_file 2018-02-28 15:29:54.000000000 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/bin/sh # this is just a wrapper calling spec-cleaner binary MYOUTDIR=/tmp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-spec-cleaner-1.0.3/pytest.ini new/spec-cleaner-spec-cleaner-1.0.4/pytest.ini --- old/spec-cleaner-spec-cleaner-1.0.3/pytest.ini 2018-02-14 20:54:57.000000000 +0100 +++ new/spec-cleaner-spec-cleaner-1.0.4/pytest.ini 2018-02-28 15:29:54.000000000 +0100 @@ -1,4 +1,4 @@ [pytest] -addopts = -v --cov=spec_cleaner +addopts = -vv --cov=spec_cleaner python_files = *-tests.py testpaths = tests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-spec-cleaner-1.0.3/spec_cleaner/__init__.py new/spec-cleaner-spec-cleaner-1.0.4/spec_cleaner/__init__.py --- old/spec-cleaner-spec-cleaner-1.0.3/spec_cleaner/__init__.py 2018-02-14 20:54:57.000000000 +0100 +++ new/spec-cleaner-spec-cleaner-1.0.4/spec_cleaner/__init__.py 2018-02-28 15:29:54.000000000 +0100 @@ -13,7 +13,7 @@ from .rpmcleaner import RpmSpecCleaner -__version__ = '1.0.3' +__version__ = '1.0.4' def process_args(argv): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-spec-cleaner-1.0.3/spec_cleaner/rpmfiles.py new/spec-cleaner-spec-cleaner-1.0.4/spec_cleaner/rpmfiles.py --- old/spec-cleaner-spec-cleaner-1.0.3/spec_cleaner/rpmfiles.py 2018-02-14 20:54:57.000000000 +0100 +++ new/spec-cleaner-spec-cleaner-1.0.4/spec_cleaner/rpmfiles.py 2018-02-28 15:29:54.000000000 +0100 @@ -51,9 +51,12 @@ def _move_license_from_doc(self, line): if line.startswith("%doc") and self.reg.re_doclicense.search(line): - match = self.reg.re_doclicense.search(line).group() + match = '' + while self.reg.re_doclicense.search(line): + match += self.reg.re_doclicense.search(line).group() + line = self.reg.re_doclicense.sub('', line, 1) Section.add(self, "%license {}".format(match)) - line = self.reg.re_doclicense.sub('', line) + # we only got empty %doc then ommit it if line == "%doc ": line = '' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-spec-cleaner-1.0.3/spec_cleaner/rpmpackage.py new/spec-cleaner-spec-cleaner-1.0.4/spec_cleaner/rpmpackage.py --- old/spec-cleaner-spec-cleaner-1.0.3/spec_cleaner/rpmpackage.py 2018-02-14 20:54:57.000000000 +0100 +++ new/spec-cleaner-spec-cleaner-1.0.4/spec_cleaner/rpmpackage.py 2018-02-28 15:29:54.000000000 +0100 @@ -13,7 +13,7 @@ def add(self, line): # The first line (%package) should always be added and is different # from the lines we handle in RpmPreamble. - if self.previous_line is None: + if not self.previous_line: Section.add(self, line) return # If the package is lang package we add here comment about the lang diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-spec-cleaner-1.0.3/spec_cleaner/rpmregexp.py new/spec-cleaner-spec-cleaner-1.0.4/spec_cleaner/rpmregexp.py --- old/spec-cleaner-spec-cleaner-1.0.3/spec_cleaner/rpmregexp.py 2018-02-14 20:54:57.000000000 +0100 +++ new/spec-cleaner-spec-cleaner-1.0.4/spec_cleaner/rpmregexp.py 2018-02-28 15:29:54.000000000 +0100 @@ -120,7 +120,7 @@ # rpmfiles re_compression = re.compile(r'\.(gz|\*)$') re_defattr = re.compile(r'^\s*%defattr\s*\(\s*-\s*,\s*root\s*,\s*root\s*(,\s*-\s*)?\)\s*') - re_doclicense = re.compile(r'(LICENSE|COPYING)(\*|\.(\*|\S+))?($|\s)') + re_doclicense = re.compile(r'(\S+)?(LICENSE|COPYING)(\*|\.(\*|\S+))?($|\s)') # patches/sources re_ptch = re.compile(r'%{P:(\d+)}') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-spec-cleaner-1.0.3/tests/acceptance-tests.py new/spec-cleaner-spec-cleaner-1.0.4/tests/acceptance-tests.py --- old/spec-cleaner-spec-cleaner-1.0.3/tests/acceptance-tests.py 2018-02-14 20:54:57.000000000 +0100 +++ new/spec-cleaner-spec-cleaner-1.0.4/tests/acceptance-tests.py 2018-02-28 15:29:54.000000000 +0100 @@ -58,7 +58,7 @@ """ Run the cleaner as specified and store the output for further comparison. """ - if infile is None: + if not infile: infile = os.path.join('tests', 'in', test) full_options = { @@ -71,7 +71,7 @@ cleaner = RpmSpecCleaner(full_options) cleaner.run() - if compare_dir is not None: + if compare_dir: compare = os.path.join('tests', compare_dir, test) testfile = full_options['inline'] and infile or outfile with open(compare) as ref, open(testfile) as test: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-spec-cleaner-1.0.3/tests/in/doc2license.spec new/spec-cleaner-spec-cleaner-1.0.4/tests/in/doc2license.spec --- old/spec-cleaner-spec-cleaner-1.0.3/tests/in/doc2license.spec 2018-02-14 20:54:57.000000000 +0100 +++ new/spec-cleaner-spec-cleaner-1.0.4/tests/in/doc2license.spec 2018-02-28 15:29:54.000000000 +0100 @@ -1,5 +1,5 @@ %files -%doc AUTHOR COPYING README +%doc AUTHOR COPYING README ringtones/default.wav.LICENSE %files a %doc OTHER COPYING.MPL @@ -7,4 +7,7 @@ %files b %doc COPYING.* +%files c +%doc COPYING LICENSE* + %changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-spec-cleaner-1.0.3/tests/out/doc2license.spec new/spec-cleaner-spec-cleaner-1.0.4/tests/out/doc2license.spec --- old/spec-cleaner-spec-cleaner-1.0.3/tests/out/doc2license.spec 2018-02-14 20:54:57.000000000 +0100 +++ new/spec-cleaner-spec-cleaner-1.0.4/tests/out/doc2license.spec 2018-02-28 15:29:54.000000000 +0100 @@ -1,5 +1,5 @@ %files -%license COPYING +%license COPYING ringtones/default.wav.LICENSE %doc AUTHOR README %files a @@ -9,4 +9,7 @@ %files b %license COPYING.* +%files c +%license COPYING LICENSE* + %changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec-cleaner-spec-cleaner-1.0.3/tests/out-minimal/doc2license.spec new/spec-cleaner-spec-cleaner-1.0.4/tests/out-minimal/doc2license.spec --- old/spec-cleaner-spec-cleaner-1.0.3/tests/out-minimal/doc2license.spec 2018-02-14 20:54:57.000000000 +0100 +++ new/spec-cleaner-spec-cleaner-1.0.4/tests/out-minimal/doc2license.spec 2018-02-28 15:29:54.000000000 +0100 @@ -1,5 +1,5 @@ %files -%license COPYING +%license COPYING ringtones/default.wav.LICENSE %doc AUTHOR README %files a @@ -9,4 +9,7 @@ %files b %license COPYING.* +%files c +%license COPYING LICENSE* + %changelog
participants (1)
-
root@hilbert.suse.de