Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 639840

Summary: sys-apps/util-linux-2.30.2 - /usr/share/bash-completion/completions/fsck: find can take a long time due to symlinks
Product: Gentoo Linux Reporter: Robert Forsman <gentoo>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Robert Forsman 2017-12-04 20:32:59 UTC
In /usr/share/bash-completion/completions/fsck from sys-apps/util-linux-2.30.2 the final COMPREPLY= uses $(find -L /dev/ -type b 2> /dev/null) .

On my computer this ended up diving into /dev/fd/3/.wine/dosdevices/z: which is a symlink to / (the root) and things quickly got stupid.  The shell prompt became non-interactive.

The COMPREPLY used in util-linux-2.28.2 uses $(lsblk -pnro name) which does not have this problem.

You probably want to adjust the completion function back to lsblk, or at least something that doesn't render the shell noninteractive.
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2017-12-06 15:11:26 UTC
Upstream already fixed it via https://github.com/karelzak/util-linux/commit/d22c1f533275ebf7060d9aa6dffc3ef265e81176
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2021-07-07 19:13:36 UTC
Fixed in >=v2.32.