migmedia.net

lost+found

Paludis Hooks

2013-12-19
Tags: gentoo

While Paludis works, it scans the /etc/paludis/hooks-dir for hooks to execute at special events.

Applying local patches

File: /etc/paludis/hooks/ebuild_prepare_post/apply-local-patches.bash

(
    cd "${S}"
    patchdir="/etc/paludis/patches/${CATEGORY}/${PN}"
    if [[ -d $patchdir ]] ; then  
        einfo "Applying user patches"
        for p in $patchdir/*.patch ; do
            [[ -f "${p}" ]] || continue
            einfo "Applying $(basename ${p} )"
            patch -p1 < ${p} || exit 1
        done
        einfo "Done"
    fi
)

lafilefixer

This runs lafilefixer on your image before it is merged into $ROOT. This way you won’t have problems with changed mtimes or checksums (which you will have if you run lafilefixer later)

File: /etc/paludis/hooks/auto/lafilefixer.hook

#!/usr/bin/env bash

hook_auto_names() {
  echo "merger_install_pre"
}

hook_run_merger_install_pre() {
  source ${PALUDIS_EBUILD_DIR}/echo_functions.bash

  einfo_unhooked "Running lafilefixer"

  lafilefixer ${IMAGE}
}

Source:

  1. Paludis/Hooks offline maybe you find in Google-Cache something.
  2. Exherbo rejected my patch, now what?