On Sat, Dec 13, 2014 at 03:42:38PM +0100, Mattia Rizzolo wrote:

> I suggest you to just copy and paste this bit of the current script, plus a
> check to be sure the library is installed:
> 
> if $(/sbin/ldconfig -p | grep -q "libeatmydata") ; then
>     export 
> LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+"$LD_LIBRARY_PATH:"}/usr/lib/libeatmydata
>     export LD_PRELOAD=${LD_PRELOAD:+"$LD_PRELOAD "}libeatmydata.so
> fi
> 
> (the LD_LIBRARY_PATH is there only to support some use cases where you run a
> chroot under eatmydata where the the actual path of the library differ between
> the host and the guest, drop it if your script does not need it)
> 
> > Even better would be an
> > "eatmydata --exports" function, but I'm afraid that would mean
> > introducing some radical changes in the command line parsing code.
> 
> indeed, and I don't like it.
> 
> Tell me what you think. I'd wontfix+close this bug report, given that imho 
> there
> is a better way to do what you want (and shorter, 3 rows instead of 5 in you
> example).

Ack, your workaround makes sense, and I think it's way better than the
code I was using. I'd consider it nontrivial code, and I wish there
could be some trivial way to incrementally set up a running environment
which can optionally include eatmydata; I'm fine if this gets closed as
wontfix, though.


Enrico

-- 
GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini <enr...@enricozini.org>

Attachment: signature.asc
Description: Digital signature

Reply via email to