bugGNU Octave - Bugs: bug #50994, package installation into...

 
 

bug #50994: package installation into symlinked directory may fail

Submitter:  Olaf Till <i7tiol>
Submitted:  Wed 10 May 2017 02:54:23 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Olaf Till Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 06 Sep 2017 04:11:41 PM UTC, comment #4: 

Great.  I pushed the cset here (http://hg.savannah.gnu.org/hgweb/octave/rev/26ec2e264826).  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Wed 06 Sep 2017 06:39:50 AM UTC, comment #3: 

Thanks, I've tested the patch, it fixes the problem.

Olaf Till <i7tiol>
Group Member
Wed 06 Sep 2017 12:48:35 AM UTC, comment #2: 

@Olaf: Could you test the attached patch with whatever package failed to install in a symlinked directory?

(file #41741)

Rik <rik5>
Group administrator
Thu 11 May 2017 03:28:39 PM UTC, comment #1: 

It would be preferable to stay within Octave rather than going out to the shell which could introduce portability problems between Linux, Windows, and Macs.

I would look at using Octave functions canonicalize_file_name in combination with strcmp, or maybe stat, to check for identical files.

Rik <rik5>
Group administrator
Wed 10 May 2017 02:54:23 PM UTC, original submission:  

scripts/pkg/private/install.m, subfunction copy_files, line 507:

        && ! strcmp (fullfile (desc.dir, getarch ()), octfiledir))

compares strings to check if directories are identical, which may (did for me) fail for symlinks. Should use the shells '-ef' comparison or the 'realpath' command, don't know which is better.

Olaf Till <i7tiol>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #41741:  bug50994.cset added by rik5 (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 i7tiol (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
    2017-09-06 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2017-09-06 rik5 Attached File- Added bug50994.cset, #41741
        CategoryNone Octave Function
        StatusNone Patch Submitted

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code