bugGNU Octave - Bugs: bug #41691, pkg does not support packages with...

 
 

bug #41691: pkg does not support packages with upper case characters in their name

Submitter:  Orion Poplawski <opoplawski>
Submitted:  Tue 25 Feb 2014 06:06:15 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 18 Apr 2016 07:43:08 PM UTC, comment #6: 

In this case (sic) would it not be best to
do what Matlab does?

Michael Godfrey <godfrey>
Group Member
Mon 18 Apr 2016 05:51:51 PM UTC, comment #5: 

I just got bitten by this issue.  The issue is that a package name is allowed to have mixed case, but Octave changes its case silently behind the scenes.  The end result is that you install a package that has one case but then need to use another for loading.

The two simplest fixes would be to either refuse to install a package without an all lowercase name, or to also lowercase the package name silently during pkg load.

However, I still have mixed feelings about changing its case internally.

Carnë Draug <carandraug>
Group Member
Thu 01 May 2014 11:49:12 PM UTC, comment #4: 

So since there have been no other responses on this bug report nor on the thread on the mailing list (http://octave.1599824.n4.nabble.com/upper-case-latter-in-package-name-was-Re-ncarray-1-0-2-released-tp4662061.html), I'm closing this as won't fix.

The only responses have been from me and from Carlo on the mailing list, and we both seem to be in agreement that packages should only use lower case in their names. Given that that seems to be how pkg works currently, and there doesn't seem to be much interest in changing it, that's how it will continue.

Of course if anyone wants to propose a change to support mixed-case or Unicode package names or any other enhancements, don't let me stop you from doing so, but for now it looks like it will stay ASCII lower-case only (and hyphens are allowed, e.g. linear-algebra).

Mike Miller <mtmiller>
Group Member
Thu 06 Mar 2014 08:42:17 PM UTC, comment #3: 

We build octave packages in Fedora by unpacking the tarball and then running, e.g.:

octave -H -q --no-window-system --no-site-file --eval 'pkg build
-verbose /tmp/rpm/octave-ncarray-1.0.2-1.fc20.x86_64
/export/home/orion/redhat/octave-ncarray-1.0.2/ncArray'

In this code path it lowercases the package name but doesn't lowercase the source directory name.

Orion Poplawski <opoplawski>
Sat 01 Mar 2014 10:15:01 PM UTC, comment #2: 

I'm unable to reproduce any problem with the ncarray package. This seems to only affect some specific aspects of building or installing packages. For example I am able to install the ncarray package:


pkg install ncarray-1.0.2.tar.gz
# or
pkg install -forge ncarray


both work, and I can load and use the functions provided.

Obviously your example in comment #1 shows that if the tar file is camel-case, it fails to install, but I don't have any actual examples of packages like that. If I rename ncarray-1.0.2.tar.gz, then yes it does fail with the error you show.

For reference, this error is exactly the same going back to Octave 3.4, so it's not something new with 3.8, maybe it has always been assumed that packages, or at least the tar files and directories, are strictly lowercase.

Mike Miller <mtmiller>
Group Member
Tue 25 Feb 2014 06:07:02 PM UTC, comment #1: 


>> pkg install dummyPackage-1.0.0.tar.gz

package name 'dummypackage' doesn't correspond to its filename 'dummyPackage-1.0.0.tar'
error: called from 'install' in file /home/abarth/opt/octave-3.8.0/share/octave/3.8.0/m/pkg/private/install.m near line 119, column 11

Orion Poplawski <opoplawski>
Tue 25 Feb 2014 06:06:15 PM UTC, original submission:  

Trying to build ncArray I get:

+ octave -H -q --no-window-system --no-site-file --eval 'pkg build
'''-verbose''' /tmp/rpm/octave-ncarray-1.0.2-1.fc20.x86_64
/export/home/orion/redhat/octave-ncarray-1.0.2/ncArray'
package name 'ncarray' doesn't correspond to its filename 'ncArray'
error: called from 'pkg>install' in file /usr/share/octave/3.6.4/m/pkg/pkg.m
near line 744, column 11
error: called from:
error:   /usr/share/octave/3.6.4/m/pkg/pkg.m at line 772, column 5
error:   /usr/share/octave/3.6.4/m/pkg/pkg.m at line 636, column 3
error:   /usr/share/octave/3.6.4/m/pkg/pkg.m at line 493, column 7
error: Bad exit status from /tmp/rpm/rpm-tmp.bIjCCk (%build)

In pkg.m parsing the DESCRIPTION file:

  desc.name = tolower (desc.name);

And in all dep handling:

  deps = split_by (tolower (depends), ",");

So as written it seems like all octave packages really should be all lower case.  Or we need another tolower() in the install check of directory file name.

Orion Poplawski <opoplawski>

 

(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 godfrey (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by opoplawski (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-05-01 mtmiller StatusNeed Info Wont Fix
        Open/ClosedOpen Closed
    2014-03-01 mtmiller StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code