mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-15 08:50:38 +02:00
qpkg/test/bug-adding: found another manifestation of the same problem
This time, we even fail an assertion. Once again, it's because the state changes are out of sync with the "under consideration" stack.
This commit is contained in:
parent
068264ed61
commit
ab5df0a8d8
@ -42,3 +42,57 @@ EOF
|
|||||||
expect <<EOF
|
expect <<EOF
|
||||||
package C version 0 has cyclic dependency
|
package C version 0 has cyclic dependency
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# We also fail (badly) to restore QPKG_ADDING after we moved on:
|
||||||
|
#
|
||||||
|
# A -> B, D
|
||||||
|
# B -> C_1
|
||||||
|
# C_0 -> B
|
||||||
|
# D conflicts with C_1
|
||||||
|
#
|
||||||
|
# "resolve" recurses as follows:
|
||||||
|
#
|
||||||
|
# A_0 -> B
|
||||||
|
# B_0|D -> C
|
||||||
|
# C_1|D -> next (we clear B here !)
|
||||||
|
# D_0 -> done
|
||||||
|
# C_0|D -> next (we try to clear B again)
|
||||||
|
#
|
||||||
|
|
||||||
|
qpkg_fail "BUG: we don't restore QPKG_ADDING, missing errors" \
|
||||||
|
prereq A <<EOF
|
||||||
|
Package: D
|
||||||
|
Version: 0
|
||||||
|
Architecture: test
|
||||||
|
Filename: D
|
||||||
|
|
||||||
|
Package: C
|
||||||
|
Version: 1
|
||||||
|
Architecture: test
|
||||||
|
Filename: C_1
|
||||||
|
|
||||||
|
Package: C
|
||||||
|
Version: 0
|
||||||
|
Architecture: test
|
||||||
|
Depends: B
|
||||||
|
Filename: C_0
|
||||||
|
|
||||||
|
Package: B
|
||||||
|
Version: 0
|
||||||
|
Architecture: test
|
||||||
|
Depends: C
|
||||||
|
Filename: B
|
||||||
|
|
||||||
|
Package: A
|
||||||
|
Version: 0
|
||||||
|
Architecture: test
|
||||||
|
Depends: B, D
|
||||||
|
Filename: A
|
||||||
|
EOF
|
||||||
|
expect <<EOF
|
||||||
|
qpkg: prereq.c:185: resolve: Assertion \`top->pkg->flags & QPKG_ADDING' failed.
|
||||||
|
Aborted
|
||||||
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user