#!/bin/sh
sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <<EOSQL
attach database '$REPOCOP_TEST_DBDIR/rpm.db' as rpm;
.mode tabs
.output $REPOCOP_TEST_TMPDIR/msg
select pkgid, filename from rpm_files where filename glob '/usr/share/icons/*' and (filename glob '/usr/share/icons/mini/*' or filename glob '/usr/share/icons/large/*');
EOSQL
perl -ne 'chomp;@a=split /\t/;system(qw/repocop-test-fail -k/,$a[0], "Pixmap $a[1] is installed in the deprecated location. Move it to %_liconsdir or %_miconsdir. See http://www.altlinux.org/IconPathsPolicy.")' $REPOCOP_TEST_TMPDIR/msg
rm $REPOCOP_TEST_TMPDIR/*
