Mercurial > hg > octave-lojdl
changeset 9258:a653c61ee98c
let pkg describe return version information
author | Carlo de Falco <kingcrimson@tiscali.it> |
---|---|
date | Sun, 24 May 2009 12:35:22 +0200 |
parents | ab952265ad06 |
children | 75c502937d2c |
files | scripts/ChangeLog scripts/pkg/pkg.m |
diffstat | 2 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-05-26 Carlo de Falco <kingcrimson@tiscali.it> + + * pkg/pkg.m: Add "version" field to the structure returned by "pkg + describe". + 2009-05-25 Ben Abbott <bpabbott@mac.com> * plot/__go_draw_axes__.m: Properly render TeX symbols for x11, when
--- a/scripts/pkg/pkg.m +++ b/scripts/pkg/pkg.m @@ -993,6 +993,7 @@ endif pkg_desc_list{name_pos}.name = installed_pkgs_lst{i}.name; + pkg_desc_list{name_pos}.version = installed_pkgs_lst{i}.version; pkg_desc_list{name_pos}.description = installed_pkgs_lst{i}.description; pkg_desc_list{name_pos}.provides = parse_pkg_idx (installed_pkgs_lst{i}.dir); @@ -1012,7 +1013,8 @@ if (nargout == 0) for i = 1:num_pkgnames - print_package_description (pkg_desc_list{i}.name, + print_package_description (pkg_desc_list{i}.name, + pkg_desc_list{i}.version, pkg_desc_list{i}.provides, pkg_desc_list{i}.description, flag{i}, verbose); @@ -1075,10 +1077,11 @@ fclose (fid); endfunction -function print_package_description (pkg_name, pkg_idx_struct, +function print_package_description (pkg_name, pkg_ver, pkg_idx_struct, pkg_desc, status, verbose) printf ("---\nPackage name:\n\t%s\n", pkg_name); + printf ("Version:\n\t%s\n", pkg_ver); printf ("Short description:\n\t%s\n", pkg_desc); printf ("Status:\n\t%s\n", status); if (verbose)