I just noticed that Boost seemed to be cleaning up expired files - but not the expired symlinks...

find . -type l -printf "%Y %p\n" | grep ^N | gawk '{ print $2 }' | xargs rm

just "cd" into the cache folder, and run that...
1) It finds all symlinks and prints if they links to a file or if they link to a non existant (f or N) along with the filename.
2) It greps to list only the non-existant
3) Ir uses gawk to break out the 2nd arg (path)
4) is passes it to rm

Worked well for me, although it'd probably be best if broken symlinks weren't made to start with...

PS: Feature Request was the closes I could find.

Comments

ferrangil’s picture

Thanks, I've seen too much expired symlinks (that I think needs to be removed...).

mikeytown2’s picture

You can try this patch out, removes the problem from ever occurring.
#174380: Remove symlink creation. Let each path have own file

Also I'm still looking
#454652: Looking for a co-maintainer - 5.x

ferrangil’s picture

I think there's another option. Once a week, for example, I disable the boost module and remove all the 'cache' files. Then reenable boost.
Is this a valid method (I know it's not too practical really)?
I'm sorry but I'm not capable to help you in the maintainance :(

mikeytown2’s picture

@ferrangil
If it's working for you then keep doing what your doing. If I where in your situation I would make a cron job that disables boost, clears out the cache dir, re-enables boost. Would take me couple of hrs to do, but then that frees me up to do more important things in the future.
you should also look into #337364: _boost_rmdir_rf doesn't delete symlinks

ferrangil’s picture

I red my post and it looks like I'm explaining what I'm doing. In fact, I'm just starting to use boost (4 days ago), so not yet need to "clean" the cache dir. It was more like a question, but no worries.
I had 28 Mb of cahed files this morning; yesterday we had 32 Mb, so it seems to be removing some cached files just fine (but probably the links are still there).
Thank you for that link. You might close this issue if your patch in #2 solves the original issue...

mikeytown2’s picture

@ferrangil
#2 is fixed for the 6.x code branch. Because there is a patch for 5.x I'm keeping it open, with the hope that someone will take over maintaining 5.x. I don't have the time/drive to take on the 5.x version of boost; i would rather work on 7.x.

mikeytown2’s picture

Status: Needs review » Closed (duplicate)

This issue removes all symlinks; merging all symlink issues into this one.
#174380: Remove symlink creation. Let each path have own file