#!/bin/sh -efu

. gb-sh-functions

RC=0

while read -r N EVR A F P I; do
	if py26_deps=$(rpmquery --requires --provides -p "$P" |
		grep -E '^(python2\.6|python = 2\.6|libpython2\.6)' )
	then
		echo >&2 $F: $py26_deps
		RC=1
	fi
done <plan/add-bin

if [ $RC -gt 0 ]; then
	stamp_echo >&2 'python2.6 dependencies are no longer allowed'
	stamp_echo >&2 'sorry for inconvenience, please wait for python2.7 and try again later'
	exit 1
fi
