#1793 closed defect (wontfix)
PKG_CONFIG_PATH not set in extrascripts.sh
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | BOOK | Version: | ~CVS |
| Severity: | medium | Keywords: | |
| Cc: |
Description (last modified by )
The command to find extra PKG_CONFIG paths in /etc/profile.d/extrascripts.sh does not function correctly and errors out with a find usage error. I have changed mine to be for directory in $(find / -name pkgconfig -type d 2>/dev/null); do
pathappend $directory PKG_CONFIG_PATH
done for directory in $(find / -name bin -type d 2>/dev/null); do
pathappend $directory
done
Change History (2)
comment:1 by , 21 years ago
| Description: | modified (diff) |
|---|---|
| Resolution: | → wontfix |
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Couple things. Well, this guy's probably long gone, but...
I don't have problems with the for loop as it is from the book:
for directory in $(find /opt/*/lib/pkgconfig -type d 2>/dev/null); do pathappend $directory PKG_CONFIG_PATH doneThere's a separate check for /usr/local/lib/pkgconfig.
Second, the OP's suggestions for revised for loops would be terribly slow.
for directory in $(find / -name pkgconfig -type d 2>/dev/null); do pathappend $directory PKG_CONFIG_PATH doneThat loop is going to scan everything in the root directory, first checking if it's named pkgconfig and then testing to see if it's a directory. If the type -d came first, that would help, but it would still have to check the name of every directory in /.
I'm closing this bug. If someone else has had errors with the extrapaths.sh script as used in the book please re-open it.