patchGNU Octave - Patches: patch #8664, pkg: after installing a pkg, tell...


patch #8664: pkg: after installing a pkg, tell people how to load it

Submitted by:  Colin Macdonald <cbm>
Submitted on:  Thu 30 Apr 2015 02:53:16 PM UTC  
Category:  Core : new feature Priority:  3 - Low
Status:  Wont Do Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 18 Jan 2020 11:22:02 AM UTC, comment #3: 

Review for Octave 6.

Rather short patch

# HG changeset patch
# User Colin Macdonald <>
# Date 1430404512 -3600
#      Thu Apr 30 15:35:12 2015 +0100
# Node ID 522bfe4f2d2773442ef79875836416e3b69a3324
# Parent  3797df9219887163675da937e707536d0cfe55ce
pkg: after installing a pkg, tell people how to load it

Hopefully reduces email from people saying they installed a package
but "it doesn't work".

diff -r 3797df921988 -r 522bfe4f2d27 scripts/pkg/private/install.m
--- a/scripts/pkg/private/install.m        Wed Apr 29 17:09:24 2015 -0700
+++ b/scripts/pkg/private/install.m        Thu Apr 30 15:35:12 2015 +0100
@@ -335,10 +335,12 @@
   ## If there is a NEWS file, mention it.
   ## Check if desc exists too because it's possible to get 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",
-  ,;
+  if (exist ("desc", "var"))
+    printf ("Run 'pkg load %s' to use this package.\n",;
+    if (exist (fullfile (desc.dir, "packinfo", "NEWS"), "file"))
+      printf ("Run 'news %s' for information about changes from previous versions.\n",
+    ;
+    endif


But not interest for five years.  Thus closing this item.

Kai Torben Ohlhus <siko1056>
Project Member
Wed 06 May 2015 07:20:02 PM UTC, comment #2: 

"They will be using ... a distribution such as MXE with pre-built package binaries"
FTR, in the MXE installer none of the included packages is loaded by default.

Philip Nienhuis <philipnienhuis>
Project Member
Sun 03 May 2015 11:11:14 PM UTC, comment #1: 

For completeness, the discussion on the mailing list is here

My response was more of "it was not telling users to load the package for the symbolic package because _unimplemented_ did not had a list for symbolic, but it is fixed now and will happen for 4.0.0".

I don't think that this will make a big difference on educating the users. Maybe I'm stereotyping but I think that most of the users that are unable to find the answer by searching the problem online, are users that won't be using pkg to install it on the first place and so would never see this warning. They will be using their package manager or a distribution such as MXE with pre-built package binaries.

Also, the functions from the most used packages (according to the SF download stats) are already handled in _unimplemented_ with a reminder to use 'pkg load'. Chances are the user will have already been educated about loading packages before.

A better way to handle this would be to have _unimplemnted_() check the INDEX of all installed packages and provide the user with the names of packages that implement such function.

Carnë Draug <carandraug>
Project Member
Thu 30 Apr 2015 02:53:16 PM UTC, original submission:  

I discussed on the maillist a while back and I think the response was sort of "send patch".  So here is patch :)

Colin Macdonald <cbm>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #33844:  pkg_explain_loading.patch added by cbm (1KiB - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by cbm (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-01-18 siko1056 CategoryNone => Core : new feature
        Priority5 - Normal => 3 - Low
        StatusNone => Wont Do
        Open/ClosedOpen => Closed
    2015-04-30 cbm Attached File- => Added pkg_explain_loading.patch, #33844

    Back to the top

    Powered by Savane 3.5