FS#28448 - Misbehaving “makepkg --rmdeps”

Attached to Project: Pacman
Opened by Marty (vadmium) - Wednesday, 15 February 2012, 13:29 GMT
Last edited by Allan McRae (Allan) - Saturday, 18 February 2012, 06:51 GMT
Task Type Bug Report
Category makepkg
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 4.0.2
Due in Version 4.0.3
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Summary and Info:

Version 4.0.2 avoids the collation issue of  FS#27221 , but now using the “rmdeps” option produces odd warning and error messages when there are actually no packages to be removed, or when the build fails.

I think one solution would be to revert Git commit df47136 “makepkg: fix error on unnecessary -r” (revert 0fdf0b1 first). I don’t see how either of those “grep” commands will trigger Bash error handling, since error handling is meant to be inhibited inside “if” tests or when the exclamation mark is used.

If there is a reason to keep those commits, then extract just the original test from v4.0.1, since we know it used to work:

(( ${#deplist[@]} == 0 )) && return

Or even just fixing [[ -z "$deplist" ]] with a dollar sign might do the trick.

Steps to Reproduce:

Run “makepkg --rmdeps”. If the build failed I get this because it is running “sudo” in the “fakeroot” environment:

==> ERROR: A failure occurred in package().
Aborting...
==> Removing installed dependencies...
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded: ignored.
error: no targets specified (use -h for help)
==> WARNING: Failed to remove installed dependencies.

Additionally, if there aren’t actually any dependencies to remove, I get this at the end:

==> Removing installed dependencies...
error: no targets specified (use -h for help)
==> WARNING: Failed to remove installed dependencies.
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 18 February 2012, 06:51 GMT
Reason for closing:  Fixed
Additional comments about closing:  http://projects.archlinux.org/pacman.git /commit/?h=maint&id=edd81f3e
Comment by Dan McGee (toofishes) - Wednesday, 15 February 2012, 13:48 GMT Comment by Allan McRae (Allan) - Wednesday, 15 February 2012, 20:54 GMT
Dan: do you want build a patched 4.0.2 for the Arch repos with this fix?
Comment by Dan McGee (toofishes) - Wednesday, 15 February 2012, 20:59 GMT
Depends on how big of a deal you and Dave think it is- I'm fine with patching it, since we probably won't be releasing 4.0.3 sooner than a few weeks unless something else big comes up.

Loading...