[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
env variable is not defined when running rpmbuild --rebuild
- From: "Erez Zilber" <erezzi list gmail com>
- To: rpm-list redhat com
- Subject: env variable is not defined when running rpmbuild --rebuild
- Date: Mon, 11 Aug 2008 10:46:23 +0300
Hi,
I have a problem with an env variable while running rpmbuild --rebuild
/usr/src/redhat/SRPMS/mypackage-0-0.1.src.rpm:
before running rpmbuild, I run the following commands:
[erez zilber klab002:~/work/]$ sudo bash -c 'export MY_ENV_VAR=some_val'
[erez zilber klab002:~/work/]$ sudo echo $MY_ENV_VAR
some_val
In the spec file, I print this env var:
%build
echo "MY_ENV_VAR = $MY_ENV_VAR"
but when I run rpmbuild --rebuild
/usr/src/redhat/SRPMS/mypackage-0-0.1.src.rpm, I get:
+ LANG=C
+ export LANG
+ unset DISPLAY
+ echo 'MY_ENV_VAR = '
MY_ENV_VAR =
I guess that it opens another shell in which the env var is not
defined. How can I solve that (without adding the env var to .bashrc
which is not a possible solution for me).
Thanks,
Erez
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]