FS#40620 - [devtools] makechrootpkg does not end in non-zero code when build fails
Attached to Project:
Arch Linux
Opened by John (graysky) - Saturday, 31 May 2014, 09:08 GMT
Last edited by Dave Reisner (falconindy) - Friday, 24 October 2014, 13:25 GMT
Opened by John (graysky) - Saturday, 31 May 2014, 09:08 GMT
Last edited by Dave Reisner (falconindy) - Friday, 24 October 2014, 13:25 GMT
|
Details
I believe an error was introduced in makechrootpkg in the
20140510 release wherein running makechrootpkg will end in a
non-zero state even though a build using it fails to build a
package. It should return a non-zero code in that scenario.
Downgrading to devtools-20131101 fixes this problem.
Additional info: * package version(s) devtools 20140510-1 Steps to reproduce: 1) Setup a clean chroot. 2) Modify a good PKGBUILD to throw an error in the prepare function; change the name of a patch for example and run: makechrootpkg -c -u -r /scratch/chroot 3) Query the return code by: echo $? which is 0. Example: # makechrootpkg -c -u -r /scratch/chroot ... ==> Starting prepare()... patch: **** Can't open patch file /build/chromium-no-sse2/src/chromium-no-sse2-1/undo_removing_sse2.patch : No such file or directory ==> ERROR: A failure occurred in prepare(). Aborting... ==> ERROR: Build failed, check /scratch/chroot/facade/build makechrootpkg -c -u -r /scratch/.chroot32 39.55s user 2.65s system 96% cpu 43.820 total # echo $? 0 |
This task depends upon
Closed by Dave Reisner (falconindy)
Friday, 24 October 2014, 13:25 GMT
Reason for closing: Fixed
Additional comments about closing: devtools-20141024
https://projects.archlinux.org/devtools. git/commit/?id=af6c0a0f6a7644f
Friday, 24 October 2014, 13:25 GMT
Reason for closing: Fixed
Additional comments about closing: devtools-20141024
https://projects.archlinux.org/devtools. git/commit/?id=af6c0a0f6a7644f
https://projects.archlinux.org/devtools.git/commit/?id=6db31cc16a
https://mailman.archlinux.org/pipermail/arch-projects/2014-May/004158.html
https://mailman.archlinux.org/pipermail/arch-projects/2014-June/004163.html
https://mailman.archlinux.org/pipermail/arch-projects/2014-June/004166.html
Worked for me:
% sudo makechrootpkg -c -u -r /scratch/.chroot64
==> Creating clean working copy [facade]...done
...
==> Starting build()...
patch: **** Can't open patch file ../no.patch : No such file or directory
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Build failed, check /scratch/.chroot64/facade/build
sudo makechrootpkg -c -u -r /scratch/.chroot64 5.32s user 0.59s system 88% cpu 6.683 total
% echo $? :(
255