From 338cd09a4aa1b36b8095dfc14ab534395f9a4a92 Mon Sep 17 00:00:00 2001 From: GianfrancoCostamagna Date: Mon, 4 Mar 2024 14:27:14 +0100 Subject: [PATCH] Work around itstools bug #9648 Forwarded from debian. Having stderr output inside the returned command tricks the system to fail in detecting the version. Ignoring stderr output looks fine to make it build properly: ``` itstool --version /usr/bin/itstool:239: SyntaxWarning: invalid escape sequence '\s' if re.sub('\s+', ' ', text).strip() != '': /usr/bin/itstool:337: SyntaxWarning: invalid escape sequence '\s' message = re.sub('\s+', ' ', message).strip() /usr/bin/itstool:475: SyntaxWarning: invalid escape sequence '\s' return re.sub('\s+', ' ', self.locnote).strip() /usr/bin/itstool:477: SyntaxWarning: invalid escape sequence '\s' return '(itstool) link: ' + re.sub('\s+', ' ', self.locnoteref).strip() /usr/bin/itstool:891: SyntaxWarning: invalid escape sequence '\<' regex = re.compile('(.*) \<(.*)\>, (.*)') /usr/bin/itstool:926: SyntaxWarning: invalid escape sequence '\s' if re.sub('\s+', '', prevtext) == '': /usr/bin/itstool:1452: SyntaxWarning: invalid escape sequence '\.' _locale_pattern = re.compile('([a-zA-Z0-9-]+)(_[A-Za-z0-9]+)?(@[A-Za-z0-9]+)?(\.[A-Za-z0-9]+)?') itstool 2.0.6 ``` --- wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wscript b/wscript index aec6a72db4..f46c3de520 100644 --- a/wscript +++ b/wscript @@ -1008,7 +1008,7 @@ def configure(conf): # freedesktop translations needs itstool > 1.0.3 (-j option) if Options.options.freedesktop: - output = subprocess.Popen("itstool --version", shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines() + output = subprocess.Popen("itstool --version", shell=True, stderr=subprocess.DEVNULL, stdout=subprocess.PIPE).communicate()[0].splitlines() o = output[0].decode('utf-8') itstool = o.split(' ')[0] version = o.split(' ')[1].split('.')