(
Jump to the original submission)
Thu 22 Sep 2016 10:39:35 PM UTC, comment #6:
Added to the Cookbook on the wiki http://wiki.octave.org/Cookbook#Find_if_a_package_is_installed
|
Thu 22 Sep 2016 08:04:08 PM UTC, comment #5:
Francesco,
I added some notes on pkg.m's querying options here:
http://hg.savannah.gnu.org/hgweb/octave/rev/640c1b476860
Will be part of the 4.2.0 release.
|
Thu 22 Sep 2016 05:55:34 PM UTC, comment #4:
Fransesco,
it is documented:
Maybe the first lines of the help should mention that pkg can be used for querying installed packages and the relevant syntax should be listed.
|
Thu 22 Sep 2016 12:03:02 PM UTC, comment #3:
Thanks. nice. I had not tried it because the obvious outcome in my opinion would have been throwing an error, and no docs exist on the result.
So please convert this into a documentation bug, saying that if the package does not exist then an empty cell array is returned, and that this is the recommended way to check for a package being installed.
|
Thu 22 Sep 2016 11:19:20 AM UTC, comment #2:
Define "easy" ....
Have you tried your own suggestion? as that works since ages:
pkgs = pkg ("list") ## returns info on all installed packages
pkgfoo = pkg ("list", "foo") ## returns info about pkg foo
If not installed you get an empty cell array.
As this is available functionality I close this with "invalid"
|
Thu 22 Sep 2016 11:11:00 AM UTC, comment #1:
Something like
|
Thu 22 Sep 2016 11:03:11 AM UTC, original submission:
Ideally, it should be easy to check whether a package is installed, something like
> pkg("isinstalled", "packagename")
|
(Note: upload size limit is set to 16384 kB, after insertion of the required
escape characters.)
Attach File(s):
Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Follow 4 latest changes.