#!/bin/sh
sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <<EOSQL
attach database '$REPOCOP_TEST_DBDIR/rpm.db' as rpm;
.mode tabs
.output $REPOCOP_TEST_TMPDIR/fail
select pkgid, filename from rpm_files where filename glob '/usr/X11R6/lib*/X11/app-defaults/*';
EOSQL
cat > $REPOCOP_TEST_TMPDIR/repocop.awk <<'EOF'
BEGIN {FS="\t"}
// {system("repocop-test-fail -k " $1 " '" $2 ": The app-defaults files have moved to /etc/X11/app-defaults/. Files in the old directory, /usr/X11R6/lib/X11/app-defaults/, will no longer be used by X. The old directory should not exist in packages at all; this prevents X from replacing it with a compatability symlink.'")}
EOF
cat $REPOCOP_TEST_TMPDIR/fail | awk -f $REPOCOP_TEST_TMPDIR/repocop.awk
rm $REPOCOP_TEST_TMPDIR/*
