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

debian/upstream: How to verify valid yaml



Hi,

as you might have noticed I try to inject debian/upstream files into UDD
and I stumbled upon an issue of invalid yaml which for instance can be
observed in debian/upstream of package seaview[1].  The thing is that the
Reference title contains a ': ' string which is explicitely mentioned as
a pitfall[2] when doing manual YAML editing.  You can easily verify this
when visiting

   http://yaml-online-parser.appspot.com/

and past the following snippet into the validation field:

-----------------------------------------------------------------
Reference:
 author: Gouy, Manolo and Guindon, Stephane and Gascuel, Olivier
 title: SeaView version 4: a multiplatform
-----------------------------------------------------------------

You get the following output

ERROR:

mapping values are not allowed here
  in "<unicode string>", line 3, column 26:
     title: SeaView version 4: a multiplatform
                             ^

which is what I can exactly reproduce when using the Python YAML reader.
So I wonder what you would suggest as way out here?

Charles, what exactly is your way to parse files like this with invalid
YAML syntax?  I do see several means to work around such issues, but
than we should not call these files "YAML" if they fail YAML
verification tests.

Kind regards

       Andreas.

[1] http://anonscm.debian.org/viewvc/debian-med/trunk/packages/seaview/trunk/debian/upstream?view=markup
[2] http://en.wikipedia.org/wiki/YAML#Pitfalls_and_implementation_defects

-- 
http://fam-tille.de


Reply to: