FS#56904 - [nvidia-340xx-utils] createlinks() throws warning

Attached to Project: Arch Linux
Opened by Andreas Baumann (andreas_baumann) - Saturday, 30 December 2017, 10:43 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Sunday, 07 January 2018, 12:16 GMT
Task Type General Gripe
Category Packages: Extra
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

readelf: Error: '/data/INSTALL/nvidia-340xx-utils/pkg/nvidia-340xx-utils/etc/ld.so.conf.d' is not an ordinary file

The result of find in createlinks() contains the linker directory:

pkg/nvidia-340xx-utils/etc/ld.so.conf.d

Suggested fix:

for _lib in $(find "${pkgdir}" -name '*.so*' | grep -v 'xorg/' | grep -v ld.so.conf.d); do

Additional info:
* package version(s): 340.104-2
* config and/or log files etc.


Steps to reproduce:
makepkg -s
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Sunday, 07 January 2018, 12:16 GMT
Reason for closing:  Fixed
Comment by Doug Newgard (Scimmia) - Friday, 05 January 2018, 08:11 GMT
'-type f' would be a lot better here than adding another grep, but is this actually a problem?
Comment by Andreas Baumann (andreas_baumann) - Friday, 05 January 2018, 09:24 GMT
Well, not a problem, but calling readelf on a directory is not nice. :-)
Comment by Eli Schwartz (eschwartz) - Friday, 05 January 2018, 14:30 GMT
As a rule of thumb one should really be using something path-safe like:

```
while read -rd ''; do
...
done < <(find "${pkgdir}" -type d -name xorg -prune -o -type f -name '*.so*' -print0)
```

For bonus points, it comes with free find options for ignoring certain directories!
If usr/lib/nvidia/xorg/libglx.so.340.104 is actually supposed to be detected, the following can be used instead:
find "${pkgdir}" -type d -path '*/lib/xorg/*' -prune -o -type f -name '*.so*' -print0

Loading...