old packages not saved

Jason Helfman jhelfman at e-e.com
Tue Aug 9 17:48:20 EDT 2011


On Sat, Aug 06, 2011 at 11:32:20PM -0400, Joe Marcus Clarke thus spake:
>On 8/6/11 9:19 PM, Jason Helfman wrote:
>> On Sat, Aug 06, 2011 at 02:27:26PM -0400, Joe Marcus Clarke thus spake:
>>> Sorry, I forgot there is a bit in portbuild that will remove the last
>>> built version of a package if the current port build was successful.
>>> This has been around for a while.
>>>
>>> Joe
>>>
>>>
>>
>> So if I wanted to maintain the previously built package, a hook could just
>> be make for this, yes?
>
>You'd need to do a prePortBuild Hook to backup the last build version
>package, but yes, it could be done.
>
>Joe
>

I took care of this as a postPortBuild, to just backup the current package
to another directory. Here is the script, and thanks, again!

#!/bin/sh
#archives packages, jgh

if [ "${STATUS}" = "SUCCESS" ] ; then
   if [ ! -d ${PB}/packages-archive/${BUILD}/All ]; then
    /bin/mkdir -p ${PB}/packages-archive/${BUILD}/All
   fi

   if [ -s ${PB}/packages/${BUILD}/All/${PACKAGE_NAME}.tbz ] ; then
     /bin/cp ${PB}/packages/${BUILD}/All/${PACKAGE_NAME}.tbz ${PB}/packages-archive/${BUILD}/All/${PACKAGE_NAME}.tbz
   fi
fi


-jgh

-- 
Jason Helfman
System Administrator
experts-exchange.com
http://www.experts-exchange.com/M_4830110.html
E4AD 7CF1 1396 27F6 79DD  4342 5E92 AD66 8C8C FBA5


More information about the tinderbox-list mailing list