Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions whipper/program/cdparanoia.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -284,16 +286,20 @@ 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
)
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
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 "
Expand Down Expand Up @@ -580,6 +586,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\.')
Expand Down