[med-svn] [Git][med-team/toil][master] 2 commits: Add patch to fix FTBFS with jobStores tests (Closes: #1005479)

Nilesh Patra (@nilesh) gitlab at salsa.debian.org
Thu Mar 10 12:58:45 GMT 2022



Nilesh Patra pushed to branch master at Debian Med / toil


Commits:
08345ef6 by Nilesh Patra at 2022-03-10T17:55:03+05:30
Add patch to fix FTBFS with jobStores tests (Closes: #1005479)

- - - - -
fbe7deed by Nilesh Patra at 2022-03-10T17:55:57+05:30
Upload to unstable

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/atomic_copy_as_alternative.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+toil (5.6.0-3) unstable; urgency=medium
+
+  * Team Upload.
+  * Add patch to fix FTBFS with jobStores
+    tests (Closes: #1005479)
+
+ -- Nilesh Patra <nilesh at debian.org>  Thu, 10 Mar 2022 17:55:25 +0530
+
 toil (5.6.0-2) unstable; urgency=medium
 
   * {Autopkg,}tests: sync the skiped tests


=====================================
debian/patches/atomic_copy_as_alternative.patch
=====================================
@@ -0,0 +1,30 @@
+Description: os.link does not work with debci based setup and hence default to atomic copy
+ when it does not work as intended
+Author: Nilesh Patra <nilesh at debian.org>
+Last-Update: 2022-03-10
+--- a/src/toil/jobStores/fileJobStore.py
++++ b/src/toil/jobStores/fileJobStore.py
+@@ -491,13 +491,16 @@
+                 return
+             except OSError as e:
+                 if e.errno == errno.EEXIST:
+-                    # Overwrite existing file, emulating shutil.copyfile().
+-                    os.unlink(local_path)
+-                    # It would be very unlikely to fail again for same reason but possible
+-                    # nonetheless in which case we should just give up.
+-                    os.link(jobStoreFilePath, local_path)
+-                    # Now we succeeded and don't need to copy
+-                    return
++                    try:
++                        # Overwrite existing file, emulating shutil.copyfile().
++                        os.unlink(local_path)
++                        # It would be very unlikely to fail again for same reason but possible
++                        # nonetheless in which case we should just give up.
++                        os.link(jobStoreFilePath, local_path)
++                        # Now we succeeded and don't need to copy
++                        return
++                    except:
++                        pass
+                 elif e.errno == errno.EXDEV:
+                     # It's a cross-device link even though it didn't appear to be.
+                     # Just keep going and hit the file copy case.


=====================================
debian/patches/series
=====================================
@@ -6,3 +6,4 @@ soften-mesos-deps
 soften-pydocker-dep
 ship_tests
 skip_py_tes_dep
+atomic_copy_as_alternative.patch



View it on GitLab: https://salsa.debian.org/med-team/toil/-/compare/f71b3dc9ceb995b2bf0dbb454724b88985456550...fbe7deed126dd0c917241771a6e2a09b9b29fc51

-- 
View it on GitLab: https://salsa.debian.org/med-team/toil/-/compare/f71b3dc9ceb995b2bf0dbb454724b88985456550...fbe7deed126dd0c917241771a6e2a09b9b29fc51
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220310/905f33b9/attachment-0001.htm>


More information about the debian-med-commit mailing list