Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.

FS#28449 - Misbehaving “makepkg --rmdeps”

Attached to Project: Pacman
Opened by Marty (vadmium) - Wednesday, 15 February 2012, 13:29 GMT
Last edited by Andrea Scarpino (BaSh) - Saturday, 03 March 2012, 08:18 GMT
Task Type Bug Report
Category makepkg
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 4.0.2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


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().
==> Removing installed dependencies...
ERROR: object '' 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  Andrea Scarpino (BaSh)
Saturday, 03 March 2012, 08:18 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#28448