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 CC900138350 for ; Thu, 13 Feb 2020 19:00:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F18E6E0833; Thu, 13 Feb 2020 19:00:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 CFCAFE0833 for ; Thu, 13 Feb 2020 19:00:00 +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 72FBB34ED67 for ; Thu, 13 Feb 2020 18:59:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8E3B417 for ; Thu, 13 Feb 2020 18:59:57 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1581620378.c219df8f32291b0e9194f0187032de7b9070fbac.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: metadata/install-qa-check.d/ X-VCS-Repository: repo/gentoo X-VCS-Files: metadata/install-qa-check.d/60appdata-path X-VCS-Directories: metadata/install-qa-check.d/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: c219df8f32291b0e9194f0187032de7b9070fbac X-VCS-Branch: master Date: Thu, 13 Feb 2020 18:59:57 +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: ddae588d-2279-4619-b7ae-cd258290edcc X-Archives-Hash: 1ee6cd65be037f9f417fce974f798031 commit: c219df8f32291b0e9194f0187032de7b9070fbac Author: Georgy Yakovlev gentoo org> AuthorDate: Thu Feb 13 07:32:27 2020 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Thu Feb 13 18:59:38 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c219df8f metadata/install-qa-check.d/60appdata-path: new check this will warn if package installs xml files to /usr/share/appdata this location is deprecated, files should be installed to /usr/share/metainfo https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html Signed-off-by: Georgy Yakovlev gentoo.org> metadata/install-qa-check.d/60appdata-path | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/metadata/install-qa-check.d/60appdata-path b/metadata/install-qa-check.d/60appdata-path new file mode 100644 index 00000000000..578137a3e9e --- /dev/null +++ b/metadata/install-qa-check.d/60appdata-path @@ -0,0 +1,35 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# QA check: ensure that metadata files are installed in /usr/share/metainfo +# Maintainer: Georgy Yakovlev + +appdata_path_check() { + [[ -d ${ED%/}/usr/share/appdata ]] || return + + local found=() f + while read -d '' -r f; do + found+=( "${f%/*}" ) + done < <(find "${ED%/}/usr/share/appdata" -name '*.xml' -print0 || die) + + if [[ ${found[@]} ]]; then + eqawarn + eqawarn "This package seems to install metainfo files into the following" + eqawarn "location(s):" + eqawarn + eqatag -v appdata.invalid-path "${found[@]#${D%/}}" + eqawarn + eqawarn "This location is deprecated, it should not be used anymore by new software." + eqawarn "Appdata/Metainfo files should be installed into /usr/share/metainfo directory." + eqawarn "For more details, please see the freedesktop Upstream Metadata guidelines at" + eqawarn "https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html" + eqawarn + eqawarn "Gentoo Tracker bug: https://bugs.gentoo.org/709450" + eqawarn + fi +} + +appdata_path_check +: # guarantee successful exit + +# vim:ft=sh