[PC-BSD Commits] r13324 - pcbsd/current/src-sh/pbi-manager

svn at pcbsd.org svn at pcbsd.org
Wed Oct 12 12:53:50 PDT 2011


Author: kris
Date: 2011-10-12 12:53:50 -0700 (Wed, 12 Oct 2011)
New Revision: 13324

Modified:
   pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:

Fix a bug when doing pbi_add -f leaving an extra copy of meta-data behind



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-10-12 19:22:05 UTC (rev 13323)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-10-12 19:53:50 UTC (rev 13324)
@@ -2985,6 +2985,13 @@
         open_header_tmp
 	get_dbdir
 	dir="${APPDBDIR}"
+
+	# Make sure we remove any existing meta-data if forcing an installation
+	if [ "$PBI_FORCEADD" = "YES" ] ; then
+	  	tmp="`echo ${PBI_PROGNAME} | tr -d ' ' | tr '[A-Z]' '[a-z]'`"
+          	rm -rf ${PBI_DBAPPDIR}/${tmp}-*-${PBI_APPARCH}
+	fi
+
 	mkdir -p "${dir}"
 	
         tar cvf - -C "${PBI_HEADER_TMPDIR}" . 2>/dev/null | tar xvf - -C "$dir" 2>/dev/null



More information about the Commits mailing list