FS#34056 - [pacman] Makepkg runs function twice
Attached to Project:
Pacman
Opened by Mark E. Lee (bluerider) - Wednesday, 27 February 2013, 19:59 GMT
Last edited by Allan McRae (Allan) - Thursday, 28 February 2013, 12:25 GMT
Opened by Mark E. Lee (bluerider) - Wednesday, 27 February 2013, 19:59 GMT
Last edited by Allan McRae (Allan) - Thursday, 28 February 2013, 12:25 GMT
|
Details
Description:
Makepkg seems to parse PKGBUILD twice. When inserting an echo function in a PKGBUILD, it is called twice (when it should only be called once). It is called before "Making package" and after "Entering fakeroot environment" Additional info: pacman 4.0.3-5 Steps to reproduce: Write in an "echo" statement in a PKGBUILD. Attempt to build with PKGBUILD and notice the echo statement appears twice. |
This task depends upon
You should never need to rely on code that lives outside of a function.
and you shouldn't call these extra functions outside of build() prepare() or package() functions
https://wiki.archlinux.org/index.php/Arch_Packaging_Standards
And as a user, I find it to be annoying as all hell.
And, how does this relate to the fact that makepkg runs non-standard functions in the PKGBUILD twice?
With a split PKGBUILD. makepkg -i --pkg lang1,lang2,lang3
> And, how does this relate to the fact that makepkg runs non-standard functions in the PKGBUILD twice?
Let me be clear: The "bug" you're reporting is that makepkg sources the PKGBUILD twice. I really doubt this is "fixable".
Is there a particular reason why makepkg sources the PKGBUILD twice?