bugGNU Octave - Bugs: bug #49156, No easy way to check whether a...

 
 

bug #49156: No easy way to check whether a package is installed

Submitted by:  Francesco Potortì <pot>
Submitted on:  Thu 22 Sep 2016 11:03:11 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Documentation
Status: InvalidAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.3Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission 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

Carnë Draug <carandraug>
Project Member
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.

Philip Nienhuis <philipnienhuis>
Project Member
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.

Philip Nienhuis <philipnienhuis>
Project Member
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.

Francesco Potortì <pot>
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"

Philip Nienhuis <philipnienhuis>
Project Member
Thu 22 Sep 2016 11:11:00 AM UTC, comment #1:

Something like

Francesco Potortì <pot>
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")

Francesco Potortì <pot>

 

(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

 

Carbon-Copy List
  • -unavailable- added by pot (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 22 Sep 2016 05:55:34 PM UTCphilipnienhuisItem GroupFeature Request=>Documentation
    Thu 22 Sep 2016 11:19:20 AM UTCphilipnienhuisStatusNone=>Invalid
      Open/ClosedOpen=>Closed
      Operating SystemGNU/Linux=>Any

    Back to the top


    Powered by Savane 3.1-cleanup1