#1140587 python3-casadi should not use dpkg-architecture in postinst

Package:
python3-casadi
Source:
python3-casadi
Description:
Nonlinear optimization and algorithmic differentiation - Python bindings
Submitter:
Helmut Grohne
Date:
2026-06-23 08:17:08 UTC
Severity:
normal
#1140587#5
Date:
2026-06-23 06:29:50 UTC
From:
To:
Installing python3-casadi gives me:

| /var/lib/dpkg/info/python3-casadi.postinst: 8: dpkg-architecture: not found

Looking into its postinst reveals that it uses dpkg-architecture for
computing a path in the package at runtime. The result of this will be
wrong for foreign installation. It is not sufficient here to add a
dependency on dpkg-dev.

Instead, please compute the path at build time. Note that dh_installdeb
will substitute #DEB_HOST_MULTIARCH#.

Helmut