On Tue, Apr 14, 2020 at 9:06 AM Nils Philippsen <nils(a)redhat.com> wrote:
On Tue, 2020-04-14 at 13:58 +0200, Miro Hrončok wrote:
> On 14. 04. 20 13:39, Nils Philippsen wrote:
> > So, to make this more robust against problems like you described,
> > we
> > should decouple what's run in the build root from a specific minor
> > version of Python and the rpm Python package (and remove the
> > superfluous Koji dependency). This shouldn't be much work, the
> > biggest
> > piece is probably to make it get by without using the rpm Python
> > package (for comparing EVRs and to expand macros), but a tiny
> > ctypes
> > wrapper around rpmlib should solve this for us.
>
> Or even running `rpmdev-vercmp` and `rpm --eval` with subprocess:
I'd rather not pull in rpmdevtools -- which depends on Perl and a
couple 3rd party Perl packages. ;)
One thing I missed in my previous mail was that we already shell out to
rpmspec ("rpm --specfile ...") to query the epoch/version of the spec
file, but that should be okay, too -- it's part of rpm-build which we
need for building the SRPM at that point anyway.
For what its worth, I want to get rid of the Perl dependency. I just
have to decide which Python reimplementation of spectool to put in
there... :)
--
真実はいつも一つ!/ Always, there's only one truth!