bugGNU Octave - Bugs: bug #48151, pkg update - error if packages are...

 
 

bug #48151: pkg update - error if packages are specified

Submitter:  Nicholas Jankowski <nrjank>
Submitted:  Mon 06 Jun 2016 05:57:14 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  Nicholas Jankowski Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 12 Dec 2018 01:09:46 AM UTC, comment #4: 

I checked in the patch under Nicholas's name here (https://hg.savannah.gnu.org/hgweb/octave/rev/b964092ad9f8).  This will be a part of the Octave 5.0 release scheduled for January.

Thanks for the code, and sorry it took so long to get it applied.

Rik <rik5>
Group administrator
Mon 18 Dec 2017 04:44:35 AM UTC, comment #3: 

@Maintainers: please review the attached patch

Avinoam Kalma <avinoam>
Group Member
Wed 15 Nov 2017 05:59:55 AM UTC, comment #2: 

I ran into the same problem, trying to update a specific package on octave 4.2.1. The changes specified here fixed the problem for me. I hope they can be integrated in to the next octave version.

Marshall <marsian>
Mon 06 Jun 2016 06:19:45 PM UTC, comment #1: 

Also had to tweak one of the following lines:

update_lst = { update_lst, installed_pkgs_lst{idx} };


to:

update_lst = [ update_lst, installed_pkgs_lst(idx) ];


otherwise it would concatenate the empty cell, which would break the later .name call on line 548 since it still looked like a cell not a struct.

patch attached

(file #37412)

Nicholas Jankowski <nrjank>
Group Member
Mon 06 Jun 2016 05:57:14 PM UTC, original submission:  

first noticed using Octave 4.0.2, Windows 32bit, zip-file install. 

"pkg update pkgname1 _pkgname2_ ..." produced an error because of 'installed_pkgs_list' not being defined. Saw that the dev branch had a fix for this and a following line defining update_lst, but searching failed to find me a bug/patch tracker related to these fixes.  The dev version still gives the following error:


>> pkg update control signal
error: cell cannot be indexed with .


the line of interest is:

 installed_names = {installed_pkgs_lst.name}';

but installed_pkgs_lst is a cell array of structs, so .name errors out. the following line does work:


#installed_names = cellfun (@(idx) idx.name, installed_pkgs_lst, 'UniformOutput', false);


With this running the pkg command above works. Will upload a patch for review to implement this fix.

Nicholas Jankowski <nrjank>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #37412:  pkgupdatefix.diff added by nrjank (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by marsian (Posted a comment)
  • -email is unavailable- added by nrjank (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-12-12 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
        Operating SystemMicrosoft Windows Any
    2017-12-18 avinoam StatusNone Patch Submitted
    2016-06-06 nrjank Attached File- Added pkgupdatefix.diff, #37412

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code