#!/bin/sh
. ./Common

###############################################################################

qpkg_fail "cyclic dependency (one step)" prereq foo <<EOF
Package: foo
Version: 0
Architecture: test
Depends: foo
Filename: foo_0_test.ipkg
EOF
expect <<EOF
package foo version 0 has cyclic dependency
EOF

###############################################################################

qpkg_fail "cyclic dependency (two steps)" prereq foo <<EOF
Package: bar
Version: 1
Architecture: test
Depends: foo
Filename: bar_1_test.ipkg

Package: foo
Version: 0
Architecture: test
Depends: bar
Filename: foo_0_test.ipkg
EOF
expect <<EOF
package foo version 0 has cyclic dependency
EOF
