I need some way to get (from shell) name of directory where build process
will occur for example /home/users/me/rpm/BUILD/blabla-1.0 having only
spec file blabla.spec.
Any suggestions?
I've tried rpm --eval, rpm -bp --nobuild | grep etc but I don't see
any way to get %{_buildsubdir} name.
--
Arkadiusz Miśkiewicz IPv6 ready PLD Linux at http://www.pld.org.pl
misiek(at)pld.org.pl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PWr
_______________________________________________
Rpm-list mailing list
Rpm-...@redhat.com
https://listman.redhat.com/mailman/listinfo/rpm-list
Hi,
%setup is a primitive macro, not defined by any other macros but
made in C code. I guess (without changing rpm source code) it is impossible
to get %{buildsubdir} easily.
But with:
%setup -q
+%{echo: %{buildsubdir}}
+exit 0
i can get buildsubdir but only if i change the spec file.
also
rpm -bp rpm.spec --eval '%{echo: %{buildsubdir}}'
does not work.
Hope this add more hints for you.
PS1: maybe using rpmlib (or python-rpm) it would be possible to get
buildsubdir.
PS2:
[ruda@woz ruda]$ rpm -bp rpm/SPECS/rpm.spec 2>&1 | grep -v BUILD | grep '+ cd '
show me:
+ cd rpm-4.0.3
--
ruda
Marc
--
Marc Stephenson IBM Server Group - Austin, TX
Internet: ma...@austin.ibm.com NOTES: ma...@us.ibm.com
Phone: 512-327-5670 T/L 678-3189
> %setup -q
> +%{echo: %{buildsubdir}}
> +exit 0
>
> i can get buildsubdir but only if i change the spec file.
Won't work because in my case I have only spec file - no sources.
> PS1: maybe using rpmlib (or python-rpm) it would be possible to get
> buildsubdir.
It will make things to much complicated.
> [ruda@woz ruda]$ rpm -bp rpm/SPECS/rpm.spec 2>&1 | grep -v BUILD | grep '+ cd '
> + cd rpm-4.0.3
Won't work, too - still no sources :-)
> ruda
Looks like there is no simple way to do that...
In general
%_buildsubdir %{name}-%{version}
You need to parse the %setup line, looking for explicit -n overrides.
73 de Jeff
--
Jeff Johnson ARS N3NPQ
j...@jbj.org (j...@redhat.com)
Chapel Hill, NC
Yup.
> But with:
>
> %setup -q
> +%{echo: %{buildsubdir}}
> +exit 0
>
> i can get buildsubdir but only if i change the spec file.
>
> also
> rpm -bp rpm.spec --eval '%{echo: %{buildsubdir}}'
> does not work.
The --eval happens before parsing.
>
> Hope this add more hints for you.
>
> PS1: maybe using rpmlib (or python-rpm) it would be possible to get
> buildsubdir.
Nope.
73 de Jeff
--
Jeff Johnson ARS N3NPQ
j...@jbj.org (j...@redhat.com)
Chapel Hill, NC
_______________________________________________
What are you trying to do?
--
Matthew Miller mat...@mattdm.org <http://www.mattdm.org/>
Boston University Linux ------> <http://linux.bu.edu/>
> What are you trying to do?
Delete buildsubdir after failed rpm build. Simple task and
I wanted to do this in nicest way :-)
Now I'll probably parse buildlog and do what I want.