How many log directories do you have?

April 21st 2009 08:37 pm

The question in the title pertains if you use kdesvn-build. kdesvn-build creates a separate log directory for every single run it makes. If you’ve done a lot of kdesvn-build runs and you’ve never manually cleaned out your log directory you’ve probably got quite a few hundreds of log bundles.

Someone finally noticed and filed a bug. Attached to that bug is a patch I’ve created to remove all log directories but the ones referenced in the latest kdesvn-build run for a given module. I consider this the correct behavior so at this point I’m not looking to make it optional or require a magic incantation to Do the Right Thing.

So, if you use kdesvn-build I’d recommend trying out the patch (always use –pretend first!). If you want to skip straight to pruning directories you can use a command like kdesvn-build --no-svn --no-build --no-install kdelibs (replace kdelibs with a module in your rc file). Also, does anyone have a reason to retain more log directories than those in log/latest? (And has a reason that you can’t manually save the directory? :)

If not this will be probably the last feature I add before I make a separate release of kdesvn-build. I have duty tomorrow so it will be awhile before I can respond to comments but feel free to leave them anyways!

Posted by mpyne under KDE & kdesvn-build | 5 Comments »

5 Responses to “How many log directories do you have?”

  1. Parker Coates Identicon Icon Parker Coates responded on 21 Apr 2009 at 21:58 #

    Funny, I just deleted a half gig of kdesvn-build logs yesterday. Definitely a worthwhile feature.

  2. Josh (irc:CondorDes) Identicon Icon Josh (irc:CondorDes) responded on 22 Apr 2009 at 00:04 #

    Yes, I do occasionally find older log files useful.

    If I ever need to look at the details of how a package was configured (e.g. CMake output — did it find some optional dependency or not?), I will need to go back to pre-”latest” logs and look at the output. Furthermore, I may not know ahead of time that I need to save this information.

    For instance, suppose I try to add a new account to Kopete, and it suddenly decides that it does not have SSL support. In order to begin debugging, I need to acertain whether CMake found the QCA optional package or not.

    If the old logs were wiped away, I’ll have to do a clean build of the entire kdenetwork module (and possibly re-test Kopete) to get that information.

    (Yes, this has actually happened to me, with Kopete and with other apps.)

  3. Thomas Fjellstrom Identicon Icon Thomas Fjellstrom responded on 22 Apr 2009 at 00:24 #

    I have one possible reason to not auto prune. Often I run kdesvn-build many times in succession because something is failing, and I need to keep the old log around to see if the error has changed.

    Of course I don’t really need to keep all logs.. usually just the ones from the last day or two (I often run the jobs around midnight, so keep a couple days of logs…)

    This is funny: kde4-devel@natasha:~/kdesvn$ ls log/ | wc -l
    233

    :D

  4. Troels Kofoed Jacobsen Identicon Icon Troels Kofoed Jacobsen responded on 22 Apr 2009 at 01:01 #

    One reason to save other log directories is that e.g. cmake.log or configure.log is not in log/latest if you did not run with –reconfigure. log/latest only keep logs of what parts of kdesvn-build is run.
    I’m not sure it is important to save these anyway, just wanted to bring it up.
    Maybe you should instead save the latest of every file in log/laetst/*/ and only the latest dir. This way you will keep older cmake.log svn-up.log and so on.

  5. dimsuz Identicon Icon dimsuz responded on 22 Apr 2009 at 03:07 #

    I never clean them too, so I have a lot of log dirs :)
    Speaking of using them: *very rarely* i check build.log to see if cmake had some error.
    Most of the time if some error occurs I just go into the respective module dir and try to run make (or cmake) there to see what broke, so I’d say i never use logs. Didn’t bother to check if it’s possible to turn them off though :)

Trackback URI | Comments RSS

Leave a Reply