#!/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 rpm_requires.pkgid,requirename from rpm_requires where pkgid not glob 'mozilla-plugin-j*' and pkgid not glob 'java-1.*-*' and requirename glob 'java-1.*-*' and not requirename glob 'java-1.*.*-gcj';
EOSQL
perl -ne 'chomp;@a=split /\t/;system(qw/repocop-test-fail -k/,$a[0], "The package has JVM-specific Requires: $a[1]. Those requires are often due to packaging errors and also specifically forbidden by Java Packageing Policy. If you really really need it, write it in more indirect way.")' $REPOCOP_TEST_TMPDIR/msg
rm $REPOCOP_TEST_TMPDIR/*
