bugGNU Octave - Bugs: bug #41936, package management in octave has a...

 
 

bug #41936: package management in octave has a syntactic error in install.m

Submitter:  None
Submitted:  Sat 22 Mar 2014 02:52:30 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Installation Failure
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Anguelos Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.8.1
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 18 Apr 2014 01:19:30 PM UTC, comment #3: 

Ok, so this bug should be closed as invalid then, not a bug in Octave.

Out of curiosity, can you say what this patch is intended to do? Should it be submitted to Octave for inclusion upstream?

Mike Miller <mtmiller>
Group Member
Fri 18 Apr 2014 06:20:25 AM UTC, comment #2: 

I have the same problem.  It looks like a Gentoo problem.  Here is the diff between vanilla 3.8.1's install.m and the Gentoo one.  I'll file a bug report with gentoo.

--- scripts/pkg/private/install.m 2014-03-06 11:37:51.000000000 -0800
+++ /usr/share/octave/3.8.1/m/pkg/private/install.m 2014-04-17 18:02:24.205800671 -0700
@@ -63,6 +63,14 @@
       tgz = files{i};
 
       if (exist (tgz, "file"))
+      ## The filename pointed to an uncompressed package to begin with.
+      if (exist (tgz, "dir"))
+        if (tgz(1) == '/')
+          packdir = tgz;
+        else
+          packdir = fullfile (pwd(), tgz);
+        endif
+      elseif (exist (tgz, "file"))
         ## Create a temporary directory.
         tmpdir = tmpnam ();
         tmpdirs{end+1} = tmpdir;
@@ -89,20 +97,12 @@
         if (length (dirlist) > 3)
           error ("bundles of packages are not allowed");
         endif
-      endif
 
-      ## The filename pointed to an uncompressed package to begin with.
-      if (exist (tgz, "dir"))
-        dirlist = {".", "..", tgz};
+        ## The two first entries of dirlist are "." and "..".
+        packdir = fullfile (tmpdir, dirlist{3});
       endif
 
       if (exist (tgz, "file") || exist (tgz, "dir"))
-        ## The two first entries of dirlist are "." and "..".
-        if (exist (tgz, "file"))
-          packdir = fullfile (tmpdir, dirlist{3});
-        else
-          packdir = fullfile (pwd (), dirlist{3});
-        endif
         packdirs{end+1} = packdir;
 
         ## Make sure the package contains necessary files.

Anonymous
Wed 26 Mar 2014 03:51:56 AM UTC, comment #1: 

Thanks for your bug report. I do not get this error with 3.8.1 nor do I see any mismatched endifs or endfors in the mentioned file.

How did you install Octave, from distribution packages or compiled yourself? Can you check your installation or ensure the install.m file has not been incorrectly modified from the original source?

If you can't determine that on your own, can you attach your install.m file to this bug report?

Mike Miller <mtmiller>
Group Member
Sat 22 Mar 2014 02:52:30 PM UTC, original submission:  

The bug is not in an octave forge package but in the package infrastructure as hole.

I have installed octave 3.8.1 on gentoo/prefix running on centos 6.3. x86_64
I am very new to both centos and gentoo.
When I do:
octave prompt >pkg install image-2.2.1.tar.gz
I get :
parse error near line 140 of file /home/*****/gentoo/usr/share/octave/3.8.1/m/pkg/private/install.m

>>>   endfor


error: 'if' command matched by 'endfor' near line 140 column 5


Indeed when I examined the code  the seems to be an unmatched if in line 65. I commented it out and it seems to work but I ma not sure if this fix doesn't push the bug deeper.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by None (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
    2014-04-24 rik5 StatusNeed Info Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2014-03-26 mtmiller CategoryOctave Package Octave Function
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code