Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Jul 2016 11:54:32 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r419361 - in branches/2016Q3/ports-mgmt/pkg: . files
Message-ID:  <201607311154.u6VBsWtB038662@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sun Jul 31 11:54:32 2016
New Revision: 419361
URL: https://svnweb.freebsd.org/changeset/ports/419361

Log:
  MFH: r419360
  
  Add a hack in pkg to skip running predeinstall for javavmwrapper-2.5
  
  During upgrades/reinstall javavmwrapper 2.5 pre deinstall script deletes the pkg
  temporary files preventing to finish the upgrade.
  
  A fixed version of javavmwrapper will be made soon, this hack will remain in the
  ports tree and not in pkg(8) itself. This hack is made to not bother users is
  only affecting upgrade/reinstall phase not proper deinstall
  
  PR:		210313

Added:
  branches/2016Q3/ports-mgmt/pkg/files/patch-javavmwrapper
     - copied unchanged from r419360, head/ports-mgmt/pkg/files/patch-javavmwrapper
Modified:
  branches/2016Q3/ports-mgmt/pkg/Makefile
Directory Properties:
  branches/2016Q3/   (props changed)

Modified: branches/2016Q3/ports-mgmt/pkg/Makefile
==============================================================================
--- branches/2016Q3/ports-mgmt/pkg/Makefile	Sun Jul 31 11:52:22 2016	(r419360)
+++ branches/2016Q3/ports-mgmt/pkg/Makefile	Sun Jul 31 11:54:32 2016	(r419361)
@@ -3,6 +3,7 @@
 PORTNAME=	pkg
 DISTVERSION=	1.8.7
 _PKG_VERSION=	${DISTVERSION}
+PORTREVISION=	1
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	\
 		http://files.etoilebsd.net/${PORTNAME}/ \

Copied: branches/2016Q3/ports-mgmt/pkg/files/patch-javavmwrapper (from r419360, head/ports-mgmt/pkg/files/patch-javavmwrapper)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2016Q3/ports-mgmt/pkg/files/patch-javavmwrapper	Sun Jul 31 11:54:32 2016	(r419361, copy of r419360, head/ports-mgmt/pkg/files/patch-javavmwrapper)
@@ -0,0 +1,33 @@
+diff --git libpkg/pkg_add.c libpkg/pkg_add.c
+index 87fb248..778336c 100644
+--- libpkg/pkg_add.c
++++ libpkg/pkg_add.c
+@@ -859,14 +859,20 @@ pkg_add_cleanup_old(struct pkgdb *db, struct pkg *old, struct pkg *new, int flag
+ 	 * Execute pre deinstall scripts
+ 	 */
+ 	if ((flags & PKG_ADD_NOSCRIPT) == 0) {
+-		if ((flags & PKG_ADD_USE_UPGRADE_SCRIPTS) == PKG_ADD_USE_UPGRADE_SCRIPTS)
+-			ret = pkg_script_run(old, PKG_SCRIPT_PRE_UPGRADE);
+-		else
+-			ret = pkg_script_run(old, PKG_SCRIPT_PRE_DEINSTALL);
+-		if (ret != EPKG_OK && pkg_object_bool(pkg_config_get("DEVELOPER_MODE")))
+-			return (ret);
+-		else
+-			ret = EPKG_OK;
++		bool buggydeinstall = false;
++		if (strcmp(old->name, "javavmwrapper") == 0 &&
++		    strcmp(old->version, "2.5") == 0)
++			buggydeinstall = true;
++		if (!buggydeinstall) {
++			if ((flags & PKG_ADD_USE_UPGRADE_SCRIPTS) == PKG_ADD_USE_UPGRADE_SCRIPTS)
++				ret = pkg_script_run(old, PKG_SCRIPT_PRE_UPGRADE);
++			else
++				ret = pkg_script_run(old, PKG_SCRIPT_PRE_DEINSTALL);
++			if (ret != EPKG_OK && pkg_object_bool(pkg_config_get("DEVELOPER_MODE")))
++				return (ret);
++			else
++				ret = EPKG_OK;
++		}
+ 	}
+ 
+ 	/* Now remove files that no longer exist in the new package */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607311154.u6VBsWtB038662>