This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=5c56170b1a4e3d45d546a090d6ad466c933b4926

commit 5c56170b1a4e3d45d546a090d6ad466c933b4926
Author: Guillem Jover <[email protected]>
AuthorDate: Wed May 10 23:56:54 2023 +0200

    test: Fix t-disappear-depended test
    
    The test was missing a Replaces field, and a purge and then an
    install to create the scenario it was trying to check.
---
 tests/Makefile                                                |  2 +-
 tests/t-disappear-depended/Makefile                           | 11 +++++++----
 .../{pkg-normal => pkg-disappear}/test-dir/test-normal        |  0
 tests/t-disappear-depended/pkg-normal/DEBIAN/control          |  1 +
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index 8efe10544..949baa62c 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -20,7 +20,6 @@ TESTS_MANUAL += t-conffile-prompt
 TESTS_FAIL :=
 TESTS_FAIL += t-dir-leftover-deadlock
 TESTS_FAIL += t-dir-shared-replaces-lost
-TESTS_FAIL += t-disappear-depended
 TESTS_FAIL += t-conffile-divert-conffile
 TESTS_FAIL += t-breaks-multiarch
 
@@ -47,6 +46,7 @@ TESTS_PASS += t-depends
 TESTS_PASS += t-dir-leftover-parents
 TESTS_PASS += t-dir-leftover-conffile
 TESTS_PASS += t-disappear
+TESTS_PASS += t-disappear-depended
 TESTS_PASS += t-disappear-empty
 TESTS_PASS += t-provides
 TESTS_PASS += t-provides-self
diff --git a/tests/t-disappear-depended/Makefile 
b/tests/t-disappear-depended/Makefile
index f7b836282..212fc9b39 100644
--- a/tests/t-disappear-depended/Makefile
+++ b/tests/t-disappear-depended/Makefile
@@ -3,19 +3,22 @@ TESTS_DEB := pkg-normal pkg-depend pkg-disappear
 include ../Test.mk
 
 test-case:
-       # test disappearing depended package
+       # Test disappearing depended package.
        $(DPKG_INSTALL) pkg-disappear.deb
        $(DPKG_INSTALL) pkg-depend.deb
        $(DPKG_INSTALL) pkg-normal.deb
-       # should not disappear while it's being depended on
+       # Should not disappear while it is being depended on.
        $(call pkg_is_installed,pkg-disappear)
        $(DPKG_PURGE) pkg-depend
+       $(DPKG_PURGE) pkg-normal
+       :
+       # Should disappear now that it is not being depended on.
+       $(DPKG_INSTALL) pkg-disappear.deb
        $(DPKG_INSTALL) pkg-normal.deb
-       # should have been disappered now
+       # Should have been disappered now.
        $(call pkg_is_not_installed,pkg-disappear)
 
 test-clean:
        -$(DPKG_PURGE) pkg-depend
        -$(DPKG_PURGE) pkg-disappear
        $(DPKG_PURGE) pkg-normal
-
diff --git a/tests/t-disappear-depended/pkg-normal/test-dir/test-normal 
b/tests/t-disappear-depended/pkg-disappear/test-dir/test-normal
similarity index 100%
copy from tests/t-disappear-depended/pkg-normal/test-dir/test-normal
copy to tests/t-disappear-depended/pkg-disappear/test-dir/test-normal
diff --git a/tests/t-disappear-depended/pkg-normal/DEBIAN/control 
b/tests/t-disappear-depended/pkg-normal/DEBIAN/control
index 09e51b29c..6d825371a 100644
--- a/tests/t-disappear-depended/pkg-normal/DEBIAN/control
+++ b/tests/t-disappear-depended/pkg-normal/DEBIAN/control
@@ -4,5 +4,6 @@ Section: test
 Priority: extra
 Maintainer: Dpkg Developers <[email protected]>
 Architecture: all
+Replaces: pkg-disappear
 Description: test package - normal
 

-- 
Dpkg.Org's dpkg

Reply via email to