[arch-general] sanity check - pkgbuild writing svn rev as $pkgver for new packages - help?
Guys, I'm working on a second set of pkgbuild for Trinity that do the svn download for you and work like normal pkgbuilds for other svn projects. One issue I'm having is getting the "finished package name" to include the svn revision as $pkgver instead of the initial (eg. pkgver=9999). The bottom line is if I update pkgver in build() it isn't used when the final package is written. If I only update it between build() and package() then the final package gets the correct svn rev as $pkgver, but all messages during build are wrong. So I end up updating the pkgver in build() and then between build() and package(). That doesn't seem right. The problem seems like a scope issue for pkgver. If set in build() pkgver isn't seen globally in the PKGBUILD script, even though it is declared with global scope and updated in build(). Can somebody familiar with PKGBUILDs give the following a quick look to make sure it is reasonable and I'm not biting my myself by the double call to update pkgver? http://www.3111skyline.com/dl/dt/trinity/arch/pkgbuild/svn/PKGBUILD-tqtinter... Thanks! -- David C. Rankin, J.D.,P.E.
On Fri, Feb 18, 2011 at 1:10 AM, David C. Rankin <drankinatty@suddenlinkmail.com> wrote:
Guys,
I'm working on a second set of pkgbuild for Trinity that do the svn download for you and work like normal pkgbuilds for other svn projects.
One issue I'm having is getting the "finished package name" to include the svn revision as $pkgver instead of the initial (eg. pkgver=9999).
The bottom line is if I update pkgver in build() it isn't used when the final package is written. If I only update it between build() and package() then the final package gets the correct svn rev as $pkgver, but all messages during build are wrong.
So I end up updating the pkgver in build() and then between build() and package(). That doesn't seem right.
The problem seems like a scope issue for pkgver. If set in build() pkgver isn't seen globally in the PKGBUILD script, even though it is declared with global scope and updated in build().
Can somebody familiar with PKGBUILDs give the following a quick look to make sure it is reasonable and I'm not biting my myself by the double call to update pkgver?
http://www.3111skyline.com/dl/dt/trinity/arch/pkgbuild/svn/PKGBUILD-tqtinter...
Thanks!
-- David C. Rankin, J.D.,P.E.
makepkg includes some magic to adjust the $pkgver - however the variables have to be named _svntrunk and _svnmod. See man PKGBUILD, section DEVELOPMENT DIRECTIVES.
On 02/17/2011 06:31 PM, Jan Steffens wrote:
makepkg includes some magic to adjust the $pkgver - however the variables have to be named _svntrunk and _svnmod. See man PKGBUILD, section DEVELOPMENT DIRECTIVES.
Thank you Jan, That is *exactly* what I was missing. I could have stared at: _svn_trunk="svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface" _svn_module=tqtinterface for hours and not picked up on the _svn_trunk/_svntrunk or _svn_module/_svnmod distinction. Forrest for the trees issue :) I rename and retest to see if I can make the magic work... -- David C. Rankin, J.D.,P.E.
participants (2)
-
David C. Rankin
-
Jan Steffens