changeset 14009:c71a4c53e70a

pkg: mention available NEWS file to read after package install
author Carnë Draug <carandraug+dev@gmail.com>
date Tue, 29 Nov 2011 05:16:09 +0000
parents da929884f51e
children 99e33d556d5c
files scripts/pkg/pkg.m
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/pkg/pkg.m	Thu Nov 17 11:32:50 2011 -0800
+++ b/scripts/pkg/pkg.m	Tue Nov 29 05:16:09 2011 +0000
@@ -946,6 +946,15 @@
     load_packages_and_dependencies (idx, handle_deps, installed_pkgs_lst,
                                     global_install);
   endif
+
+  ## If there's a NEWS file, mention it
+  ## we are checking if desc exists too because it's possible to ge to this point
+  ## without creating it such as giving an invalid filename for the package
+  if (exist ("desc", "var") && exist (fullfile (desc.dir, "packinfo", "NEWS"), "file"))
+    printf ("For information about changes from previous versions of the %s package, run 'news (\"%s\")'.\n",
+            desc.name, desc.name);
+  endif
+
 endfunction
 
 function uninstall (pkgnames, handle_deps, verbose, local_list,