From cdcb6c6359e8ee2a590c3c40aa3b4d57ec3b1e80 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 20 Oct 2016 20:49:08 +0200 Subject: adapt testsuite to rpm-4.13.0~rc2 ...which fixed %preun not aborting package erasure --- NEWS | 2 ++ t/superuser--failing-scriptlets.t | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 819ed10e..bcb77612 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- adapt testsuite to rpm-4.13.0~rc2 + Version 8.104 - 15 October 2016 - fix more Getopt::Long breakages (drop the "gnu_compat" option) diff --git a/t/superuser--failing-scriptlets.t b/t/superuser--failing-scriptlets.t index 1f0f733f..80c81146 100644 --- a/t/superuser--failing-scriptlets.t +++ b/t/superuser--failing-scriptlets.t @@ -12,7 +12,7 @@ need_root_and_prepare(); test_install_rpm_fail('pre'); test_install_rpm_fail('pretrans'); test_install_rpm('post'); -test_install_rpm('preun'); +test_install_rpm_but_uninstall_fail('preun'); test_install_rpm('postun'); test_install_rpm('posttrans'); @@ -39,6 +39,16 @@ sub test_install_rpm_fail { check_installed_fullnames_and_remove("sh-1-1"); } +sub test_install_rpm_but_uninstall_fail { + my ($name) = @_; + test_install_rpm_no_remove('sh'); + system_("rpm --root $::pwd/root -i media/$medium_name/$name-*.rpm"); + check_installed_fullnames("$name-1-1", "sh-1-1"); + system_should_fail("rpm --root $::pwd/root -e $name"); + system_("rpm --root $::pwd/root -e $name --nopreun"); + check_installed_fullnames_and_remove("sh-1-1"); +} + sub test_install_upgrade_rpm { my ($name) = @_; -- cgit v1.2.1