From 06cbde40e2c5311c97465154548022efb2d2142f Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sat, 16 Sep 2017 18:12:27 +0200 Subject: [PATCH] Framework: more often than not, plugins are not installed So in order to bootstrap a plugin during an upgrade we allow the upgrade without the package in place. --- Mk/plugins.mk | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Mk/plugins.mk b/Mk/plugins.mk index a412d71fb..6440c29bb 100644 --- a/Mk/plugins.mk +++ b/Mk/plugins.mk @@ -213,15 +213,13 @@ package: check @${PKG} create -v -m ${WRKSRC} -r ${WRKSRC} \ -p ${WRKSRC}/plist -o ${PKGDIR} -upgrade-check: check - @if ! ${PKG} info ${PLUGIN_PKGNAME} > /dev/null; then \ - echo ">>> Cannot find package. Please run 'pkg install ${PLUGIN_PKGNAME}'" >&2; \ - exit 1; \ - fi +upgrade-check: @rm -rf ${PKGDIR} upgrade: upgrade-check package - @${PKG} delete -fy ${PLUGIN_PKGNAME} + @if ${PKG} info ${PLUGIN_PKGNAME} > /dev/null; then \ + ${PKG} delete -fy ${PLUGIN_PKGNAME}; \ + fi @${PKG} add ${PKGDIR}/*.txz mount: check