[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sbuild dh: error: unable to load addon python3



On Thursday, July 01 2021, Geert Stappers wrote:

> Invoking sbuild with just 'sbuild' gives me:
>
>   $ sbuild
>   dh clean --with python3 --buildsystem=pybuild
>   dh: error: unable to load addon python3: Can't locate
>     Debian/Debhelper/Sequence/python3.pm in @INC
>     (you may need to install the Debian::Debhelper::Sequence::python3 module)
>
>
> Doing `apt-file search Debian/Debhelper/Sequence/python3.pm` yields
> dh-python: /usr/share/perl5/Debian/Debhelper/Sequence/python3.pm
>
>
> Why doesn't sbuild fetch and install build dependencies?

This happens because sbuild runs the "dh clean" (actually, the
"debian/rules clean" target) step *outside* of the chroot, before the
build actually starts.  This means that sbuild expects you to have the
build deps installed on your host.

This is usually not desirable/required, so you can tell sbuild to not
clean the source tree by passing the --no-clean-source option to it, or
by adding the line "$clean_source = 0;" to your ~/.sbuildrc.

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/

Attachment: signature.asc
Description: PGP signature


Reply to: