[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

pkgver=9999  # just a temp number here


build() {

  cd ${srcdir}

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

  cd ${_svn_module}

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?



    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