[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#834059: dose-builddebcheck: outputs wrong yaml



Hello,

On Fri, Aug 26, 2016 at 01:56:31PM +0200, Johannes Schauer wrote:
> Hi,
> 
> On Sat, 13 Aug 2016 11:18:14 +0200 Helmut Grohne <helmut@subdivi.de> wrote:
> > On Thu, Aug 11, 2016 at 07:15:12PM +0200, Helmut Grohne wrote:
> > > When checking whether the source package "0xffff" is bd-satisfiable,
> > > dose-builddebcheck says "package: 0xffff". Contemporary yaml readers
> > > (such as pyyaml) read that as 65535. The correct way would have been
> > > "package: '0xffff'". Essential quoting is missing.
> > 
> > Also version "0.6e-7" is occasionally turned into "6.0e-08" and version
> > "1.7" is occasionally turned into "1.70" after passing it through
> > dose-builddebcheck and reading it back via pyyaml.
> 
> I just stumbled over this problem myself.
> 
> The same applies to the field "output-version". The value of this is currently
> '1.2' but when reading this as a yaml document it becomes the floating point
> number 1.2. The value should be quoted such that it remains a string.

I just found an old email by Andreas Beckmann (who is using dose
to find test candidates for piuparts) who came across this problem already
in 2014. He just told be that he had solved the problem for piuparts
by using the BaseLoader. Indeed, the Pyyaml documentation [1] says:

  BaseLoader(stream) does not resolve or support any tags and construct
  only basic Python objects: lists, dictionaries and Unicode strings. 

and there is also a CBaseLoader(stream) when using the C bindings. This does
seem to solve the pronlem, doesn't it ?

-Ralf

[1] http://pyyaml.org/wiki/PyYAMLDocumentation


Reply to: