On 1/17/20 8:19 AM, Vladimir Panteleev wrote:
If the user has a non-canonical (i.e. symlinked on Arch) location in front of their $PATH, such as /usr/sbin, shutil.which will return locations with that path. This later causes the rule to fail to find the binary in any packages, causing spurious library-no-package-associated and dependency-not-needed warnings.
Fix this by resolving all symlinks for executables (using os.path.realpath) before trying to find them among installed packages.
FWIW a lot of software will break if you do this, not just namcap. There's an exceedingly good reason why /usr/sbin and other symlink directories are *not* added to the $PATH on archlinux, unless the user has unwisely added it by hand. -- Eli Schwartz Bug Wrangler and Trusted User