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

[Pkg-octave-devel] postinstall may fail when /usr/local/bin/octave exists



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

Attachment: signature.asc
Description: PGP signature


Reply to: