#1793: PKG_CONFIG_PATH not set in extrascripts.sh
-------------------------------------+--------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: [email protected]
Type: defect | Status: closed
Priority: high | Milestone: future
Component: BOOK | Version: ~CVS
Severity: normal | Resolution: wontfix
Keywords: |
-------------------------------------+--------------------------------------
Changes (by [EMAIL PROTECTED]):
* resolution: => wontfix
* status: new => closed
Old description:
> 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
New description:
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
Comment:
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
done
}}}
There'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
done
}}}
That 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.
--
Ticket URL: <http://wiki.linuxfromscratch.org/blfs/ticket/1793>
BLFS Trac <http://wiki.linuxfromscratch.org/blfs>
Beyond Linux From Scratch
--
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page