bugGNU Octave - Bugs: bug #49880, Failure to install package from...

 
 

bug #49880: Failure to install package from uncompressed file

Submitter:  Thomas <harmonic_gnu>
Submitted:  Sun 18 Dec 2016 09:08:56 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Installation Failure
Status:  Duplicate Assigned to:  None
Originator Name:  harmonic_gnu Open/Closed:  * Closed
Release:  * 4.2.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 19 Dec 2016 06:25:04 PM UTC, comment #1: 

This is a duplicate of bug #32839 that has been open for several years. The discussion on that bug issue seems to point to this turning into a dropped feature, rather than being fixed. But please add any comments to that discussion instead of here. I'm closing this report with duplicate status.

Mike Miller <mtmiller>
Group Member
Sun 18 Dec 2016 09:08:56 PM UTC, original submission:  

Symptom:
Octave is supposed to support installing a package from a file that is already uncompressed into a directory. However when trying to install the package from a directory it gives the following error:

unpack: FILETYPE must be "gunzip" for a directory
error: called from
    install at line 146 column 5
    pkg at line 394 column 9

  A directory is not supposed to be gunzipped, so this suggests something is wrong.

The Cause:

In lines 65 & 99 of install.m  a verification of whether its a directory or a compressed file is done by using the "exist()" function:
  

  if (exist (tgz, "file"))
if (exist (tgz, "file") || exist (tgz, "dir"))


The use of the exist function here is not correct because (exist (tgz, "file") will give 0 only if tgz is not a file AND not a directory, the function does not give a binary output. If it is either of them the output is 2 or 7, which evaluate to true in the if statement.

Suggested correction:

For line 65 it should say instead

if (exist (tgz, "file")==2)

, meaning that if tgz exists and is a file then execute that piece to decompress it.
For line 99 we could  have:


if (exist (tgz, "file")==2 || exist (tgz, "dir")==7)


   which would execute that piece of the code only if a valid file or directory were found.

 



Thomas <harmonic_gnu>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #39275:  varadhya_diff_fixes_#49880 added by varadhya (765B - application/octet-stream - Hi Thomas, I feel the same too. I have submitted a diff file here after making those particular changes. Can you have a look at it?)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by varadhya (Updated the item)
  • -email is unavailable- added by harmonic_gnu (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-12-19 mtmiller StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #32839
    2016-12-18 varadhya Attached File- Added varadhya_diff_fixes_#49880, #39275

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code