From b512d57ce77b28bc9574bed095c7400c46c947f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20CORBASSON?= Date: Mon, 9 Feb 2026 18:11:11 +0100 Subject: [PATCH 1/2] Bug #234 was fixed in cd-paranoia 10.2+2.0.2; hide the warning in >=10.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Loïc CORBASSON --- whipper/program/cdparanoia.py | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/whipper/program/cdparanoia.py b/whipper/program/cdparanoia.py index 5c4b7793..157103e7 100644 --- a/whipper/program/cdparanoia.py +++ b/whipper/program/cdparanoia.py @@ -284,16 +284,21 @@ def start(self, runner): self.path]) logger.debug('running %s', (" ".join(argv), )) if self._offset > 587: - logger.warning( - "because of a cd-paranoia upstream bug whipper may fail to " - "work correctly when using offset values > 587 (current " - "value: %d) and print warnings like this: 'file size 0 did " - "not match expected size'. For more details please check the " - "following issues: " - "https://github.com/whipper-team/whipper/issues/234 and " - "https://github.com/rocky/libcdio-paranoia/issues/14", - self._offset - ) + from pkg_resources import parse_version as V + if V(_CDPARANOIA_VERSION) <= V('10.2'): + # the bug was fixed in cd-paranoia 10.2+2.0.2 + # but all cd-paranoia 10.2 releases have the same version number, + # so we match up to 10.2 + logger.warning( + "because of a cd-paranoia upstream bug whipper may fail to " + "work correctly when using offset values > 587 (current " + "value: %d) and print warnings like this: 'file size 0 did " + "not match expected size'. For more details please check the " + "following issues: " + "https://github.com/whipper-team/whipper/issues/234 and " + "https://github.com/rocky/libcdio-paranoia/issues/14", + self._offset + ) if stopTrack == 99: logger.warning( "because of a cd-paranoia upstream bug whipper may fail to " @@ -580,6 +585,12 @@ def getCdParanoiaVersion(): return getter.get() +try: + _CDPARANOIA_VERSION = getCdParanoiaVersion().split(' ')[1] +except IndexError: + _CDPARANOIA_VERSION = '0' + + _OK_RE = re.compile(r'Drive tests OK with Paranoia.') _WARNING_RE = re.compile(r'WARNING! PARANOIA MAY NOT BE') _ABORTING_RE = re.compile(r'aborting test\.') From 045c9b6444f504d20f3ffe48b7ebfd7368ec4fbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20CORBASSON?= Date: Mon, 9 Feb 2026 18:40:13 +0100 Subject: [PATCH 2/2] No longer rely on MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Loïc CORBASSON --- whipper/program/cdparanoia.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/whipper/program/cdparanoia.py b/whipper/program/cdparanoia.py index 157103e7..9024c91e 100644 --- a/whipper/program/cdparanoia.py +++ b/whipper/program/cdparanoia.py @@ -27,6 +27,8 @@ import tempfile import time +from packaging.version import Version + from whipper.common import common from whipper.common import task as ctask from whipper.extern import asyncsub @@ -284,8 +286,7 @@ def start(self, runner): self.path]) logger.debug('running %s', (" ".join(argv), )) if self._offset > 587: - from pkg_resources import parse_version as V - if V(_CDPARANOIA_VERSION) <= V('10.2'): + if Version(_CDPARANOIA_VERSION) <= Version('10.2'): # the bug was fixed in cd-paranoia 10.2+2.0.2 # but all cd-paranoia 10.2 releases have the same version number, # so we match up to 10.2