<commit_before>---
layout: post
title: "Mess up drupal and back again"
---

Sometime when I was updating drupal from 6.10 to 6.11 I thought I was going to be clever and
update as soon at the core module was available upstream. Not to wait until it reached portage. I
downloaded it and placed it in ``$WEBROOT/sites/all/modules`` and updated to that version of the core module. 
But thinking about it today I found it excessive and stupid to be doing manual updates =).  Better let webapp-config handle it again as before. So how do I go about that? Just updating with webapp-config did not suffice since the running installation still refers to the one I manually downloaded and the update script didn't help either. 
After some searching in the database I found alot of references to my ``$WEBROOT/sites/all/modules/drupal-6.10``
directory. Some of the references resided in the cache_* tables as well. 
Well, I thought that truncating the cache tables couldn't hurt so I did that and then wrote a small routine to replace the references to not include the ``$WEBROOT/sites/all/modules/drupal-6.10``: <commit_msg>Update site<commit_after>---
layout: post
title: "Mess up drupal and back again"
---

Sometime when I was updating drupal from 6.10 to 6.11 I thought I was
going to be clever and update as soon at the core module was available
upstream. Not to wait until it reached portage. I downloaded it and
placed it in ``$WEBROOT/sites/all/modules`` and updated to that
version of the core module.

But thinking about it today I found it excessive and stupid to be
doing manual updates =).  Better let webapp-config handle it again as
before. So how do I go about that? Just updating with webapp-config
did not suffice since the running installation still refers to the one
I manually downloaded and the update script didn't help either.

After some searching in the database I found alot of references to my
``$WEBROOT/sites/all/modules/drupal-6.10`` directory. Some of the
references resided in the cache_* tables as well.  Well, I thought
that truncating the cache tables couldn't hurt so I did that and then
wrote a small routine to replace the references to not include the
``$WEBROOT/sites/all/modules/drupal-6.10``:

{'fraction_non_alphanumeric': 0.05660377358490566, 'fraction_numerical': 0.01078167115902965, 'mean_word_length': 4.155092592592593, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4933268', 'n_tokens_mistral': 614, 'n_tokens_neox': 582, 'n_words': 351}