# HG changeset patch # User Carlo de Falco # Date 1242741577 -7200 # Node ID 70177bf9cc16f228abfe140c1540f1addeece76f # Parent 612918b993a0cda3a5e8cfdb1cdc7dbebb172bdf Fix bug when calling pkg describe to check whether a package is installed diff -r 612918b993a0 -r 70177bf9cc16 scripts/ChangeLog --- a/scripts/ChangeLog Wed May 20 11:48:30 2009 +0200 +++ b/scripts/ChangeLog Tue May 19 15:59:37 2009 +0200 @@ -1,3 +1,8 @@ +2009-05-19 Carlo de Falco + + * pkg/pkg.m: Fix a bug when quering only one non installed package + with "pkg describe". + 2009-05-14 Jaroslav Hajek * optimization/__fdjac__.m: Support central differences. diff -r 612918b993a0 -r 70177bf9cc16 scripts/pkg/pkg.m --- 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)