[arch-general] trinity pkgbuild: rewrite to dl svn - Use fixed svn rev or latest?

David C. Rankin drankinatty at suddenlinkmail.com
Thu Feb 10 00:10:18 EST 2011


On 02/09/2011 07:51 PM, Allan McRae wrote:
>>>
>>> Does this also work when building from makechrootpkg?
>>
>> As far as I know, the only options makechrootpkg passes to makepkg are
>> "-s --noconfirm".
>>
> 
> You can add mre options after "--".
> 
> e.g. I often run:
> 
> makechrootpkg -c -r /path/to/chroot -- -L -i

The reason I asked was because the 2 svn PKGBUILDs I've created do not get
$pkgver updated to the latest svn when building with makechrootpkg.
Specifically, I do the following in the PKGBUILD:

getsvnrev() {
  msg "Determining SVN revision for $pkgname..."
  [[ -d .svn ]] && echo $(sed -n '4p' .svn/entries) || echo 9999
}

pkgbase=trinity
pkgname=trinity-tqtinterface
pkgver=9999  # just a temp number here

_svn_trunk="svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface"
_svn_module=tqtinterface

build() {

  cd ${srcdir}

  msg "Connecting to SVN server...."
  if [ -d ${_svn_module}/.svn ]; then
    (cd ${_svn_module} && svn up)
    [[ $? -eq 0 ]] || _co_failed=1
  else
    (svn co $_svn_trunk ${_svn_module})
    [[ $? -eq 0 ]] || _co_failed=1
  fi

  cd ${_svn_module}
  pkgver=$(getsvnrev)

and the pkgver variable never gets updated when used with makechrootpkg. It is
updated just fine when run with a simple makepkg call. So I can't figure out
whey the makechrootpkg call makes the difference?

Full PKGBUILD:

 http://www.3111skyline.com/dl/dt/trinity/arch/svn/dependencies/tqtinterface/PKGBUILD-tqtinterface.svn

    One other issue with putting the svn co in the build() function is you loose
the ability to use -o makpkg option to only download and extract. Is there a way
around this building with makechrootpkg?

    So for the build in arch in VirtualBox has been much more straight forward
that an archroot build. But the convenience of an archroot can't be beat.

-- 
David C. Rankin, J.D.,P.E.


More information about the arch-general mailing list