From cc8c708295ff36352b309d843fddb14418b5a6be Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Sat, 25 Nov 2023 08:00:19 +0100 Subject: [PATCH] HACKING: how to bisect --- HACKING | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/HACKING b/HACKING index 1c77ee9..ff9784b 100644 --- a/HACKING +++ b/HACKING @@ -27,6 +27,41 @@ Making a new release - Build and upload to pypi: - $ rm dist/* + $ rm -rf dist/* $ python3 setup.py sdist - $ twine upload --sign dist/* + $ twine upload dist/* + +Using debbisect to find regressions +----------------------------------- + + $ debbisect --cache=./cache --depends="git,ca-certificates,python3, + ghostscript,imagemagick,mupdf-tools,poppler-utils,python3-pil, + python3-pytest,python3-numpy,python3-scipy,python3-pikepdf" \ + --verbose 2023-09-16 2023-10-24 \ + 'chroot "$1" sh -c " + git clone https://gitlab.mister-muffin.de/josch/img2pdf.git + && cd img2pdf + && pytest 'src/img2pdf_test.py::test_jpg_2000_rgba8[internal]"' + +Using debbisect cache +--------------------- + + $ mmdebstrap --variant=apt --aptopt='Acquire::Check-Valid-Until "false"' \ + --include=git,ca-certificates,python3,ghostscript,imagemagick \ + --include=mupdf-tools,poppler-utils,python3-pil,python3-pytest \ + --include=python3-numpy,python3-scipy,python3-pikepdf \ + --hook-dir=/usr/share/mmdebstrap/hooks/file-mirror-automount \ + --setup-hook='mkdir -p "$1/home/josch/git/devscripts/cache/pool/"' \ + --setup-hook='mount -o ro,bind /home/josch/git/devscripts/cache/pool/ "$1/home/josch/git/devscripts/cache/pool/"' \ + --chrooted-customize-hook=bash + unstable /dev/null + file:///home/josch/git/devscripts/cache/archive/debian/20231022T090139Z/ + +Bisecting imagemagick +--------------------- + + $ git clean -fdx && git reset --hard + $ ./configure --prefix=$(pwd)/prefix + $ make -j$(nproc) + $ make install + $ LD_LIBRARY_PATH=$(pwd)/prefix/lib prefix/bin/compare ...