Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package diffoscope for openSUSE:Factory 
checked in at 2022-09-23 14:15:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/diffoscope (Old)
 and      /work/SRC/openSUSE:Factory/.diffoscope.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "diffoscope"

Fri Sep 23 14:15:08 2022 rev:37 rq:1005453 version:221

Changes:
--------
--- /work/SRC/openSUSE:Factory/diffoscope/diffoscope.changes    2022-08-20 
20:29:28.929488977 +0200
+++ /work/SRC/openSUSE:Factory/.diffoscope.new.2275/diffoscope.changes  
2022-09-23 14:15:44.054052687 +0200
@@ -1,0 +2,13 @@
+Thu Sep 22 17:01:08 UTC 2022 - Daniel Garcia <daniel.gar...@suse.com>
+
+- update to version 221:
+ - Don't crash if we can open a PDF file with PyPDF but cannot parse the
+   annotations within. (Closes: reproducible-builds/diffoscope#311)
+ - Depend on the dedicated xxd package, not vim-common.
+ - Update external_tools.py to reflect xxd/vim-common change.
+
+- Remove test_python.test_diff because it's failing, it's not recognizing the
+  pyc file type with the tests fixtures
+https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/284#note_280561
+
+-------------------------------------------------------------------

Old:
----
  diffoscope-220.tar.bz2
  diffoscope-220.tar.bz2.asc

New:
----
  diffoscope-221.tar.bz2
  diffoscope-221.tar.bz2.asc

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

Other differences:
------------------
++++++ diffoscope.spec ++++++
--- /var/tmp/diff_new_pack.4khevK/_old  2022-09-23 14:15:44.582053918 +0200
+++ /var/tmp/diff_new_pack.4khevK/_new  2022-09-23 14:15:44.586053927 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           diffoscope
-Version:        220
+Version:        221
 Release:        0
 Summary:        In-depth comparison of files, archives, and directories
 License:        GPL-3.0-or-later
@@ -135,7 +135,8 @@
 
 %check
 # test_identification 
https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/98
-py.test-%{python3_bin_suffix} -k 'not test_identification'
+# comparators/test_python/test_diff 
https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/284#note_280561
+py.test-%{python3_bin_suffix} -k 'not ((test_python and test_diff) or 
test_identification)'
 
 %files
 %doc README.rst

++++++ diffoscope-220.tar.bz2 -> diffoscope-221.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/diffoscope-220/debian/changelog 
new/diffoscope-221/debian/changelog
--- old/diffoscope-220/debian/changelog 2022-07-29 20:03:28.000000000 +0200
+++ new/diffoscope-221/debian/changelog 2022-08-19 16:32:26.000000000 +0200
@@ -1,3 +1,12 @@
+diffoscope (221) unstable; urgency=medium
+
+  * Don't crash if we can open a PDF file with PyPDF but cannot parse the
+    annotations within. (Closes: reproducible-builds/diffoscope#311)
+  * Depend on the dedicated xxd package, not vim-common.
+  * Update external_tools.py to reflect xxd/vim-common change.
+
+ -- Chris Lamb <la...@debian.org>  Fri, 19 Aug 2022 07:32:23 -0700
+
 diffoscope (220) unstable; urgency=medium
 
   * Support Haskell 9.x series files and update the test files to match. Thanks
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/diffoscope-220/debian/control 
new/diffoscope-221/debian/control
--- old/diffoscope-220/debian/control   2022-07-29 20:03:28.000000000 +0200
+++ new/diffoscope-221/debian/control   2022-08-19 16:32:26.000000000 +0200
@@ -86,7 +86,7 @@
  unzip <!nocheck>,
  wabt <!nocheck>,
  xmlbeans <!nocheck>,
- xxd <!nocheck> | vim-common <!nocheck>,
+ xxd <!nocheck>,
  zstd <!nocheck>,
 Build-Conflicts:
  graphicsmagick-imagemagick-compat,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/diffoscope-220/debian/tests/control 
new/diffoscope-221/debian/tests/control
--- old/diffoscope-220/debian/tests/control     2022-07-29 20:03:28.000000000 
+0200
+++ new/diffoscope-221/debian/tests/control     2022-08-19 16:32:26.000000000 
+0200
@@ -7,7 +7,7 @@
 #   $ mv debian/tests/control.tmp debian/tests/control
 
 Tests: pytest-with-recommends
-Depends: python3-all, diffoscope, black, python3-pytest, python3-h5py, file, 
linux-image-amd64 [amd64] | linux-image-generic [amd64], abootimg, acl, 
apksigner, apktool [!ppc64el !s390x], binutils-multiarch, bzip2, caca-utils, 
colord, db-util, default-jdk-headless | default-jdk | java-sdk, 
device-tree-compiler, docx2txt, e2fsprogs, enjarify, ffmpeg, fontforge-extras, 
fp-utils [!ppc64el !s390x], genisoimage, gettext, ghc, ghostscript, 
giflib-tools, gnumeric, gnupg, gnupg-utils, hdf5-tools, imagemagick, 
jsbeautifier, libarchive-tools, libxmlb-dev, llvm, lz4 | liblz4-tool, 
mono-utils, ocaml-nox, odt2txt, oggvideotools [!s390x], openssh-client, 
openssl, pgpdump, poppler-utils, procyon-decompiler, python3-pdfminer, 
r-base-core, rpm2cpio, sng, sqlite3, squashfs-tools, tcpdump, u-boot-tools, 
unzip, wabt, xmlbeans, xxd | vim-common, xz-utils, zip, zstd, androguard, 
python3-argcomplete, python3-binwalk, python3-defusedxml, python3-distro, 
python3-guestfs, python3-jsondiff, python3-progressbar
 , python3-pypdf2, python3-debian, python3-pyxattr, python3-rpm, python3-tlsh
+Depends: python3-all, diffoscope, black, python3-pytest, python3-h5py, file, 
linux-image-amd64 [amd64] | linux-image-generic [amd64], abootimg, acl, 
apksigner, apktool [!ppc64el !s390x], binutils-multiarch, bzip2, caca-utils, 
colord, db-util, default-jdk-headless | default-jdk | java-sdk, 
device-tree-compiler, docx2txt, e2fsprogs, enjarify, ffmpeg, fontforge-extras, 
fp-utils [!ppc64el !s390x], genisoimage, gettext, ghc, ghostscript, 
giflib-tools, gnumeric, gnupg, gnupg-utils, hdf5-tools, imagemagick, 
jsbeautifier, libarchive-tools, libxmlb-dev, llvm, lz4 | liblz4-tool, 
mono-utils, ocaml-nox, odt2txt, oggvideotools [!s390x], openssh-client, 
openssl, pgpdump, poppler-utils, procyon-decompiler, python3-pdfminer, 
r-base-core, rpm2cpio, sng, sqlite3, squashfs-tools, tcpdump, u-boot-tools, 
unzip, wabt, xmlbeans, xxd, xz-utils, zip, zstd, androguard, 
python3-argcomplete, python3-binwalk, python3-defusedxml, python3-distro, 
python3-guestfs, python3-jsondiff, python3-progressbar, python3-pyp
 df2, python3-debian, python3-pyxattr, python3-rpm, python3-tlsh
 
 Tests: pytest
 Depends: python3-all, diffoscope, python3-pytest, python3-h5py, file, 
python3-tlsh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/diffoscope-220/diffoscope/__init__.py 
new/diffoscope-221/diffoscope/__init__.py
--- old/diffoscope-220/diffoscope/__init__.py   2022-07-29 20:03:28.000000000 
+0200
+++ new/diffoscope-221/diffoscope/__init__.py   2022-08-19 16:32:26.000000000 
+0200
@@ -17,4 +17,4 @@
 # You should have received a copy of the GNU General Public License
 # along with diffoscope.  If not, see <https://www.gnu.org/licenses/>.
 
-VERSION = "220"
+VERSION = "221"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/diffoscope-220/diffoscope/comparators/pdf.py 
new/diffoscope-221/diffoscope/comparators/pdf.py
--- old/diffoscope-220/diffoscope/comparators/pdf.py    2022-07-29 
20:03:28.000000000 +0200
+++ new/diffoscope-221/diffoscope/comparators/pdf.py    2022-08-19 
16:32:26.000000000 +0200
@@ -17,6 +17,8 @@
 # You should have received a copy of the GNU General Public License
 # along with diffoscope.  If not, see <https://www.gnu.org/licenses/>.
 
+import logging
+import os
 import re
 
 from diffoscope.tools import python_module_missing, tool_required
@@ -25,6 +27,8 @@
 from .utils.file import File
 from .utils.command import Command
 
+logger = logging.getLogger(__name__)
+
 try:
     import PyPDF2
 
@@ -95,40 +99,44 @@
 
         return xs
 
-    @staticmethod
-    def dump_pypdf2_metadata(file):
+    def dump_pypdf2_metadata(self, file):
         try:
             pdf = PyPDF2.PdfFileReader(file.path)
             document_info = pdf.getDocumentInfo()
-        except PdfReadError as e:
-            return f"(Could not extract metadata: {e})"
 
-        if document_info is None:
-            return ""
+            if document_info is None:
+                return ""
 
-        xs = []
-        for k, v in sorted(document_info.items()):
-            xs.append("{}: {!r}".format(k.lstrip("/"), v))
+            xs = []
+            for k, v in sorted(document_info.items()):
+                xs.append("{}: {!r}".format(k.lstrip("/"), v))
 
-        return "\n".join(xs)
+            return "\n".join(xs)
+        except PdfReadError as e:
+            msg = f"Could not extract PyPDF2 metadata from 
{os.path.basename(file.name)}: {e}"
+            self.add_comment(msg)
+            logger.error(msg)
+            return ""
 
-    @staticmethod
-    def dump_pypdf2_annotations(file):
+    def dump_pypdf2_annotations(self, file):
         try:
             pdf = PyPDF2.PdfFileReader(file.path)
-        except PdfReadError as e:
-            return f"(Could not open file: {e})"
-
-        xs = []
-        for x in range(pdf.getNumPages()):
-            page = pdf.getPage(x)
 
-            try:
-                for annot in page["/Annots"]:
-                    subtype = annot.getObject()["/Subtype"]
-                    if subtype == "/Text":
-                        xs.append(annot.getObject()["/Contents"])
-            except:
-                pass
+            xs = []
+            for x in range(pdf.getNumPages()):
+                page = pdf.getPage(x)
+
+                try:
+                    for annot in page["/Annots"]:
+                        subtype = annot.getObject()["/Subtype"]
+                        if subtype == "/Text":
+                            xs.append(annot.getObject()["/Contents"])
+                except:
+                    pass
 
-        return "\n".join(xs)
+            return "\n".join(xs)
+        except PdfReadError as e:
+            msg = f"Could not extract PyPDF2 annotations from 
{os.path.basename(file.name)}: {e}"
+            file.add_comment(msg)
+            logger.error(msg)
+            return ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/diffoscope-220/diffoscope/external_tools.py 
new/diffoscope-221/diffoscope/external_tools.py
--- old/diffoscope-220/diffoscope/external_tools.py     2022-07-29 
20:03:28.000000000 +0200
+++ new/diffoscope-221/diffoscope/external_tools.py     2022-08-19 
16:32:26.000000000 +0200
@@ -223,7 +223,7 @@
         "guix": "squashfs-tools",
     },
     "xxd": {
-        "debian": "xxd | vim-common",
+        "debian": "xxd",
         "arch": "vim",
         "FreeBSD": "vim | vim-lite",
         "guix": "xxd",

Reply via email to