#1733 filter-out-allowed-srpm-removals
Closed 3 years ago by praiskup. Opened 3 years ago by praiskup.

@@ -0,0 +1,46 @@

+ #! /usr/bin/python3

+ 

+ """

+ Helper script for reading the output from

+ /usr/bin/copr_prune_srpms.py --dry-run --stdout

+ """

+ 

+ import sys

+ import re

+ 

+ def _main():

+     exp_len = None

+ 

+     allowed = [

+         re.compile(r'^\d+'),

+         re.compile(r"^build-\d+.log"),

+         re.compile("tmp"),

+         re.compile("cache"),

+         re.compile("repodata"),

+         re.compile("appdata"),

+     ]

+ 

+     file = open(sys.argv[1], "r")

+     for line in file:

+         line = line.strip()

+         path, _ = line.split()

+         parts = path.split("/")

+ 

+         # re-assure we have nice output

+         if exp_len is None:

+             exp_len = len(parts)

+         else:

+             assert exp_len == len(parts)

+ 

+         last_part = parts[-1]

+ 

+         def _matcher(pattern, item=last_part):

+             return pattern.match(item)

+         if any(map(_matcher, allowed)):

+             continue

+ 

+         # keep printing only what is needed

+         print(line)

+ 

+ if __name__ == "__main__":

+     _main()

This is unlikely to be merged :)

The remaining stuff ATM on production is:

/var/lib/copr/public_html/results/msmafra/doas/srpm-builds/devel  (2020-11-28)
/var/lib/copr/public_html/results/gnumdk/packages/srpm-builds/.repodata.939.20190303050514.365466  (2019-03-03)
/var/lib/copr/public_html/results/@leapp/leapp-tmp/srpm-builds/devel  (2019-05-24)
/var/lib/copr/public_html/results/mkyral/kf5-unstable/srpm-builds/devel  (2020-05-22)
/var/lib/copr/public_html/results/mkyral/plasma-unstable/srpm-builds/devel  (2020-10-13)
/var/lib/copr/public_html/results/mlapin/python-fedora/srpm-builds/devel  (2019-03-11)
/var/lib/copr/public_html/results/tmz/cgit/srpm-builds/devel  (2020-01-14)
/var/lib/copr/public_html/results/tmz/gnupg1/srpm-builds/devel  (2019-05-28)
/var/lib/copr/public_html/results/tmz/git/srpm-builds/devel  (2021-02-09)
/var/lib/copr/public_html/results/robinba/Test-Project/srpm-builds/devel  (2021-01-15)
/var/lib/copr/public_html/results/tyrylu/fegora-apps/srpm-builds/devel  (2019-05-16)
/var/lib/copr/public_html/results/cyberpear/openshift-4.3.3/srpm-builds/devel  (2020-03-03)
/var/lib/copr/public_html/results/cyberpear/openshift-4.3.0/srpm-builds/devel  (2020-02-18)
/var/lib/copr/public_html/results/abiagion/winrm/srpm-builds/devel  (2019-12-28)
/var/lib/copr/public_html/results/carlis/crow-translate/srpm-builds/devel  (2020-07-08)
/var/lib/copr/public_html/results/paulcarroty/test/srpm-builds/devel  (2019-03-11)
/var/lib/copr/public_html/results/asafonov/Signal-Desktop/srpm-builds/devel  (2019-03-11)
/var/lib/copr/public_html/results/lantw44/chromium/srpm-builds/devel  (2019-09-12)
/var/lib/copr/public_html/results/lantw44/guix/srpm-builds/devel  (2019-05-18)
/var/lib/copr/public_html/results/jprance/firefox-developer/srpm-builds/devel  (2019-10-10)
/var/lib/copr/public_html/results/utopiabound/iml-agent-tmp/srpm-builds/devel  (2019-08-30)
/var/lib/copr/public_html/results/daftaupe/etesync/srpm-builds/devel  (2019-04-30)
/var/lib/copr/public_html/results/qvint/gnirehtet/srpm-builds/devel  (2020-12-27)
/var/lib/copr/public_html/results/llunved/rtl-sdr-nozc/srpm-builds/devel  (2020-04-29)
/var/lib/copr/public_html/results/przemal/pypy3/srpm-builds/devel  (2019-04-16)
/var/lib/copr/public_html/results/x3n0m0rph59/precached/srpm-builds/devel  (2019-03-11)
/var/lib/copr/public_html/results/x3n0m0rph59/eruption/srpm-builds/devel  (2021-02-13)
/var/lib/copr/public_html/results/zirneklitis/gtans/srpm-builds/devel  (2019-05-07)
/var/lib/copr/public_html/results/ignatenkobrain/elfdeps/srpm-builds/devel  (2019-03-11)
/var/lib/copr/public_html/results/xiubli/nbd-runner/srpm-builds/devel  (2019-06-10)
/var/lib/copr/public_html/results/luminoso/vorta/srpm-builds/devel  (2021-02-27)
/var/lib/copr/public_html/results/luminoso/Signal-Desktop/srpm-builds/devel  (2021-02-18)
/var/lib/copr/public_html/results/registe/others/srpm-builds/devel  (2019-03-11)
/var/lib/copr/public_html/results/besser82/libxcrypt_CI/srpm-builds/devel  (2019-03-11)
/var/lib/copr/public_html/results/praiskup/distgen-ci/srpm-builds/devel  (2019-05-13)
/var/lib/copr/public_html/results/@rubygems/rubygems/srpm-builds/devel  (2019-07-18)
/var/lib/copr/public_html/results/iranzo/citellus/srpm-builds/devel  (2019-03-11)
/var/lib/copr/public_html/results/slaanesh/system-management/srpm-builds/devel  (2019-10-30)
/var/lib/copr/public_html/results/@git-maint/git/srpm-builds/devel  (2020-04-04)
/var/lib/copr/public_html/results/jwendell/istio/srpm-builds/devel  (2019-07-26)
/var/lib/copr/public_html/results/sar/komorebi-fork/srpm-builds/devel  (2020-12-29)
/var/lib/copr/public_html/results/airudah/solarflare/srpm-builds/devel  (2019-03-06)
/var/lib/copr/public_html/results/elek95eel/mate-ayatana/srpm-builds/devel  (2019-06-11)
/var/lib/copr/public_html/results/ryoh/nginx-mainline/srpm-builds/devel  (2019-03-11)
/var/lib/copr/public_html/results/redara/gluster-collectd/srpm-builds/devel  (2019-03-11)
/var/lib/copr/public_html/results/lee191022/test-httpd/srpm-builds/devel  (2020-12-17)
/var/lib/copr/public_html/results/casjay/casjay-release/srpm-builds/devel  (2019-06-02)
/var/lib/copr/public_html/results/casjay/apr/srpm-builds/devel  (2019-03-11)
/var/lib/copr/public_html/results/further/apache-commons-jcs/srpm-builds/devel  (2019-03-11)
/var/lib/copr/public_html/results/chinodesuuu/Amelia-Mariner/srpm-builds/devel  (2020-11-28)
/var/lib/copr/public_html/results/leiwang/QGIS-2.18.20_Oracle/srpm-builds/devel  (2019-10-22)
/var/lib/copr/public_html/results/churchyard/rpm-exclude-change/srpm-builds/devel  (2020-11-21)
/var/lib/copr/public_html/results/xz18/i3status-2.12-99/srpm-builds/devel  (2019-03-11)
/var/lib/copr/public_html/results/luya/blender-egl/srpm-builds/devel  (2021-02-05)
/var/lib/copr/public_html/results/manizuca/wine-lol/srpm-builds/devel  (2020-10-17)
/var/lib/copr/public_html/results/loveshack/livhpc/srpm-builds/devel  (2021-03-01)
/var/lib/copr/public_html/results/khoitd1997/toml11/srpm-builds/devel  (2019-04-21)
/var/lib/copr/public_html/results/sketchybinary/kismet/srpm-builds/devel  (2019-06-05)
/var/lib/copr/public_html/results/johnsauter/jdcal/srpm-builds/devel  (2021-03-05)
/var/lib/copr/public_html/results/johnsauter/sound_effects_player/srpm-builds/devel  (2021-02-04)
/var/lib/copr/public_html/results/@python/python3.8/srpm-builds/devel  (2019-05-10)
/var/lib/copr/public_html/results/@python/python3.8:pr:9/srpm-builds/devel  (2019-08-01)
/var/lib/copr/public_html/results/szab100/systemd/srpm-builds/devel  (2019-03-11)

This probably means that we mistakenly build even source RPMs in devel subdirectory?

Build succeeded.

No, I think the devel directory is leftover from those days we did craterepo
in srpm-builds. Nowadays I think that just prunerepo re-creates the directory
when it was already created before...

Can anyone please check? I'd like to turn ON the cleanup script now ... there's
only ~150G free space on the backend now ...

No, I think the devel directory is leftover from those days we did craterepo
in srpm-builds.

I am not sure about that because there are several devel directories from 2021.

Nowadays I think that just prunerepo re-creates the directory
when it was already created before...

I thought the reason is ^^^. But I don't think I was right:
https://pagure.io/copr/copr/blob/c7f10bab0b5d3ab22af0cc389ef61daba2f32d90/f/backend/run/copr_prune_results.py#_152-155

This seems to be the cause:
https://pagure.io/copr/copr/blob/c7f10bab0b5d3ab22af0cc389ef61daba2f32d90/f/backend/copr_backend/actions.py#_120-134

No, wrong again, even there's the precisely defined chroots.

Metadata Update from @praiskup:
- Pull-request tagged with: wip

3 years ago

Closed. The devel repos were removed overnight by cron, as well the tmp, repodata, etc. repositories (except those that were created recently, see #1740 for more inf).

Pull-Request has been closed by praiskup

3 years ago
Metadata