[PC-BSD Commits] r19669 - pcbsd/current/src-sh/pbi-manager
svn at pcbsd.org
svn at pcbsd.org
Mon Oct 15 07:35:06 PDT 2012
Author: kris
Date: 2012-10-15 14:35:06 +0000 (Mon, 15 Oct 2012)
New Revision: 19669
Modified:
pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:
When generating PBP patches, use included system ARCH of the PBIs
after we validate those
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2012-10-15 14:24:06 UTC (rev 19668)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2012-10-15 14:35:06 UTC (rev 19669)
@@ -6044,6 +6044,18 @@
return
fi
+ # Get the arch type
+ get_arch_from_pbi_file "$_pbiNew"
+ _pbiNewArch="$VAL"
+ get_arch_from_pbi_file "$_pbiOld"
+ _pbiOldArch="$VAL"
+
+ # Sanity check these system types
+ if [ "${_pbiNewArch}" != "${_pbiOldArch}" ] ; then
+ echo "Error: Arch mismatch between $_pbiNew and $_pbiOld"
+ return
+ fi
+
# Make our extraction directories
if [ -e "$_pbiNewDir" ] ; then rm -rf "$_pbiNewDir"; fi
if [ -e "$_pbiOldDir" ] ; then rm -rf "$_pbiOldDir"; fi
@@ -6140,7 +6152,7 @@
get_progname_from_pbi_file "$_pbiNew"
_pbilow="`echo ${VAL} | tr '[:upper:]' '[:lower:]' | sed 's| ||g'`"
- outfile="${_cDir}/${_pbilow}-${_pbiOldVer}_to_${_pbiNewVer}-$ARCH.pbp"
+ outfile="${_cDir}/${_pbilow}-${_pbiOldVer}_to_${_pbiNewVer}-${_pbiNewArch}.pbp"
mark1="${_cDir}/.pbimark1.$$"
mark2="${_cDir}/.pbimark2.$$"
@@ -6357,6 +6369,12 @@
export VAL
}
+get_arch_from_pbi_file()
+{
+ VAL="`pbi_add -i $1 | grep Arch: | cut -d ' ' -f 2-5 | tr -s ' '`"
+ export VAL
+}
+
# Move old PBIs to the archive
archive_old_pbis()
{
More information about the Commits
mailing list