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

qpkg: also consider conflicts introduced by package about to be added

- prereq.c (conflicts, resolve, prereq): renamed "conflicts" to
  "old_conflicts"
- prereq.c (new_conflicts, resolve, prereq): also test whether any of the
  conflicts of the package we're about to add matches an installed or
  considered package
- test/conflict, test/instconf: test for conflicts introduced by package
  about to be added
This commit is contained in:
Werner Almesberger
2010-11-22 06:52:53 -03:00
parent c44510ade1
commit b89bcdfd93
3 changed files with 129 additions and 4 deletions

View File

@@ -155,3 +155,70 @@ EOF
expect <<EOF
bar_0
EOF
###############################################################################
qpkg_fail "prerequisite conflicts with dependant" prereq A <<EOF
Package: B
Version: 0
Architecture: test
Conflicts: A
Filename: B
Package: A
Version: 0
Architecture: test
Depends: B
Filename: A
EOF
expect <<EOF
can't resolve A
EOF
###############################################################################
qpkg_fail "prerequisite conflicts with considered package (1)" prereq A <<EOF
Package: B
Version: 0
Architecture: test
Conflicts: C
Filename: B
Package: C
Version: 0
Architecture: test
Filename: C
Package: A
Version: 0
Architecture: test
Depends: B, C
Filename: A
EOF
expect <<EOF
can't resolve A
EOF
###############################################################################
qpkg_fail "prerequisite conflicts with considered package (1)" prereq A <<EOF
Package: B
Version: 0
Architecture: test
Filename: B
Package: C
Version: 0
Architecture: test
Conflicts: B
Filename: C
Package: A
Version: 0
Architecture: test
Depends: B, C
Filename: A
EOF
expect <<EOF
can't resolve A
EOF

View File

@@ -48,3 +48,44 @@ EOF
expect <<EOF
A conflicts with installed packages
EOF
###############################################################################
qpkg_fail "prerequisite conflicts with installed package" prereq A <<EOF
Package: B
Version: 0
Architecture: test
Conflicts: C
Filename: B
Package: A
Version: 0
Architecture: test
Depends: B
Filename: A
Package: C
Version: 0
Architecture: test
Status: installed
EOF
expect <<EOF
can't resolve A
EOF
###############################################################################
qpkg_fail "initial package conflicts with installed package" prereq A <<EOF
Package: A
Version: 0
Architecture: test
Conflicts: C
Filename: A
Package: C
Version: 0
Architecture: test
Status: installed
EOF
expect <<EOF
A conflicts with installed packages