bugGNU Octave - Bugs: bug #55798, Support octave packages with...

 
 

bug #55798: Support octave packages with "-dev" in version

Submitter:  Colin Macdonald <cbm>
Submitted:  Thu 28 Feb 2019 08:45:31 PM UTC
   
 
Category:  Documentation Severity:  2 - Minor
Priority:  3 - Low Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 5.1.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 06 Mar 2019 01:24:36 AM UTC, comment #9: 

I reworded the text and markup slightly. I added this bug number and reworded the commit message to conform to https://wiki.octave.org/Commit_message_guidelines and pushed this on the stable branch

https://hg.savannah.gnu.org/hgweb/octave/rev/55e087e232fe

Thank you!

Mike Miller <mtmiller>
Group Member
Tue 05 Mar 2019 07:50:30 PM UTC, comment #8: 

Thanks, looks good. I think we should keep the first "Version of the package." sentence and add your text after. I'll work that in and push on the stable branch.

Mike Miller <mtmiller>
Group Member
Mon 04 Mar 2019 08:18:19 PM UTC, comment #7: 

Ok, I think I got it, see new attachment.

(file #46417)

Colin Macdonald <cbm>
Mon 04 Mar 2019 08:01:29 PM UTC, comment #6: 

oops, that doesn't build.  What is the right way to xref m-files from within package.texi?

Colin Macdonald <cbm>
Mon 04 Mar 2019 07:48:04 PM UTC, comment #5: 

I attached a patch, feel free to revise or ask me for revisions.

(file #46416)

Colin Macdonald <cbm>
Mon 04 Mar 2019 07:23:36 PM UTC, comment #4: 

I will do a patch.

I read "get_description" comments: it specifically mentions "2.1.0+"; maybe that is (or "should be") the recommended "dev" label for Octave-Forge packages: in particular, compare_versions isn't compatible with https://www.python.org/dev/peps/pep-0440 for things like "0.7.0-dev".  I could propose this in a different issue for Octave Forge.

Colin Macdonald <cbm>
Sun 03 Mar 2019 09:27:20 PM UTC, comment #3: 

@cbm Do you want to propose some new text for the user manual? If you don't have time to write and test a patch I can take care of that. The current wording is


@item Version
Version of the package.  A package version must be 3 numbers separated
by dots.


which is confirmed to be wrong.

Mike Miller <mtmiller>
Group Member
Thu 28 Feb 2019 10:23:30 PM UTC, comment #2: 

Just re-confirmed that the Octave pkg "Version" field may contain any characters in a specified character set. They do not have to be dotted digits at all.

The character set was chosen to be identical to the Debian Version character set, which is alphanumberic characters (in the "C" locale), ".", "+", "-", and "~".

This is fully documented in scripts/pkg/private/get_description.m, and should be documented in doc/interpreter/package.txi the same way, that will resolve this bug.

I think it would be fair to say something like "A package version typically contains digits separated by dots, but may contain any characters in the set …" This is completely separate from whatever the Octave Forge package policy may be.

Mike Miller <mtmiller>
Group Member
Thu 28 Feb 2019 09:38:31 PM UTC, comment #1: 

Personally I would prefer pkg to allow any version number that works with compare_versions, and add no additional constraints of its own. The version can be "1" if so desired. Is that the case now or does it require at least some number of dotted numbers?

Either way, we should update the documentation on the stable branch to describe what the actual constraints are in Octave 5, that will fix this bug.

Mike Miller <mtmiller>
Group Member
Thu 28 Feb 2019 08:45:31 PM UTC, original submission:  

TL;DR:

How would you feel about changing [1] to say:


 Version

-     Version of the package. A package version must be 3 numbers separated by dots.
+     Version of the package. A package version is usually 3 numbers separated by dots.


[1] https://octave.org/doc/v5.1.0/The-DESCRIPTION-File.html:

- - - - - -

It's always bothered me that DESCRIPTION doesn't seem to allow versions like "0.7.0-dev".


I just tried using "0.7.0-dev".  Nothing horrible happened:



Package Name        | Version   | Installation directory
--------------------+-----------+-----------------------
             bsltl  |     1.1.1 | /home/cbm/octave/bsltl-1.1.1
           control  |     3.1.0 | /home/cbm/octave/control-3.1.0
           doctest *| 0.7.0-dev | /home/cbm/octave/doctest-0.7.0-dev
           general  |     2.1.0 | /home/cbm/octave/general-2.1.0



A quick look at the code of pkg.m suggests it uses "compare_versions", which does something with such strings:



octave:18> compare_versions ('0.7.0-dev', '0.7.0', '>')
ans = 1
octave:19> compare_versions ('0.7.0', '0.7.0-dev', '<=')
ans = 1
octave:20> compare_versions ('0.7.1', '0.7.0-dev', '>')
ans = 1


I personally prefer the semantics that 0.7.0-dev comes before 0.7.0 but I could certainly live with the above.

Benefits:

  - users would be able to try a dev version and later upgrade automatically when the package release came.
  - devs would be able to trust "pkg list" output in bug reports.

Colin Macdonald <cbm>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #46417:  doc__pkg_versions_can_be_more_general_than__x_y_z_-2.patch added by cbm (1KiB - text/x-patch - update, corrected xref)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cbm (Submitted the item)
  • -email is unavailable- added by cbm
  •  

    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 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-06 mtmiller StatusPatch Reviewed Fixed
        Open/ClosedOpen Closed
    2019-03-05 mtmiller StatusConfirmed Patch Reviewed
    2019-03-04 cbm Attached File- Added doc__pkg_versions_can_be_more_general_than__x_y_z_-2.patch, #46417
    2019-03-04 cbm Attached File- Added doc__pkg_versions_can_be_more_general_than__x_y_z_.patch, #46416
    2019-02-28 mtmiller StatusNeed Info Confirmed
    2019-02-28 mtmiller Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        StatusNone Need Info
        Releasedev 5.1.0
    2019-02-28 mtmiller Carbon-CopyRemoved mtmiller -
    2019-02-28 cbm Carbon-Copy- Added mtmiller
        Carbon-Copy- Added oheim

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code