1. bash hates twisted (me too, sometimes)

    I have a strange bug with bash shebang: when I try to give twistd as interpreter, bash tries to execute the script as a shell script !

    Here is a simple, not working, twisted script with a shebang:

    #! /usr/bin/twistd -y
    from twisted.application import internet, service

    Bash execution:

    $ bash -c ./test.tac
    from: can't read /var/mail/twisted.application

    Bash is trying to execute the script as a shell script ! (from is a shell command).

    Zsh execution:

    $ zsh -c ./test.tac
    Failed to load application: 'application'

    The error is correct (there is no application defined in the twisted script). It really looks like a bug in bash ..

    read more
  2. Quilt, a patch management system (how to survive with many patches)

    Quilt is a nice tool to manage series of patches, and is particularly adapted to subversion (not very useful for git, the concept of patch series is integrated). It can manage dependant patches, edition, updating patches for a code change, etc.

    Start by telling quilt where to store patches:

    $ export QUILT_PATCHES=debian/patches

    Quilt will create the directory automatically when creating the first patch.

    Now, suppose we want to create a new patch, called my_nice_patch:

    $ quilt new my_nice_patch
    Patch my_nice_patch is now on top

    \On top\ ? quilt manages patches as a stack, so you will have to push patches to apply them, and pop to deapply.Now that we have a patch name, we have to mark the files we will modify in this patch:

    $ quilt add reports.py gather.py
    File reports.py added to patch my_nice_patch
    File gather.py added to patch my_nice_patch

    So far so good. Three commands, and we have done nothing :) Files can be modified using your favorite editor (subliminal hint: vim), as usual. At any moment, you can get the diff between your modifications and the unpatched files:

    quilt diff

    will print a standard diff.

    At this point, you have finished your patch. If ...

    read more

« Page 2 / 2