[Pkg-mailman-hackers] Bug#1010273: Possible solution: add --clear flag to collectstatic

Marco Steinacher marco at websource.ch
Wed Nov 29 08:25:03 GMT 2023


Hi again,

Here is an update to my previous message:

I think the easiest workaround is to add the --clear flag to the 
collectstatic command, i.e.

www-data at mail:/usr/share/mailman3-web$ ./manage.py collectstatic --clear
www-data at mail:/usr/share/mailman3-web$ ./manage.py compress

With the --clear flag the existing files are deleted before trying to 
copy the original file.
https://docs.djangoproject.com/en/4.2/ref/contrib/staticfiles/#collectstatic

This should solve the problem of old static files not being updated 
because of source files that are older than the files installed by the 
previous version.

The --clear flag should probably be added to 
debian/mailman3-web.postinst in update_django(), line 198, to fix the 
problem in the mailman3-web Debian package. 
https://salsa.debian.org/mailman-team/mailman-suite/-/blob/master/debian/mailman3-web.postinst#L198

Marco
-- 
OpenPGP Key ID: 0x62937F7F



More information about the Pkg-mailman-hackers mailing list