"malformed task" has been returned for everything unknown, but external
plugins can create completely valid tasks which we can't parse without
those plugins. In such case we want to return at least method/arch info.
Related: https://pagure.io/koji/issue/2904
We've replaced it with requests library some time ago, this code has no
better sensitivity than requests error checking, so we can drop it
completely.
Fixes: https://pagure.io/koji/issue/2752
In koji-1.22.0-129-g0ef3c751 I've changed the way how
site-packages directory is obtained. What I did not realize back
then is there can be multilib systems which will not search for
packages in /usr/lib64. But 64bit systems do look into /usr/lib.
Therefore, let's pick the location where both systems work.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1894261Fixes: #2578https://pagure.io/koji/issue/2578
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
fixes: #2481
This approach is ugly, but just working.
ENOENT and ESTALE errors are catched in `chdir`, `listdir` calls to stomach the deletion by other process/thread
ENOTEMPTY is catched when calling `os.rmdir(path)` in `rmtree()` too. It happens when `path` is on an NFS like where ESTALE happens.
So far, in all Makefiles we have a complicated way to construct
PKGDIR path which is used to install python modules into.
Firstly, python version is obtained, and then system prefix and
these are then used to construct the PKGDIR path. Well, we can do
better. We can use 'site.getsitepackages()[0]' to obtain exactly
the path we are after.
This also fixes the problem on distributions which have split
/usr/lib and /usr/lib64 directories, because with the way we are
constructing the PKGDIR path we assume that the directories are
the same (or one is a symlink to another). Well, that is not
always the case.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
After we call listdir(), another thread or process might delete files
from the current directory. We cannot always expect lstat() to succeed
in a loop over the initial listdir entries.
If lstat() raises ENOENT, consider this file deleted and move on.