2010-11-21 09:32:04 +02:00
|
|
|
#!/bin/sh
|
|
|
|
. ./Common
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
2010-11-21 13:26:02 +02:00
|
|
|
qpkg "no prereq for new package" prereq foo <<EOF
|
|
|
|
Package: foo
|
|
|
|
Version: 0
|
|
|
|
Architecture: test
|
|
|
|
Filename: foo_0_test.ipkg
|
|
|
|
EOF
|
|
|
|
expect <<EOF
|
|
|
|
EOF
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
2010-11-21 09:32:04 +02:00
|
|
|
qpkg "new prereq for new package" prereq foo <<EOF
|
|
|
|
Package: bar
|
|
|
|
Version: 1
|
|
|
|
Architecture: test
|
|
|
|
Filename: bar_1_test.ipkg
|
|
|
|
|
|
|
|
Package: foo
|
|
|
|
Version: 0
|
|
|
|
Architecture: test
|
|
|
|
Depends: bar
|
|
|
|
Filename: foo_0_test.ipkg
|
|
|
|
EOF
|
|
|
|
expect <<EOF
|
|
|
|
bar_1_test.ipkg
|
|
|
|
EOF
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
qpkg "installed prereq for new package (install record first)" prereq foo <<EOF
|
|
|
|
Package: bar
|
|
|
|
Version: 1
|
|
|
|
Architecture: test
|
|
|
|
Filename: bar_1_test.ipkg
|
|
|
|
|
|
|
|
Package: bar
|
|
|
|
Version: 1
|
|
|
|
Architecture: test
|
|
|
|
Status: installed
|
|
|
|
|
|
|
|
Package: foo
|
|
|
|
Version: 0
|
|
|
|
Architecture: test
|
|
|
|
Depends: bar
|
|
|
|
Filename: foo_0_test.ipkg
|
|
|
|
EOF
|
|
|
|
expect <<EOF
|
|
|
|
EOF
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
qpkg "installed prereq for new package (package record first)" prereq foo <<EOF
|
|
|
|
Package: foo
|
|
|
|
Version: 0
|
|
|
|
Architecture: test
|
|
|
|
Depends: bar
|
|
|
|
Filename: foo_0_test.ipkg
|
|
|
|
|
|
|
|
Package: bar
|
|
|
|
Version: 1
|
|
|
|
Architecture: test
|
|
|
|
Status: installed
|
|
|
|
|
|
|
|
Package: bar
|
|
|
|
Version: 1
|
|
|
|
Architecture: test
|
|
|
|
Filename: bar_1_test.ipkg
|
|
|
|
EOF
|
|
|
|
expect <<EOF
|
|
|
|
EOF
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
qpkg_fail "unknown prereq for new package" prereq foo <<EOF
|
|
|
|
Package: foo
|
|
|
|
Version: 0
|
|
|
|
Architecture: test
|
|
|
|
Depends: bar
|
|
|
|
Filename: foo_0_test.ipkg
|
|
|
|
EOF
|
|
|
|
expect <<EOF
|
|
|
|
can't resolve foo
|
|
|
|
EOF
|