Bug#842092: (no subject)

Gordon Ball gordon at chronitis.net
Mon Oct 31 14:59:25 UTC 2016


As I understand it, exporting environment/make variables is not readily
possible from debhelper - it runs as a child process to make and hence
changes made to the environment in debhelper will only affect child
processes of debhelper, not those existing directly in d/rules.



For one approach, see pybuild which understands environment variables
containing commands which it executes at the appropriate time after
performing variable substitution, eg

export PYBUILD_AFTER_INSTALL=chmod -x '{destdir}/{install_dir}/foo/bar.py'

which works, but admittedly looks a bit inelegant.



Another option is to provide a small helper script (in the style of
`pkg-config`) which uses the relevant bits of dh-r to generate the
necessary strings - so you could do something like

export debRlib=$(dh-r --debrlib)
export cranNameOrig=$(dh-r --crannameorig)



Finally, any such manual intervention found in multiple packages should
(if possible) be implemented as part of the build process so it becomes
unnecessary. (Do you have a list of packages for which you've
encountered issues?)


Gordon



More information about the debian-science-maintainers mailing list