On Wed, 1 May 2019 at 03:24, Neal Gompa <ngompa13@gmail.com> wrote:
[..] 
Second, do you not even know that Mock passes --nodeps to rpmbuild
because the rpmdb in the chroot isn't necessarily compatible with rpm
in the chroot? We currently don't allow rpmbuild to evaluate
dependencies at all. We may change this if Koji switches to producing
bootstrap chroots before producing the build chroot. So right now,
that lookup is not even happening.

Calling rpmbuild with --nodeps to be able to resolve build dependencies from outside chroot and duplicating resolution of those dependencies by adding more code in yum/dnf to handle situation when rpm database in chroot is in different version is really .. "interesting".
 
Just checked all Fedora spec files to find few of them which are using straight rpm command in %build or %check.
One of those specs is elfutils.spec in which is:

%check
# Record some build root versions in build.log
uname -r; rpm -q glibc


Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.F4TimI
+ umask 022
+ cd /builddir/build/BUILD
+ cd elfutils-0.176
+ uname -r
5.0.6-200.fc29.x86_64
+ rpm -q glibc
glibc-2.29.9000-17.fc31.x86_64

I'm really happy that rpm database still is available inside mock chroot (ufff).
During +25 years of using rpm it was at least two times situation when rpm was in kind of transition and in all those cases to build packages using my own automation I was always able to use just chroot command, and to be honest I would never even think about use "that way".

If not using simplest "BuildRequires: pkgconfig" may be (somehow) affected by above (which I'm 100% sure that it is still not the case because still above isn't by any way kind of counterargument against "BuildRequires: pkgconfig") .. I think that I'll give up.

kloczek
-- 
Tomasz Kłoczko | LinkedIn: http://lnkd.in/FXPWxH