On Wed, 2024-04-03 at 15:57 +0200, Michael Opdenacker via lists.openembedded.org wrote: > From: Michael Opdenacker <[email protected]> > > The upcoming introduction of "passthrough" PR servers > will add non integer PR values, such as '0.3'. > > With such a value, the current conversion of this > value to a string, to define the package file name, > can result in incorrect strings such as "0.30000000000000004"! > > Introduce a safe_str() function which, when given a float > value, rounds it up to the 6th decimal first, before the > conversion to string. > > Signed-off-by: Michael Opdenacker <[email protected]> > CC: [email protected] > > --- > > Notes: this has been tested successfully on the "master" branch. > No obvious regression was found and the package file names > look normal.
Shouldn't this be happening at the bitbake level in the prserv code? I doubt we should be passing float types around in the first place? Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#197924): https://lists.openembedded.org/g/openembedded-core/message/197924 Mute This Topic: https://lists.openembedded.org/mt/105308894/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
