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

svn at pcbsd.org svn at pcbsd.org
Wed Mar 20 14:21:52 PDT 2013


Author: kris
Date: 2013-03-20 21:21:52 +0000 (Wed, 20 Mar 2013)
New Revision: 21935

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

Fix a bug installing PBIs, make sure we load the keys only after setting
a few variables



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2013-03-20 17:15:18 UTC (rev 21934)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2013-03-20 21:21:52 UTC (rev 21935)
@@ -1322,9 +1322,6 @@
 	# Set the FreeBSD Major & Release
   	FBSDREL=`uname -r`
 	FBSDMAJOR=${FBSDREL%%.*}
-	if [ -n "$PBI_MAJORVERSION" ] ; then
-		FBSDMAJOR=${PBI_FBSDMAJOR}
-	fi
 
 	PBI_WORLDCHROOT="${PBI_APPDIR}/.pbi-world-$ARCH"
 	if [ `id -u` = "0" ] ; then 
@@ -1346,15 +1343,27 @@
 	PBI_PATCH_ICON="${PROGBASE}/share/pbi-manager/icons/patch.png"
 	PBI_LDCONFIGFILE="${PROGBASE}/etc/ldpbiconfig"
 	PBI_LDCONFIGRC="${PROGBASE}/etc/rc.d/ldpbiconfig"
+
+	# Set the PBI DB dir
+	if [ -z "${PBI_DBDIR}" ] ; then
+		PBI_DBDIR="/var/db/pbi"
+	fi
+	PBI_DBKEYDIR="${PBI_DBDIR}/keys"
 	PROGVERSION="1.0"
 
-	# Settings for pbid
+	# Load the etc/pbi.conf file
+	load_pbi_etcconf
+
+	# Overrides from pbi.conf
 	if [ -z "$PBIDSLEEP" ] ; then
 		PBIDSLEEP="300"	# Amount of time to sleep before waking up pbid
 	fi
 	if [ -z "$PBI_INDEXREFRESH" ] ; then
 		PBI_INDEXREFRESH="24" # Hours to wait until we re-download PBI indexes
 	fi
+	if [ -n "$PBI_MAJORVERSION" ] ; then
+		FBSDMAJOR=${PBI_FBSDMAJOR}
+	fi
 
 	PBI_LOG_LINES="500"
 	PBI_INSTALLGROUP="operator"
@@ -1454,15 +1463,11 @@
 	PBI_CREATE_HASHLIST="YES"
 	PBI_CUPDATE=""
 	PBI_CWEB=""
-	if [ -z "${PBI_DBDIR}" ] ; then
-		PBI_DBDIR="/var/db/pbi"
-	fi
 	PBI_DBAPPDIR="${PBI_DBDIR}/installed"
 	PBI_DBDIRTYFILE="${PBI_DBDIR}/.hashdirty"
 	PBI_DBHASHQUEUEDIR="${PBI_DBDIR}/.hashqueue"
 	PBI_DBICONDIR="${PBI_DBDIR}/repo-icons"
 	PBI_DBINDEXDIR="${PBI_DBDIR}/index"
-	PBI_DBKEYDIR="${PBI_DBDIR}/keys"
 	PBI_DBMIRRORDIR="${PBI_DBDIR}/mirrors"
 	PBI_DBREPODIR="${PBI_DBDIR}/repos"
 	PBI_DISABLEHASHDIR="NO"
@@ -7438,7 +7443,6 @@
 
 # Main program operation
 ##############################################################
-load_pbi_etcconf
 init_vars
 mk_required_dirs
 



More information about the Commits mailing list