diff --git a/InstallAppdata.sh b/InstallAppdata.sh index 6def0b1..bff742d 100644 --- a/InstallAppdata.sh +++ b/InstallAppdata.sh @@ -34,14 +34,18 @@ done # Install new appdata files while ([ "$1" = "-R" ]); do case $4 in - rpm-md) - appstream-util install-origin "$2" $6$RPMMD/*appdata.xml.gz $6$RPMMD/*app-icons.tar.gz 2>&1 > /dev/null - ;; - yast2) - appstream-util install-origin "$2" "$6$YAST2/appdata.xml.gz" "$6$YAST2/appdata-icons.tar.gz" 2>&1 > /dev/null - ;; - *) - echo "unknown repo type - Appstream data not considered" + rpm-md) + if appstream-util validate-relax "$6$RPMMD/*appdata.xml.gz"; then + appstream-util install-origin "$2" "$6$RPMMD/*appdata.xml.gz" $6$RPMMD/*app-icons.tar.gz 2>&1 > /dev/null + fi + ;; + yast2) + if appstream-util validate-relax "$6$YAST2/appdata.xml.gz"; then + appstream-util install-origin "$2" "$6$YAST2/appdata.xml.gz" "$6$YAST2/appdata-icons.tar.gz" 2>&1 > /dev/null + fi + ;; + *) + echo "unknown repo type - Appstream data not considered" esac shift 6 done diff --git a/libzypp-plugin-appdata.changes b/libzypp-plugin-appdata.changes index e08dbf5..93114bc 100644 --- a/libzypp-plugin-appdata.changes +++ b/libzypp-plugin-appdata.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 31 13:41:00 UTC 2015 - dimstar@opensuse.org + +- InstallAppdata.sh: only install AppStream metadata, that + validates. + ------------------------------------------------------------------- Fri Mar 20 12:55:38 UTC 2015 - dimstar@opensuse.org diff --git a/libzypp-plugin-appdata.spec b/libzypp-plugin-appdata.spec index 4c11197..8ed0fe1 100644 --- a/libzypp-plugin-appdata.spec +++ b/libzypp-plugin-appdata.spec @@ -30,7 +30,7 @@ BuildArch: noarch BuildRequires: appstream-glib >= 0.2.4 BuildRequires: fdupes # appstream-glib >= 0.3.6 is the first to correctly to appstream-util uninstall in /var/cache -Requires: appstream-glib >= 0.3.6 +Requires: appstream-glib > 0.3.5 # appdata hook was introduced in libzypp 14.29.4 Requires: libzypp >= 14.29.4