jrmarino / synth

Next D/Ports build tool for live systems (Alternative for Portmaster and Portupgrade tools)
ISC License
255 stars 15 forks source link

'purge-distfiles' has deleted a wrong file #162

Open quicktrick opened 5 years ago

quicktrick commented 5 years ago

The file that should not been deleted is fail2ban-fail2ban-0.11.0.dev3.20190524-f48677d_GH0.tar.gz (today's commit). I've just built the repository with that distfile. And after the 'rebuild-repository' I executed:

➜ ~ # synth purge-distfiles
Scanning the distinfo file of every port in the tree ... done
Deleting urllib3-1.22.tar.gz
Deleting rspamd-rspamd-1.9.3_GH0.tar.gz
Deleting requests-2.21.0.tar.gz
Deleting libuv-libuv-v1.29.0_GH0.tar.gz
Deleting PySocks-1.7.0.tar.gz
Deleting python/Sphinx-1.6.5.tar.gz
Deleting fail2ban-fail2ban-0.11.0.dev3.20190524-f48677d_GH0.tar.gz
Deleting fail2ban-fail2ban-0.11.0.dev3.20190514-5137cd2_GH0.tar.gz
Deleting cmake-3.14.3.tar.gz
Deleting rspamd-rspamd-1.9.2_GH0.tar.gz
Recovered 24.00 megabytes

Though in my /usr/freebsd-ports/security/py-fail2ban-devel/distinfo

TIMESTAMP = 1558713107
SHA256 (fail2ban-fail2ban-0.11.0.dev3.20190524-f48677d_GH0.tar.gz) = 93fdf4217512620a80e8f17ad15ad34311f7b1079eac299eb6078106f66e96b9
SIZE (fail2ban-fail2ban-0.11.0.dev3.20190524-f48677d_GH0.tar.gz) = 522662
➜ ~ # pkg search -r Synth fail2ban
py27-fail2ban-devel-0.11.0.d3.20190524 Scans log files and bans IP that makes too many password failures (development version)
py36-fail2ban-devel-0.11.0.d3.20190524 Scans log files and bans IP that makes too many password failures (development version)
Ximalas commented 4 months ago

While I don't have a solution, Poudriere's distclean subcommand runs into the same problem, deleting too many files. In many cases this is due to incomplete distinfo files. Go packages and Rust crates springs easily to mind. As a consequence, I sometimes take my laptop to work, run synth purge-distfiles or poudriere distclean, depending on my mood, and then run make fetch-recursive on my local metaports to get everything shipshape again.