Hello community,

here is the log from the commit of package reuse for openSUSE:Factory checked 
in at 2018-05-16 18:44:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/reuse (Old)
 and      /work/SRC/openSUSE:Factory/.reuse.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "reuse"

Wed May 16 18:44:13 2018 rev:3 rq:609141 version:0.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/reuse/reuse.changes      2018-04-20 
17:30:53.215456019 +0200
+++ /work/SRC/openSUSE:Factory/.reuse.new/reuse.changes 2018-05-16 
18:45:10.175540103 +0200
@@ -1,0 +2,7 @@
+Wed May 16 12:50:44 UTC 2018 - [email protected]
+
+- Update to version 0.3.0:
+  + Bill of materials output is now deterministic.  Entries are
+    sorted.
+
+-------------------------------------------------------------------

Old:
----
  fsfe-reuse-0.2.0.tar.gz

New:
----
  fsfe-reuse-0.3.0.tar.gz

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

Other differences:
------------------
++++++ reuse.spec ++++++
--- /var/tmp/diff_new_pack.KX2m4S/_old  2018-05-16 18:45:11.411495437 +0200
+++ /var/tmp/diff_new_pack.KX2m4S/_new  2018-05-16 18:45:11.411495437 +0200
@@ -19,7 +19,7 @@
 
 %bcond_without test
 Name:           reuse
-Version:        0.2.0
+Version:        0.3.0
 Release:        0
 Summary:        A tool for compliance with the REUSE Initiative recommendations
 License:        GPL-3.0-or-later

++++++ fsfe-reuse-0.2.0.tar.gz -> fsfe-reuse-0.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsfe-reuse-0.2.0/CHANGELOG.md 
new/fsfe-reuse-0.3.0/CHANGELOG.md
--- old/fsfe-reuse-0.2.0/CHANGELOG.md   2018-04-17 13:44:10.000000000 +0200
+++ new/fsfe-reuse-0.3.0/CHANGELOG.md   2018-05-16 14:44:07.000000000 +0200
@@ -17,6 +17,22 @@
 
 The versions follow [semantic versioning](https://semver.org).
 
+## 0.3.0 - 2018-05-16
+
+### Changed
+
+- The output of `reuse compile` is now deterministic.  The files, copyright
+  lines and SPDX expressions are sorted alphabetically.
+
+### Fixed
+
+- When a GPL license could not be found, the correct `-only` or `-or-later`
+  extension is now used in the warning message, rather than a bare `GPL-3.0`.
+
+- If you have a license listed as `SPDX-Valid-License: GPL-3.0-or-later`, this
+  now correctly matches corresponding SPDX identifiers.  Still it is 
recommended
+  to use `SPDX-Valid-License: GPL-3.0` instead.
+
 ## 0.2.0 - 2018-04-17
 
 ### Added
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsfe-reuse-0.2.0/PKG-INFO 
new/fsfe-reuse-0.3.0/PKG-INFO
--- old/fsfe-reuse-0.2.0/PKG-INFO       2018-04-17 13:47:32.000000000 +0200
+++ new/fsfe-reuse-0.3.0/PKG-INFO       2018-05-16 14:46:18.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: fsfe-reuse
-Version: 0.2.0
+Version: 0.3.0
 Summary: reuse is a tool for compliance with the REUSE Initiative 
recommendations.
 Home-page: https://git.fsfe.org/reuse/reuse
 Author: Carmen Bianca Bakker
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsfe-reuse-0.2.0/docs/conf.py 
new/fsfe-reuse-0.3.0/docs/conf.py
--- old/fsfe-reuse-0.2.0/docs/conf.py   2018-02-19 14:49:59.000000000 +0100
+++ new/fsfe-reuse-0.3.0/docs/conf.py   2018-05-16 14:44:39.000000000 +0200
@@ -84,7 +84,7 @@
 # built documents.
 #
 # The short X.Y version.
-version = '0.2.0'
+version = '0.3.0'
 # The full version, including alpha/beta/rc tags.
 release = version
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsfe-reuse-0.2.0/docs/history.md 
new/fsfe-reuse-0.3.0/docs/history.md
--- old/fsfe-reuse-0.2.0/docs/history.md        2018-04-17 13:47:27.000000000 
+0200
+++ new/fsfe-reuse-0.3.0/docs/history.md        2018-05-16 14:46:14.000000000 
+0200
@@ -17,6 +17,22 @@
 
 The versions follow [semantic versioning](https://semver.org).
 
+## 0.3.0 - 2018-05-16
+
+### Changed
+
+- The output of `reuse compile` is now deterministic.  The files, copyright
+  lines and SPDX expressions are sorted alphabetically.
+
+### Fixed
+
+- When a GPL license could not be found, the correct `-only` or `-or-later`
+  extension is now used in the warning message, rather than a bare `GPL-3.0`.
+
+- If you have a license listed as `SPDX-Valid-License: GPL-3.0-or-later`, this
+  now correctly matches corresponding SPDX identifiers.  Still it is 
recommended
+  to use `SPDX-Valid-License: GPL-3.0` instead.
+
 ## 0.2.0 - 2018-04-17
 
 ### Added
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsfe-reuse-0.2.0/setup.cfg 
new/fsfe-reuse-0.3.0/setup.cfg
--- old/fsfe-reuse-0.2.0/setup.cfg      2018-04-17 13:47:32.000000000 +0200
+++ new/fsfe-reuse-0.3.0/setup.cfg      2018-05-16 14:46:18.000000000 +0200
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 0.2.0
+current_version = 0.3.0
 commit = True
 tag = False
 parse = 
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?P<release>(a|b|rc)?)(?P<releasenumber>\d*)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsfe-reuse-0.2.0/setup.py 
new/fsfe-reuse-0.3.0/setup.py
--- old/fsfe-reuse-0.2.0/setup.py       2018-02-19 14:49:59.000000000 +0100
+++ new/fsfe-reuse-0.3.0/setup.py       2018-05-16 14:44:39.000000000 +0200
@@ -64,7 +64,7 @@
 if __name__ == '__main__':
     setup(
         name='fsfe-reuse',
-        version='0.2.0',
+        version='0.3.0',
         url='https://git.fsfe.org/reuse/reuse',
         license='GPL-3.0-or-later',
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsfe-reuse-0.2.0/src/fsfe_reuse.egg-info/PKG-INFO 
new/fsfe-reuse-0.3.0/src/fsfe_reuse.egg-info/PKG-INFO
--- old/fsfe-reuse-0.2.0/src/fsfe_reuse.egg-info/PKG-INFO       2018-04-17 
13:47:32.000000000 +0200
+++ new/fsfe-reuse-0.3.0/src/fsfe_reuse.egg-info/PKG-INFO       2018-05-16 
14:46:18.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: fsfe-reuse
-Version: 0.2.0
+Version: 0.3.0
 Summary: reuse is a tool for compliance with the REUSE Initiative 
recommendations.
 Home-page: https://git.fsfe.org/reuse/reuse
 Author: Carmen Bianca Bakker
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fsfe-reuse-0.2.0/src/reuse/__init__.py 
new/fsfe-reuse-0.3.0/src/reuse/__init__.py
--- old/fsfe-reuse-0.2.0/src/reuse/__init__.py  2018-02-19 14:49:59.000000000 
+0100
+++ new/fsfe-reuse-0.3.0/src/reuse/__init__.py  2018-05-16 14:44:39.000000000 
+0200
@@ -35,8 +35,8 @@
 import sys
 from gettext import gettext as _
 from pathlib import Path
-from typing import (BinaryIO, Dict, Iterable, Iterator, List, NamedTuple,
-                    Optional, Set, Union)
+from typing import (BinaryIO, Dict, Iterator, List, NamedTuple, Optional, Set,
+                    Union)
 from uuid import uuid4
 
 import pkg_resources
@@ -72,7 +72,7 @@
 __author__ = 'Carmen Bianca Bakker'
 __email__ = '[email protected]'
 __license__ = 'GPLv3+'
-__version__ = '0.2.0'
+__version__ = '0.3.0'
 
 _logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
 
@@ -168,6 +168,15 @@
     return expression.split()
 
 
+def _strip_gpl_extension(identifier: str) -> List[str]:
+    """Strip '+', '-only' and '-or-later' from *identifier*."""
+    to_remove = ['+', '-only', '-or-later']
+    for string in to_remove:
+        if identifier.endswith(string):
+            identifier = identifier.replace(string, '')
+    return identifier
+
+
 def _determine_license_path(path: PathLike) -> Path:
     """Given a path FILE, return FILE.license if it exists, otherwise return
     FILE.
@@ -373,15 +382,16 @@
             return 1
 
         if not ignore_missing:
-            wrong_identifier = self._contains_invalid_identifiers(
-                reuse_info.spdx_expressions)
-            if wrong_identifier:
-                _logger.warning(_(
-                    '{path} is licensed under {identifier}, but its '
-                    'license file could not be found').format(
-                        path=path, identifier=wrong_identifier))
+            for expression in reuse_info.spdx_expressions:
+                wrong_identifier = self._contains_invalid_identifier(
+                    expression)
+                if wrong_identifier:
+                    _logger.warning(_(
+                        '{path} is licensed under {identifier}, but its '
+                        'license file could not be found').format(
+                            path=path, identifier=wrong_identifier))
 
-                return 1
+                    return 1
 
         return 0
 
@@ -420,7 +430,7 @@
             'using available reuse information consistent with the '
             'REUSE Initiative.</text>\n')
 
-        all_files = list(self.all_files())
+        all_files = sorted(self.all_files())
 
         # List all DESCRIBES relationships.  This involves some code
         # duplication in determining the relative path to the file and its
@@ -530,28 +540,23 @@
                 self._copyright_val = None
         return self._copyright_val
 
-    def _contains_invalid_identifiers(
+    def _contains_invalid_identifier(
             self,
-            expressions: Iterable[str]) -> Union[bool, str]:
-        """Does the list of expressions contain any invalid SPDX identifiers?
-        i.e., does any identifier refer to a file that does not exist in
-        Project.licenses?
+            expression: str) -> Union[bool, str]:
+        """Is the expression an invalid SPDX expression?  i.e., does any
+        identifier refer to a file that does not exist in Project.licenses?
 
         Return the faulty identifier.
 
-        If the list contains no SPDX identifiers at all, return False.
+        If all identifiers are valid, return False.
         """
-        for expression in expressions:
-            identifiers = _identifiers_from_expression(expression)
-
-            for identifier in identifiers:
-                to_remove = ['+', '-only', '-or-later']
-                for string in to_remove:
-                    if identifier.endswith(string):
-                        identifier = identifier.replace(string, '')
+        identifiers = _identifiers_from_expression(expression)
 
-                if identifier not in self.licenses:
-                    return identifier
+        for identifier in identifiers:
+            if (
+                    identifier not in self.licenses
+                    and _strip_gpl_extension(identifier) not in self.licenses):
+                return identifier
         return False
 
     def _identifiers_of_license(self, path: PathLike) -> List[str]:
@@ -657,11 +662,11 @@
 
         reuse_info = self.reuse_info_of(path, ignore_debian=ignore_debian)
 
-        for spdx in reuse_info.spdx_expressions:
+        for spdx in sorted(reuse_info.spdx_expressions):
             out.write('LicenseInfoInFile: {}\n'.format(spdx))
 
         if reuse_info.copyright_lines:
-            for line in reuse_info.copyright_lines:
+            for line in sorted(reuse_info.copyright_lines):
                 out.write('FileCopyrightText: <text>{}</text>\n'.format(line))
         else:
             out.write('FileCopyrightText: NONE\n')


Reply via email to