diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2020-02-12 23:32:27 -0800 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2020-02-13 10:59:38 -0800 |
commit | c219df8f32291b0e9194f0187032de7b9070fbac (patch) | |
tree | 174697372b5cb0ec18bc07207d0aa584b6e3bfb8 /metadata | |
parent | net-wireless/wpa_supplicant: fix bug #692846 (diff) | |
download | gentoo-c219df8f32291b0e9194f0187032de7b9070fbac.tar.gz gentoo-c219df8f32291b0e9194f0187032de7b9070fbac.tar.bz2 gentoo-c219df8f32291b0e9194f0187032de7b9070fbac.zip |
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 <gyakovlev@gentoo.org>
Diffstat (limited to 'metadata')
-rw-r--r-- | metadata/install-qa-check.d/60appdata-path | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/metadata/install-qa-check.d/60appdata-path b/metadata/install-qa-check.d/60appdata-path new file mode 100644 index 000000000000..578137a3e9e7 --- /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 <gyakovlev@gentoo.org> + +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 |