From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8B2F4138350 for ; Fri, 31 Jan 2020 17:55:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6D0EAE0839; Fri, 31 Jan 2020 17:55:37 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 55ED0E0839 for ; Fri, 31 Jan 2020 17:55:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4863234E584 for ; Fri, 31 Jan 2020 17:55:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CF2737B for ; Fri, 31 Jan 2020 17:55:33 +0000 (UTC) From: "Sebastian Pipping" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sebastian Pipping" Message-ID: <1580493275.0c06fc1d848f0b891b210778b2a99b7396aa8871.sping@gentoo> Subject: [gentoo-commits] proj/metagen:master commit in: metagen/ X-VCS-Repository: proj/metagen X-VCS-Files: metagen/metagenerator.py X-VCS-Directories: metagen/ X-VCS-Committer: sping X-VCS-Committer-Name: Sebastian Pipping X-VCS-Revision: 0c06fc1d848f0b891b210778b2a99b7396aa8871 X-VCS-Branch: master Date: Fri, 31 Jan 2020 17:55:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0a0ec2f8-c18d-439b-abac-3653a6ef0128 X-Archives-Hash: 13d90a85790564710f3e50bb698823a0 commit: 0c06fc1d848f0b891b210778b2a99b7396aa8871 Author: Sebastian Pipping gentoo org> AuthorDate: Fri Jan 31 17:51:23 2020 +0000 Commit: Sebastian Pipping gentoo org> CommitDate: Fri Jan 31 17:54:35 2020 +0000 URL: https://gitweb.gentoo.org/proj/metagen.git/commit/?id=0c06fc1d Get document type declaration back to a single Signed-off-by: Sebastian Pipping gentoo.org> metagen/metagenerator.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/metagen/metagenerator.py b/metagen/metagenerator.py index e733997..c0b79d7 100755 --- a/metagen/metagenerator.py +++ b/metagen/metagenerator.py @@ -75,7 +75,13 @@ class MyMetadata: # Re-write indentation to tabulators # (for backwards compatibility and smaller diffs with existing files) reparsed = minidom.parseString(xml_text) - return reparsed.toprettyxml(indent='\t', encoding='UTF-8').decode() + xml_text = reparsed.toprettyxml(indent='\t', encoding='UTF-8').decode() + + # Get doctype back on a single line + # - for compatibility with output produced by metagen <0.7 + # - to make pkgcheck stop from warning about PkgMetadataXmlIndentation + return xml_text.replace('