[Pkg-octave-devel] [RFC] patch octave to help users install auxiliary packages
Mike Miller
mtmiller at ieee.org
Thu Aug 1 13:42:56 UTC 2013
Hi, looking for comments on this unfinished idea. What do you think
about carrying a patch for octave that would indicate which Debian
packages users need to install when certain commands fail? I'm thinking
specifically about doc and mkoctfile, are there others? Yes, users can
read README.Debian, but we all know not everyone looks there. And if we
can provide feedback right in the interpreter, why not?
Only a small number of bug reports have ever come in about this [1,2],
but it does get asked on the upstream help list fairly often.
Anyway, here's a quick-n-dirty patch to demonstrate what I'm talking
about. Would this be welcome? If so I will test it some more and develop
it further.
[1] http://pad.lv/1194712
[2] http://bugs.debian.org/555646
---
diff --git a/scripts/help/doc.m b/scripts/help/doc.m
--- a/scripts/help/doc.m
+++ b/scripts/help/doc.m
@@ -76,6 +76,12 @@
info_file_name = info_file ();
endif
+ [stat_info, err] = stat (info_file_name);
+
+ if (err < 0)
+ error ("doc: info file not found, please install the Debian package 'octave-info'");
+ endif
+
## FIXME -- don't change the order of the arguments below because
## the info-emacs-info script currently expects --directory DIR as
## the third and fourth arguments. Someone should fix that.
diff --git a/scripts/miscellaneous/mkoctfile.m b/scripts/miscellaneous/mkoctfile.m
--- a/scripts/miscellaneous/mkoctfile.m
+++ b/scripts/miscellaneous/mkoctfile.m
@@ -162,6 +162,7 @@
if (sys == 127)
warning ("unable to find mkoctfile in expected location: '%s'",
shell_script);
+ warning ("mkoctfile: please install the Debian package 'liboctave-dev'");
warning ("mkoctfile exited with failure status");
endif
--
mike
More information about the Pkg-octave-devel
mailing list