Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix regression test for vital and avoid abreviation in errors
Baptiste Daroussin committed 9 years ago
commit eefd17b60a7cf223f981925bd82beaead18866f2
parent 6cbc942
2 files changed +2 -2
modified libpkg/pkg_jobs.c
@@ -2005,7 +2005,7 @@ pkg_jobs_execute(struct pkg_jobs *j)
		case PKG_SOLVED_UPGRADE_REMOVE:
			p = ps->items[0]->pkg;
			if (ps->type == PKG_SOLVED_DELETE && p->vital && ((flags & PKG_DELETE_FORCE) == 0)) {
-
				pkg_emit_error("Cannot delete vital pkg: %s!", p->name);
+
				pkg_emit_error("Cannot delete vital package: %s!", p->name);
				pkg_emit_error("If you are sure you want to remove %s, ", p->name);
				pkg_emit_error("unset the 'vital' flag with: pkg set -v 0 %s", p->name);
				retcode = EPKG_FATAL;
modified tests/frontend/vital.sh
@@ -40,7 +40,7 @@ EOF

	atf_check \
		-o empty \
-
		-e inline:"${PROGNAME}: Cannot delete vital ${PROGNAME}: test!\n" \
+
		-e inline:"${PROGNAME}: Cannot delete vital package: test!\n${PROGNAME}: If you are sure you want to remove test, \n${PROGNAME}: unset the 'vital' flag with: pkg set -v 0 test\n" \
		-s exit:3 \
		pkg -r ${TMPDIR}/target delete -qy test
	atf_check \