mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-23 20:48:28 +02:00
b181db5b9e
- test/verpref: test version preference (higher wins if there's a choice) - TODO: updated for above change
97 lines
1.4 KiB
Bash
Executable File
97 lines
1.4 KiB
Bash
Executable File
#!/bin/sh
|
|
. ./Common
|
|
|
|
###############################################################################
|
|
|
|
qpkg "prefer later version (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
|
|
Filename: foo
|
|
EOF
|
|
expect <<EOF
|
|
bar_1
|
|
EOF
|
|
|
|
###############################################################################
|
|
|
|
qpkg "prefer later version (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
|
|
Filename: foo
|
|
EOF
|
|
expect <<EOF
|
|
bar_1
|
|
EOF
|
|
|
|
###############################################################################
|
|
|
|
qpkg "dependency trumps preference (1)" prereq foo <<EOF
|
|
Package: bar
|
|
Version: 0
|
|
Architecture: test
|
|
Filename: bar_0
|
|
|
|
Package: bar
|
|
Version: 1
|
|
Architecture: test
|
|
Depends: bad
|
|
Filename: bar_1
|
|
|
|
Package: foo
|
|
Version: 0
|
|
Architecture: test
|
|
Depends: bar
|
|
Filename: foo
|
|
EOF
|
|
expect <<EOF
|
|
bar_0
|
|
EOF
|
|
|
|
###############################################################################
|
|
|
|
qpkg "dependency trumps preference (2)" prereq foo <<EOF
|
|
Package: bar
|
|
Version: 1
|
|
Architecture: test
|
|
Depends: bad
|
|
Filename: bar_1
|
|
|
|
Package: bar
|
|
Version: 0
|
|
Architecture: test
|
|
Filename: bar_0
|
|
|
|
Package: foo
|
|
Version: 0
|
|
Architecture: test
|
|
Depends: bar
|
|
Filename: foo
|
|
EOF
|
|
expect <<EOF
|
|
bar_0
|
|
EOF
|