#!/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 distinct pkgid from rpm_files where fileflag & 1 =1  and substr(filename,1,5)='/usr/';
EOSQL
# filter code that can't be fixed
# java-1.*
# GeoIP-Lite-*
cat $REPOCOP_TEST_TMPDIR/msg | grep -E -v '^java-1.' | grep -E -v '^GeoIP-Lite-' > $REPOCOP_TEST_TMPDIR/msg1
for i in `cat $REPOCOP_TEST_TMPDIR/msg1`; do repocop-test-warn -k $i "Files below <tt>/usr</tt> may not be marked as conffiles, since
 <tt>/usr</tt> might be mounted read-only and thus, the local system
 administrator would not have a chance to modify this configuration
 file.
"; done
rm $REPOCOP_TEST_TMPDIR/*
