mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-15 12:34:05 +02:00
158 lines
2.4 KiB
Plaintext
158 lines
2.4 KiB
Plaintext
|
#!/bin/sh
|
||
|
. ./Common
|
||
|
|
||
|
###############################################################################
|
||
|
|
||
|
qpkg_fail "direct conflict precludes resolution" prereq A <<EOF
|
||
|
Package: B
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Filename: B
|
||
|
|
||
|
Package: A
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Depends: B
|
||
|
Conflicts: B
|
||
|
Filename: A
|
||
|
EOF
|
||
|
expect <<EOF
|
||
|
can't resolve A
|
||
|
EOF
|
||
|
|
||
|
###############################################################################
|
||
|
|
||
|
qpkg_fail "indirect conflict precludes resolution" prereq A <<EOF
|
||
|
Package: C
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Filename: C
|
||
|
|
||
|
Package: B
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Depends: C
|
||
|
Filename: B
|
||
|
|
||
|
Package: A
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Depends: B
|
||
|
Conflicts: C
|
||
|
Filename: A
|
||
|
EOF
|
||
|
expect <<EOF
|
||
|
can't resolve A
|
||
|
EOF
|
||
|
|
||
|
###############################################################################
|
||
|
|
||
|
qpkg_fail "aggregation of conflicts" prereq A <<EOF
|
||
|
Package: C
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Filename: C
|
||
|
|
||
|
Package: B
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Depends: C
|
||
|
Conflicts: C
|
||
|
Filename: B
|
||
|
|
||
|
Package: A
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Depends: B
|
||
|
Filename: A
|
||
|
EOF
|
||
|
expect <<EOF
|
||
|
can't resolve A
|
||
|
EOF
|
||
|
|
||
|
###############################################################################
|
||
|
|
||
|
qpkg_fail "conflicts honor version (match)" prereq A <<EOF
|
||
|
Package: B
|
||
|
Version: 1
|
||
|
Architecture: test
|
||
|
Filename: B
|
||
|
|
||
|
Package: A
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Depends: B
|
||
|
Conflicts: B (= 1)
|
||
|
Filename: A
|
||
|
EOF
|
||
|
expect <<EOF
|
||
|
can't resolve A
|
||
|
EOF
|
||
|
|
||
|
###############################################################################
|
||
|
|
||
|
qpkg "conflicts honor version (mismatch)" prereq A <<EOF
|
||
|
Package: B
|
||
|
Version: 1
|
||
|
Architecture: test
|
||
|
Filename: B
|
||
|
|
||
|
Package: A
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Depends: B
|
||
|
Conflicts: B (= 0)
|
||
|
Filename: A
|
||
|
EOF
|
||
|
expect <<EOF
|
||
|
B
|
||
|
EOF
|
||
|
|
||
|
###############################################################################
|
||
|
|
||
|
qpkg "conflict trumps preference (1)" prereq foo <<EOF
|
||
|
Package: bar
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Filename: bar_0
|
||
|
|
||
|
Package: bar
|
||
|
Version: 1
|
||
|
Architecture: test
|
||
|
Filename: bar_1
|
||
|
|
||
|
Package: foo
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Depends: bar
|
||
|
Conflicts: bar (>= 1)
|
||
|
Filename: foo
|
||
|
EOF
|
||
|
expect <<EOF
|
||
|
bar_0
|
||
|
EOF
|
||
|
|
||
|
###############################################################################
|
||
|
|
||
|
qpkg "conflict trumps preference (2)" prereq foo <<EOF
|
||
|
Package: bar
|
||
|
Version: 1
|
||
|
Architecture: test
|
||
|
Filename: bar_1
|
||
|
|
||
|
Package: bar
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Filename: bar_0
|
||
|
|
||
|
Package: foo
|
||
|
Version: 0
|
||
|
Architecture: test
|
||
|
Depends: bar
|
||
|
Conflicts: bar (>= 1)
|
||
|
Filename: foo
|
||
|
EOF
|
||
|
expect <<EOF
|
||
|
bar_0
|
||
|
EOF
|