diff scripts/pkg/pkg.m @ 9220:70177bf9cc16

Fix bug when calling pkg describe to check whether a package is installed
author Carlo de Falco <kingcrimson@tiscali.it>
date Tue, 19 May 2009 15:59:37 +0200
parents 5247e89688e1
children a653c61ee98c
line wrap: on
line diff
--- a/scripts/pkg/pkg.m	Wed May 20 11:48:30 2009 +0200
+++ b/scripts/pkg/pkg.m	Tue May 19 15:59:37 2009 +0200
@@ -1000,9 +1000,14 @@
   endfor
 
   non_inst = find (strcmp (flag, "Not installed"));
-  if (! isempty (non_inst) && nargout < 2)
-    non_inst_str = sprintf (" %s ", pkgnames{non_inst});
-    error ("some packages are not installed: %s", non_inst_str);
+  if (! isempty (non_inst))
+    if (nargout < 2)
+      non_inst_str = sprintf (" %s ", pkgnames{non_inst});
+      error ("some packages are not installed: %s", non_inst_str);
+    else
+      pkg_desc_list{non_inst} = struct ("name", {}, "description",  
+					{}, "provides", {});
+    endif
   endif
 
   if (nargout == 0)