Closed rcarpa closed 6 months ago
From the patch
man page (https://man7.org/linux/man-pages/man1/patch.1.html):
patch's exit status is 0 if all hunks are applied successfully, 1
if some hunks cannot be applied or there were merge conflicts,
and 2 if there is more serious trouble. When applying a set of
patches in a loop it behooves you to check this exit status so
you don't apply a later patch to a partially patched file.
Applying patch
in a loop is exactly what we're doing here
so I'd say the logic here would be:
patch
Looks good to me
We have a logic to apply patches inside the container before running rucio. However, if those patches fail (for example, because the new version of rucio is not compatible with the patch), rucio is still run.
In most cases, this is an non-issue, because this results in a non-valid python file; so rucio fails to start.
Still, it will much better to explicitly fail the container startup when the
patch
command fails.