PATH in mock disappears

Elias Abacioglu elias.rabi at gmail.com
Tue Jan 3 16:08:54 UTC 2012


2012/1/3 Gordan Bobic <gordan at bobich.net>

> On Tue, 3 Jan 2012 15:52:45 +0100, Elias Abacioglu <elias.rabi at gmail.com>
> wrote:
>
>> Hey,
>>
>> I have an issue. Trying to build a package in mock, package B. Package
>> B requires a installed package, package A.
>> Package A installs on a custom PATH and requires the PATH to be set in
>> order for package B to compile.
>>
>> I tried adding config_opts['environment']['**PATH'] =
>> '/bin:/blabla:....' to /etc/mock/site-defaults.cfg.
>> The path works when i use mock --shell.
>>
>> But when I do a mock --no-clean package.B.src.rpm, the path is
>> missing, and the build fails.
>>
>> Is there a way to set the PATH so that it is used during the
>> "--rebuild" process?
>> I'm running mock 1.1.18.
>>
>
> Google a recent solution on how to set LD_PRELOAD environment in mock
> chroot. You could probably use a similar trick to set the PATH.
>
> It worked. And it's probably worth repeating

Added this to site-defaults.cfg:
config_opts['files']['etc/profile.d/mystuff.sh'] = """
export PATH=$PATH:/custom/path
"""

Thanks Gordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/buildsys/attachments/20120103/09e00c27/attachment.html>


More information about the buildsys mailing list