summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/quodlibet-fix-mtime-tests.patch
diff options
context:
space:
mode:
authorAlice BRENON <alice.brenon@ens-lyon.fr>2023-05-05 15:26:37 +0200
committerEfraim Flashner <efraim@flashner.co.il>2023-06-13 09:43:37 +0300
commitb188c41d930dbe8142c1f377d3c8f2580ff1277c (patch)
treea10d1747f247e0e98046343280529cf601686d51 /gnu/packages/patches/quodlibet-fix-mtime-tests.patch
parent63f8af77ec7be5434290f443140e5c00832940e3 (diff)
gnu: quodlibet: Fix compatibility with python-3.10.
Reported in #63205. * gnu/packages/music.scm (quodlibet)[source]: Add two backported patches. [arguments]: Adjust 'check phase to change skipped tests. * gnu/packages/patches/quodlibet-fix-invalid-glob.patch, gnu/packages/patches/quodlibet-fix-mtime-tests.patch: New files. * gnu/local.mk (dist_patch_DATA): Register them. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu/packages/patches/quodlibet-fix-mtime-tests.patch')
-rw-r--r--gnu/packages/patches/quodlibet-fix-mtime-tests.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/patches/quodlibet-fix-mtime-tests.patch b/gnu/packages/patches/quodlibet-fix-mtime-tests.patch
new file mode 100644
index 0000000000..037f77d868
--- /dev/null
+++ b/gnu/packages/patches/quodlibet-fix-mtime-tests.patch
@@ -0,0 +1,39 @@
+From 06a32b319f065550efe0d2a9ff10ca6bdc32b893 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sat, 23 Jul 2022 20:15:18 +0200
+Subject: [PATCH] operon: hopefully better fix for flaky mtime tests
+
+copy the mtime after we write everything, so there is no chance of
+it changing before we note the initial value.
+---
+ quodlibet/operon/commands.py | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/quodlibet/operon/commands.py b/quodlibet/operon/commands.py
+index e0a5ef33a..af2dcfa8b 100644
+--- a/quodlibet/operon/commands.py
++++ b/quodlibet/operon/commands.py
+@@ -227,16 +227,16 @@ class EditCommand(Command):
+ # write to tmp file
+ fd, path = tempfile.mkstemp(suffix=".txt")
+
+- # XXX: copy mtime here so we can test for changes in tests by
+- # setting a out of date mtime on the source song file
+- copy_mtime(args[0], path)
+-
+ try:
+ try:
+ os.write(fd, dump)
+ finally:
+ os.close(fd)
+
++ # XXX: copy mtime here so we can test for changes in tests by
++ # setting a out of date mtime on the source song file
++ copy_mtime(args[0], path)
++
+ # only parse the result if the editor returns 0 and the mtime has
+ # changed
+ old_mtime = mtime(path)
+--
+2.39.2
+