Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#56624 closed defect (fixed)

Octave reports version as a non-number, e.g. "4.x.x"

Reported by: amake (Aaron Madlon-Kay) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: Schamschula (Marius Schamschula)
Port: octave

Description

I have Octave 4.4.0_2 installed, and it reports its version number within the program (the OCTAVE_VERSION const) as "4.x.x".

There are at least some packages that expect to be able to parse OCTAVE_VERSION as a number, such as JSONlab: https://github.com/fangq/jsonlab/blob/86ef12a57bbe54a8532c0e0015f52c7850519833/savejson.m#L538

Is the current behavior really necessary or desired? (If there is some reason the value must be this way, I will submit a patch to JSONlab.)

Change History (5)

comment:1 Changed 6 years ago by Schamschula (Marius Schamschula)

Cc: Schamschula added; MarcusCalhoun-Lopez removed
Owner: set to MarcusCalhoun-Lopez
Status: newassigned

comment:2 in reply to:  description Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to amake:

Is the current behavior really necessary or desired?

It appears to have been deliberately introduced in [aec14792b8457e3c77b5c90a3c402a88ba9eb41b/macports-ports], though it was grouped together with all the other changes needed to update octave to 4.4.0 and its purpose wasn't separately explained.

It looks like previously octave would install its files into directories whose names contained the full octave version number, such as "4.2.2". This could have been problematic for other ports that depended on octave—they might have needed to be rebuilt every time the octave port was updated, even for a minor version. Changing the version to "4.x.x" may have been an attempt by Marcus to avoid that necessity.

comment:3 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Ryan's analysis is correct.
It is quite annoying to have to rebuild every dependency for every minor Octave update.
Thank you for detecting this problem.
I will push a fix shortly.

comment:4 Changed 6 years ago by Marcus Calhoun-Lopez <marcuscalhounlopez@…>

Resolution: fixed
Status: assignedclosed

In 65764f696939ba4614131a2b385cfa7fa38e7d32/macports-ports (master):

octave: have OCTAVE_VERSION return correct value

Fixes #56624

comment:5 Changed 6 years ago by Marcus Calhoun-Lopez <marcuscalhounlopez@…>

In 97d2fd0566579f5f41400ccb164a8920929d4639/macports-ports (master):

ocatve: stop modifying OCTAVE_VERSION variable

Modifying OCTAVE_VERSION caused problems
See #56624
See #56659

Fixes #56659

Instead, attempt to prevent unnecessary revbumps by changing the
identification names of libraries

Note: See TracTickets for help on using tickets.