1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2025-04-21 12:27:27 +03:00

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.
This commit is contained in:
Werner Almesberger
2010-11-21 23:51:35 -03:00
parent be31904f5d
commit c44510ade1
3 changed files with 103 additions and 9 deletions

50
qpkg/test/instconf Executable file
View File

@@ -0,0 +1,50 @@
#!/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