Dne 14. 03. 20 v 10:14 Miro Hrončok napsal(a):
On 14. 03. 20 8:16, Dan Čermák wrote:
> However, I am not an expert on RPM macro evaluation and kinda worried
> that this uses the clang version that is present on the system building
> the srpm, which might not be the version that I want? Or is this not a
> problem on Koji?
It's not a problem. In fact %requires_eq does it the "same" way:
%requires_eq() %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf
'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/
/' -e 's/ 0:/ /' | grep -v "is not")
I always thought that one should not call `rpm` during rpmbuild.
Nevertheless I am not sure what was the reason? Probably locking of RPM
db? Can somebody elaborate?
But there should not be problem to parse either `clang --version` or `ls
/usr/lib64/clang/`. Also, languages such as Ruby provides convenient
macro to access their library paths, isn't there such macro available
for clang?
But this seems really silly that every minor update of clang would need
ccls update. Is that really needed? Isn't there possible to configure
the path [1] or provide some symlink which won't change with minor
version updates?
Vít
[1]
https://github.com/MaskRay/ccls/wiki/Customization#clangresourcedir
> but afaik it also fixes the release
I don't think it does, reading the code.