modifyrepo_c leaves temporary files behind
xsuchy opened this issue · 2 comments
xsuchy commented
modifyrepo_c leaves temporary files behind. They are small. But Copr calls modifyrepo_c several times per minute. And after a few days, we have a few GB in these temp files.
# rpm -qf /usr/bin/modifyrepo_c
createrepo_c-0.17.5-1.fc35.x86_64
Reproducer:
# ll /tmp/*.rpm*
ls: cannot access '/tmp/*.rpm*': No such file or directory
[root@copr-be copr-backend][PROD]# su - copr
Poslední přihlášení: Mon 21.02.2022 20:21:09 UTC na pts/9
$ /usr/bin/modifyrepo_c --no-compress /var/lib/copr/public_html/results/dwrobel/kernel-rpi-testing/fedora-34-aarch64/appdata/appstream.xml.gz /var/lib/copr/public_html/results/dwrobel/kernel-rpi-testing/fedora-34-aarch64/repodata
C_CREATEREPOLIB: Warning: Record with type "appstream" already exists in repomd.xml
$ exit
logout
# ll /tmp/*.rpm*
-rw-r--r--. 1 copr copr 64 Feb 21 20:21 /tmp/kernel-5.15.24-1.rpi.fc36.aarch64.rpm-44639419039507e8f6725a6497cf982a4d10152a56ca2a7b517bbe9923a9ed39-0-1645474908
-rw-r--r--. 1 copr copr 64 Feb 21 20:21 /tmp/kernel-5.15.24-1.rpi.fc36.src.rpm-ba0314bebb6a9cc3f93137b766c14c696a376138a0ffbd7effddfdb04e0f72bd-123895571-1645474909
-rw-r--r--. 1 copr copr 64 Feb 21 20:21 /tmp/kernel-core-5.15.24-1.rpi.fc36.aarch64.rpm-886fae897ca3ed2313d2d75daa242eee04afd66935c627d466e6e63471475b42-64801605-1645474906
-rw-r--r--. 1 copr copr 64 Feb 21 20:21 /tmp/kernel-devel-5.15.24-1.rpi.fc36.aarch64.rpm-bf038426843ff27b07cd9d8f0d1f040f073bc3c95a52b565bf835686ae04f525-55275812-1645474904
-rw-r--r--. 1 copr copr 64 Feb 21 20:21 /tmp/kernel-headers-5.15.24-1.rpi.fc36.aarch64.rpm-307b8b0b3c5c1dd314b43104ff2efbd3eaa009e651fb43aa0b3a66048b02ccbf-5669769-1645474907
-rw-r--r--. 1 copr copr 64 Feb 21 20:21 /tmp/kernel-modules-5.15.24-1.rpi.fc36.aarch64.rpm-8a64b5d84d1505033ffbf7638cf7406a33f86820326ec3008691f693ddd7b72d-6880492-1645474910
-rw-r--r--. 1 copr copr 64 Feb 21 20:21 /tmp/kernel-modules-extra-5.15.24-1.rpi.fc36.aarch64.rpm-9dd4480be43c013148770792d66cead2f519026d1785ada4f89a9baa7da0de9b-1367696-1645474905
kontura commented
I cannot reproduce this and I don't think the /tmp/*.rpm*
files are from modifyrepo_c
, it shouldn't touch rpms at all, it works only on repodata
.
I tried:
$ podman run -it fedora:35
[root@a1fb82b1e042 /]# dnf install createrepo_c dnf-plugins-core -y
[root@a1fb82b1e042 /]# mkdir repo && cd repo/
[root@a1fb82b1e042 repo]# dnf download htop
[root@a1fb82b1e042 repo]# createrepo_c .
[root@a1fb82b1e042 repo]# touch appstream.xml
[root@a1fb82b1e042 repo]# ll /tmp/*.rpm*
ls: cannot access '/tmp/*.rpm*': No such file or directory
[root@a1fb82b1e042 repo]# modifyrepo_c --no-compress ./appstream.xml repodata/
[root@a1fb82b1e042 repo]# ll /tmp/*.rpm*
ls: cannot access '/tmp/*.rpm*': No such file or directory
Is there some step I am missing or is it possible the files are from something else?
xsuchy commented
It seems it was false alarm. The culprit is something else. Sorry for the noise.