[Pkg-octave-devel] postinstall may fail when /usr/local/bin/octave exists
Mike Miller
mtmiller at debian.org
Tue Aug 22 20:48:47 UTC 2017
Hi,
One thing that I have seen a lot of in Ubuntu, but not so much in
Debian, is a postinstall failure when the user has built and installed
octave under /usr/local, then later tries to upgrade or install octave
from the archive.
By default, /usr/local/bin precedes /bin and /usr/bin in root's PATH, so
octave's postinstall will end up running /usr/local/bin/octave.
In the typical scenario, postinstall fails with
error: couldn't read directory /usr/local/share/octave/packages: No such file or directory
and the package is left unconfigured. Users are told to delete
/usr/local/bin/octave and run apt-get -f install, problem solved.
In a slightly more subtle case, I could imagine this silently
succeeding, but with the wrong instance of Octave, leaving all
apt-installed octave-foo packages unavailable when a user later runs
/usr/bin/octave.
I know typically it is preferable to call commands by name and let PATH
do its job, but in this case, where we want to build the package cache
for a specific instance of Octave, maybe we should call /usr/bin/octave
explicitly?
See also python3.x postinst, which do run specific pythons by full path
to byte-compile the standard library at install time.
--
mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-octave-devel/attachments/20170822/205e86e6/attachment.sig>
More information about the Pkg-octave-devel
mailing list