Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#20555 - [makepkg] return 0 on error

Attached to Project: Pacman
Opened by PyroPeter (pyropeter) - Saturday, 21 August 2010, 14:44 GMT
Last edited by Dan McGee (toofishes) - Monday, 30 August 2010, 15:03 GMT
Task Type Bug Report
Category makepkg
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 3.4.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
Makepkg exits with a return value of 0 (success) when package() fails.

Steps to Reproduce:
1. Write a PKGBUILD with a package() function returning 1.
2. Makepkg it.
3. Check the exit value.
This task depends upon

Closed by  Dan McGee (toofishes)
Monday, 30 August 2010, 15:03 GMT
Reason for closing:  Works for me
Additional comments about closing:  Not a bug, makepkg correctly sets the error code.
Comment by Attila (attila) - Monday, 30 August 2010, 14:00 GMT
Sorry, but if this is not a bug than it is still an error because it makes things as "makepkg && namcap *.pkg.tar.gz" useless. I reconized the same before vacances (that is because i don't write a bug report with the same content) and i can't understand why makepkg don't give back the right return code.
Comment by Dan McGee (toofishes) - Monday, 30 August 2010, 14:01 GMT
OK, is this or is this not an issue? Can someone make a simple test case or something related to this?
Comment by Allan McRae (Allan) - Monday, 30 August 2010, 14:15 GMT
allan@mugen ~/tmp/makepkg
> cat PKGBUILD
pkgname=NAME
pkgver=VERSION
pkgrel=1
arch=('any')

package() {
return 1
}


allan@mugen ~/tmp/makepkg
> makepkg
==> Making package: NAME VERSION-1 (Tue Aug 31 00:19:42 EST 2010)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==> Extracting Sources...
==> Removing existing pkg/ directory...
==> Entering fakeroot environment...
==> Starting package()...
Aborting...

allan@mugen ~/tmp/makepkg
> echo $?
2


I can see no way to replicate this bug...
Comment by Attila (attila) - Monday, 30 August 2010, 14:59 GMT
@Allan You be right and i'm too stupid for the shell. In have tried this

makepkg -c 2>&1 | tee build.log && namcap *.pkg.tar.gz 2>&1 | tee -a build.log

and thought it was the return code of makepkg but this was a mistake of mine. Sorry for wasting your time.

Comment by Allan McRae (Allan) - Tuesday, 31 August 2010, 07:29 GMT
@Attila: there is no need for tee; just use makepkg -L
Comment by Attila (attila) - Tuesday, 31 August 2010, 09:10 GMT
@Allan Thanks for the hint and i will think about it because than i can work with '&&'. At the moment i use this for the name of the logfile "build-$(date --iso-8601).log" and i want to have the output of namcap in the same logfile.

Loading...