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

environment for maintainer scripts

In Ubuntu we have recently had reports[1] where users were unable to upgrade
python packages because they had installed a version of python in
/usr/local/bin which did not provide the expected functions. While we worked
around this by using the complete path to python in its postinst scripts this
is not an ideal solution because this issue certainly does not just affect
python. Additionally, the python maintainer in Ubuntu is concerned that this
workaround is a violation of the Debian Policy[2] regarding maintainer scripts
- "Programs called from maintainer scripts should not normally have a path
 prepended to them".

This issue of having a clean environment for maintainer scripts was previously
raised[3] in 2002 and on debian-devel mailing list[4], at that time there was
an argument that "the system adminstrator may prefer using a 3rd party version
of adduser". While that is true I think the technical savvy of users of dpkg
has changed since then and peferring a 3rd party version of a utility is now
the less likely case. Subsequently, we could prevent users a lot of pain by
providing a clean environment for maintainer scripts.

Would it be possible to remove /usr/local/bin from $PATH when package
operations are being performed by dpkg?

[1] https://bugs.launchpad.net/ubuntu/+source/python3.5/+bug/1682934
[2] https://www.debian.org/doc/debian-policy/#introduction-to-package-maintainer-scripts
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=18567
[4] http://lists.debian.org/debian-devel/2002/debian-devel-200210/msg00941.html

Brian Murray

Attachment: signature.asc
Description: PGP signature

Reply to: