File: info-file-path.patch

package info (click to toggle)
octave-optim 1.6.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,480 kB
  • sloc: cpp: 1,047; makefile: 215; perl: 169; xml: 29; sh: 3
file content (40 lines) | stat: -rw-r--r-- 1,384 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Description: Indicate to optim_doc() that the info file is in /usr/share/info
Author: Sébastien Villemot <sebastien@debian.org>
Forwarded: not-needed
Last-Update: 2014-08-06
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/inst/optim_doc.m
+++ b/inst/optim_doc.m
@@ -32,30 +32,7 @@ function optim_doc (keyword)
   endif
 
   ## locate installed documentation
-  persistent infopath = "";
-  if (isempty (infopath))
-    [local_list, global_list] = pkg ("list");
-    if (! isempty (local_list)
-        && ! isempty (idx = ...
-                      find (strcmp ("optim",
-                                    {structcat(1, local_list{:}).name}),
-                            1)))
-      idir = local_list{idx}.dir;
-    elseif (! isempty (global_list)
-            && ! isempty (idx = ...
-                          find (strcmp ("optim",
-                                        {structcat(1, global_list{:}).name}),
-                                1)))
-      idir = global_list{idx}.dir;
-    else
-      error ("no installed optim package found");
-    endif
-    infopath = fullfile (idir, "doc/", "optim.info");
-    ## allow for .gz
-    if (! exist (infopath, "file"))
-      infopath = strcat (infopath, ".gz");
-    endif
-  endif
+  persistent infopath = "/usr/share/info/octave-optim.info.gz";
 
   ## display info
   INFO = info_program ();