bugGNU Octave - Bugs: bug #56368, pkg: fully support field names in...


bug #56368: pkg: fully support field names in DESCRIPTION with hyphens

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Wed 22 May 2019 12:45:07 AM UTC  
Category:  Octave Function Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 27 Mar 2020 08:17:00 PM UTC, comment #2: 

Yes, this bug is now fixed with bug #50831 for Octave version 6, closing as fixed.

Mike Miller <mtmiller>
Project Administrator
Wed 22 May 2019 05:51:32 PM UTC, comment #1: 

I just re-discovered bug #50831, and I think fixing that bug may automatically fix this one, but not tested yet.

Mike Miller <mtmiller>
Project Administrator
Wed 22 May 2019 12:45:07 AM UTC, original submission:  

It would be nice if the 'pkg' command and its subcommands allow package metadata field names to include hyphens. As of today on the default branch, they are partially supported, but if a field with a hyphen is present, it will silently break loading the cache of installed packages.

Example DESCRIPTION file:

Name: foo
Version: 1.0.0
Date: 2019-05-21
Author: A U Thor
Maintainer: A U Thor
Title: Foo
Description: An example package
Custom-Field: This field should be allowed

The last line is a custom metadata field that currently breaks all installed packages. The 'pkg install' subcommand works correctly, the package does get installed properly and all of its metadata fields do get written to the package cache (local list) file.

However, because the subcommands 'pkg describe', 'pkg list', 'pkg load', and others use the 'load' command, all field names are required to be valid Octave identifiers. The load error is silently suppressed, and it simply looks like no packages are installed.

To resolve this, we should probably have better validation of the field names in the DESCRIPTION file, and possibly transform unsupported characters into underscores if it keeps things easy. We could also error on definitely invalid field names, but I would like to specifically support hyphen separated names.

It would be even nicer to support field names as written without transforming them, but that would probably require a custom load command to parse the package cache file.

Mike Miller <mtmiller>
Project Administrator


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

Attach Files:

No files currently attached


   bug dependencies.

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only project members can vote.




Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2020-03-27 mtmiller StatusNone => Fixed
    Open/ClosedOpen => Closed
2019-05-22 mtmiller Dependencies- => Depends on bugs #50831
2019-05-22 mtmiller Carbon-CopyRemoved 80942 => -

Back to the top

Powered by Savane 3.5