[arch-projects] [namcap] [PATCH 5/5] Fix shebangdepends rule for programs found in noncanonical locations

Eli Schwartz eschwartz at archlinux.org
Sun Jan 19 00:42:40 UTC 2020


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/arch-projects/attachments/20200118/c15ba118/attachment.sig>


More information about the arch-projects mailing list