[Python-apps-team] Bug#923606: beancount: FTBFS randomly (gpg-related race condition)

Santiago Vila sanvila at unex.es
Sun Apr 21 16:52:36 BST 2019


tags 923606 + patch
thanks

On Tue, 9 Apr 2019, Stefano Zacchiroli wrote:

> On Tue, Apr 09, 2019 at 10:38:10AM +0200, Santiago Vila wrote:
> > I obviously have interest to fix this before the release, because I
> > can build 99.99% of packages in my setup and this is an inconvenient
> > exception for me. I don't like NMUs. Should I join the Python
> > Applications Packaging Team? Please tell me how I would proceed.
> 
> either way is fine, and also just submitting a merge request would do
> (although please let this bug log know if you do so, to make sure it
> doesn't get overlooked).

Well, could we do it the old-fashioned way for this time?

In other words: My "merge request" is below.

Thanks.

diff -Nru beancount-2.2.0/debian/changelog beancount-2.2.0/debian/changelog
--- beancount-2.2.0/debian/changelog	2019-01-14 09:01:37.000000000 +0000
+++ beancount-2.2.0/debian/changelog	2019-04-21 15:00:36.000000000 +0000
@@ -1,3 +1,11 @@
+beancount (2.2.0-3) unstable; urgency=medium
+
+  [ Santiago Vila ]
+  * patches/0003: Ignore FileNotFoundError from self.tmpdir.cleanup().
+    Fixes a FTBFS problem which happens randomly (Closes: #923606)
+
+ -- Stefano Zacchiroli <zack at debian.org>  Sun, 21 Apr 2019 17:00:36 +0200
+
 beancount (2.2.0-2) unstable; urgency=medium
 
   * rules: do not ship *.picklecache files with Python examples (fixes
diff -Nru beancount-2.2.0/debian/patches/0003-Ignore-FileNotFoundError-from-self.tmpdir.cleanup.patch beancount-2.2.0/debian/patches/0003-Ignore-FileNotFoundError-from-self.tmpdir.cleanup.patch
--- beancount-2.2.0/debian/patches/0003-Ignore-FileNotFoundError-from-self.tmpdir.cleanup.patch	1970-01-01 00:00:00.000000000 +0000
+++ beancount-2.2.0/debian/patches/0003-Ignore-FileNotFoundError-from-self.tmpdir.cleanup.patch	2019-04-21 15:00:36.000000000 +0000
@@ -0,0 +1,18 @@
+From: Santiago Vila <sanvila at debian.org>
+Date: Sun, 21 Apr 2019 16:48:40 +0200
+Subject: Ignore FileNotFoundError from self.tmpdir.cleanup()
+
+--- a/beancount/utils/encryption_test.py
++++ b/beancount/utils/encryption_test.py
+@@ -98,7 +98,10 @@
+         self.run_gpg('--import', stdin=TEST_SECRET_KEY.encode('ascii'))
+ 
+     def tearDown(self):
+-        self.tmpdir.cleanup()
++        try:
++            self.tmpdir.cleanup()
++        except FileNotFoundError:
++            pass
+ 
+     def run_gpg(self, *args, **kw):
+         command = ('gpg',
diff -Nru beancount-2.2.0/debian/patches/series beancount-2.2.0/debian/patches/series
--- beancount-2.2.0/debian/patches/series	2019-01-14 09:01:37.000000000 +0000
+++ beancount-2.2.0/debian/patches/series	2019-04-21 15:00:36.000000000 +0000
@@ -1,2 +1,3 @@
 0001-Remove-fonts.googleapis.com-links-for-the-bean-web-t.patch
 0002-make-test_version-more-lax-to-accept-non-git-hg-vers.patch
+0003-Ignore-FileNotFoundError-from-self.tmpdir.cleanup.patch



More information about the Python-apps-team mailing list