Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#63933 - {pacman-contrib} paccache hangs on move command

Attached to Project: Arch Linux
Opened by Alexander Meshcheryakov (Self-Perfection) - Friday, 27 September 2019, 17:23 GMT
Last edited by Johannes Löthberg (demize) - Saturday, 28 September 2019, 12:52 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Johannes Löthberg (demize)
Daniel M. Capella (polyzen)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
`paccache --move $ANYDIR` hangs instead of doing anything. To reproduce try:
paccache --uninstalled --keep 0 --move /var/cache/pacman/pkg_temp_uninst/

Additional info:
* pacman-contrib 1.1.0-1

Fixing:
Turns out the reason is incorrect parsing of CLI arguments and can be fixed by adding missing ":" symbol, see attached patch
This task depends upon

Closed by  Johannes Löthberg (demize)
Saturday, 28 September 2019, 12:52 GMT
Reason for closing:  Fixed
Additional comments about closing:  Patch applied.
Comment by Eli Schwartz (eschwartz) - Friday, 27 September 2019, 17:37 GMT
$ paccache --uninstalled --keep=0 --move=/var/cache/pacman/pkg_temp_uninst
paccache: option '--move' does not allow an argument

:/
Comment by Alexander Meshcheryakov (Self-Perfection) - Friday, 27 September 2019, 17:50 GMT
Eli Schwartz, note that in your variant you specify --move=/var/cache/pacman/pkg_temp_uninst as a single argument and in my example that is two arguments separated by space.

The root cause of error "option '--move' does not allow an argument" in your example and hang when splitting --move and $DESTINATION in separate argument is the same: incorrect parsing. Missing colon (see patch) should denote that --move argument needs additional parameter.
Comment by Eli Schwartz (eschwartz) - Friday, 27 September 2019, 19:40 GMT
Yes, my point is that if you try specifying an = then parseopts aborts fatally. If you don't, then it thinks the argument to --move is one of the targets, and moves it to the end of the command line (after the -- end-of-options terminator).

The precise nature of the error message is an obvious indicator that your diagnosis was correct (and so is your patch). The hang is because the option parser shifted too many arguments and therefore never quits upon discovering --.

Loading...