fedora-python/pyp2rpm

pyp2rpm doesn't work when build tree is not initialized

RHEmployee opened this issue · 2 comments

Hello. It looks like
$ pyp2rpm ./dist/tmt-provision-minute-0.1.0.tar.gz > tmt-provision-minute.spec

tar.gz file is generated by:
python3 -m build

command is unable to proceed when build tree (~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}) is not initialized.

At first run, it generates empty spec file.
After second run, everything works fine.

Version:
pyp2rpm-3.3.6-1.fc33.noarch

Workaround:
call rpmdev-setuptree before calling pyp2rpm.

I'm not able to reproduce that problem. Is there an error output?

If possible, please delete /tmp/pyp2rpm-$user.log, reproduce the problem on your system, and then send the content of that file, in addition to any output produced during the failure.

Thank you.

I wasn't able to reproduce this initially because it's a race condition. Should be a simple fix.