[Pkg-fonts-devel] my rebuild scripts

Adam Borowski kilobyte at angband.pl
Sat Jul 30 16:29:16 UTC 2016

Here's a few of my scripts for rebuilding all rdeps of a package.

apt-get install moreutils devscripts dose-extra

Place the attached scripts somewhere, I use ~/debian/ but probably ~/bin/
would be better (as it's picked into $PATH by the default .bashrc).

To run a rebuild:
nice parallel sbuild -- `~/debian/rdeps-for-source fontforge`
(if you have DEB_BUILT_OPTS=parallel=X set, it's wise to reduce that)

To post-process the results:

An imaginary friend squared is a real enemy.
-------------- next part --------------

for x in "$@"
    grep-dctrl -r -S "^${x/\./\\.}\\b" -s Package /var/lib/apt/lists/*_dists_unstable_*_binary-amd64_Packages|cut -d' ' -f 2
-------------- next part --------------
# Depends: devscripts dose-extra moreutils

# build-rdeps takes three ages and two forevers, so if we need to run it
# multiple times, do so in parallel.
parallel build-rdeps -- `~/debian/binaries-for-source "$@"`|
grep -v '^Reverse Build-depends'|
grep -v -- '^------------'|
grep -v '^Found '|
grep -v '^No reverse build-depends found'|
grep -v '^$'|
-------------- next part --------------
# Sorts sbuild log files in current directory into subdirectories of ./logs/
# Doing it while a rebuild is still ongoing is fine, partial logs will be
# skipped.

set -e

mkdir -p logs/{successful,skipped,attempted,failed}
mv *.build logs/ ||:
cd logs
for x in `ls *.build|sort|tac` # do symlinks before actual logs
    ST="$(grep -a '^Status: \(successful\|skipped\|attempted\|failed\)$' "$x"|cut -d' ' -f2)"
    if [ -z "$ST" ]
        echo "$x has no valid status"
        mv "$x" "$ST/"

More information about the Pkg-fonts-devel mailing list