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:
50
qpkg/test/instconf
Executable file
50
qpkg/test/instconf
Executable 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
|
||||
Reference in New Issue
Block a user