1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2025-01-18 18:11:06 +02:00
wernermisc/qpkg/test/instconf
Werner Almesberger c44510ade1 qpkg: detect conflicts with installed packages
- prereq.c (installed_conflicts, free_conflicts, prereq): collect list of
  pre-existing conflicts in installed packages
- prereq.c (prereq): check if package being requested already conflicts
- test/instconf: regression test for conflicts with installed packages
- TODO: updated for full support of conflicts. Mention that we're not
  terribly efficient with handling conflicts.
2010-11-21 23:59:27 -03:00

51 lines
808 B
Bash
Executable File

#!/bin/sh
. ./Common
###############################################################################
qpkg_fail "installed package conflicts with dependency" prereq A <<EOF
Package: B
Version: 0
Architecture: test
Filename: B
Package: A
Version: 0
Architecture: test
Depends: B
Filename: A
Package: C
Version: 0
Architecture: test
Conflicts: B
Status: installed
EOF
expect <<EOF
can't resolve A
EOF
###############################################################################
qpkg_fail "installed package conflicts with initial package" prereq A <<EOF
Package: B
Version: 0
Architecture: test
Filename: B
Package: A
Version: 0
Architecture: test
Depends: B
Filename: A
Package: C
Version: 0
Architecture: test
Conflicts: A
Status: installed
EOF
expect <<EOF
A conflicts with installed packages
EOF