Package: python-syck
Version: 0.61.2-1
Severity: serious

Hi

syck.dump(data, stream) is broken. If you have data in a form like

--8<------------------------schnipp------------------------->8---
---
perl5.10:
  new: 5.10.0-10
  packages:
  - sendmail
  - abiword
  - audio-cd
  - courier
  - crypt-ssleay
  - eperl
  - epic4
  - flow-tools
  - frozen-bubble
  - g2
  - gdal
  - genders
  - ggz-grubby
  - gnumeric
  - golly
  - gpib
  - graphicsmagick
  - graphviz
  - hocr
  - imagemagick
  - irssi
  - libalias-perl
  - libapache2-authenntlm-perl
  - libapache-authenhook-perl
  - libapreq2
  - libapt-pkg-perl
  - libarray-refelem-perl
  - libastro-fits-cfitsio-perl
  - libaudio-flac-decoder-perl
  - libaudio-flac-header-perl
  - libaudio-mixer-perl
  - libauthen-dechpwd-perl
  - libauthen-krb5-perl
  - libauthen-krb5-simple-perl
  - libauthen-pam-perl
  - libauthen-sasl-cyrus-perl
  - libauthen-smb-perl
  - libauthen-tacacsplus-perl
  - libberkeleydb-perl
  - libbit-vector-perl
  - libbsd-resource-perl
  - libbuffy-bindings
  - libcache-fastmmap-perl
  - libcache-mmap-perl
  - libcairo-perl
  - libcdk-perl
  - libclass-c3-xs-perl
  - libclass-date-perl
  - libclass-methodmaker-perl
  - libclone-perl
  - libcompress-lzo-perl
  - libconvert-uulib-perl
  - libcrypt-blowfish-perl
  - libcrypt-des-perl
  - libcrypt-eksblowfish-perl
  - libcrypt-mysql-perl
  - libcrypt-openssl-bignum-perl
  - libcrypt-openssl-dsa-perl
  - libcrypt-openssl-random-perl
  - libcrypt-openssl-rsa-perl
  - libcrypt-openssl-x509-perl
  - libcrypt-unixcrypt-xs-perl
  - libcurses-perl
  - libdata-dump-streamer-perl
  - libdata-structure-util-perl
  - libdate-calc-perl
  - libdate-simple-perl
  - libdatetime-perl
  - libdbd-mysql-perl
  - libdbd-odbc-perl
  - libdbd-sqlite2-perl
  - libdbd-sqlite3-perl
  - libdbd-sybase-perl
  - libdbi-perl
  - libdevel-caller-perl
  - libdevel-lexalias-perl
  - libdevel-size-perl
  - libdevice-cdio-perl
  - libdevice-serialport-perl
  - libdigest-crc-perl
  - libdigest-md2-perl-dfsg
  - libdigest-md4-perl
  - libdigest-sha1-perl
  - libencode-perl
  - libevent-perl
  - libfcgi-perl
  - libfile-mmagic-xs-perl
  - libfile-rsyncp-perl
  - libfile-spec-perl
  - libfile-sync-perl
  - libfilesys-df-perl
  - libfilesys-statvfs-perl
  - libfilter-perl
  - libfuse-perl
  - libgd-gd2-noxpm-perl
  - libgd-gd2-perl
  - libgeo-ip-perl
  - libglib-perl
  - libgnome2-canvas-perl
  - libgnome2-gconf-perl
  - libgnome2-perl
  - libgnome2-print-perl
  - libgnome2-vfs-perl
  - libgnome2-wnck-perl
  - libgssapi-perl
  - libgtk2-gladexml-perl
  - libgtk2-imageview-perl
  - libgtk2-perl
  - libgtk2-spell-perl
  - libgtk2-trayicon-perl
  - libgtk2-traymanager-perl
  - libhdate
  - libhtml-parser-perl
  - libhtml-template-pro-perl
  - libhttp-ghttp-perl
  - libimage-exif-perl
  - libimage-imlib2-perl
  - libimage-librsvg-perl
  - libintl-perl
  - libio-aio-perl
  - libio-dirent-perl
  - libio-interface-perl
  - libio-pty-perl
  - libio-socket-multicast-perl
  - libipc-sharelite-perl
  - libjson-xs-perl
  - liblinux-inotify2-perl
  - liblist-moreutils-perl
  - libmail-cclient-perl
  - libmath-gmp-perl
  - libmime-explode-perl
  - libmsgcat-perl
  - libnetaddr-ip-perl
  - libnet-arp-perl
  - libnet-bluetooth-perl
  - libnet-cups-perl
  - libnet-dbus-perl
  - libnet-dns-perl
  - libnet-jabber-loudmouth-perl
  - libnet-libidn-perl
  - libnet-nis-perl
  - libnet-pcap-perl
  - libnet-rawip-perl
  - libnet-ssleay-perl
  - libnet-tclink-perl
  - libogg-vorbis-decoder-perl
  - libogg-vorbis-header-perl
  - libopengl-perl
  - libpadwalker-perl
  - libpar-packer-perl
  - libperlio-eol-perl
  - libplot-perl
  - libppi-xs-perl
  - libpreludedb
  - libproc-processtable-perl
  - libqt-perl
  - libreadonly-xs-perl
  - libregexp-copy-perl
  - libsearch-xapian-perl
  - libset-object-perl
  - libsocket6-perl
  - libstring-approx-perl
  - libstring-crc32-perl
  - libsub-name-perl
  - libsys-cpuload-perl
  - libsys-cpu-perl
  - libsys-syslog-perl
  - libsys-utmp-perl
  - libtemplate-perl
  - libterm-readline-gnu-perl
  - libterm-size-perl
  - libterm-slang-perl
  - libtext-aspell-perl
  - libtext-bibtex-perl
  - libtext-charwidth-perl
  - libtext-chasen-perl
  - libtext-iconv-perl
  - libtext-kakasi-perl
  - libtext-unaccent-perl
  - libthreads-perl
  - libthreads-shared-perl
  - libtime-piece-perl
  - libtk-tablematrix-perl
  - libunicode-japanese-perl
  - libunicode-map8-perl-dfsg
  - libunicode-map-perl
  - libunicode-string-perl
  - libunix-syslog-perl
  - libuuid-perl
  - libvideo-ivtv-perl
  - libvorbis-perl
  - libwant-perl
  - libwww-curl-perl
  - libwx-perl
  - libxml-libxml-common-perl
  - libxml-libxml-perl
  - libxml-libxslt-perl
  - libxml-parser-perl
  - libxml-sablot-perl
  - libxml-xerces-perl
  - libyaml-syck-perl
  - lockdev
  - megahal
  - nagios2
  - nagios3
  - net-snmp
  - nkf
  - opendchub
  - openser
  - ossp-uuid
  - pcsc-perl
  - pdl
  - perl
  - perl-tk
  - pidgin
  - pilot-link
  - pork
  - prima
  - psp
  - razor
  - redland-bindings
  - remctl
  - rxvt-unicode
  - safe-hole-perl
  - sdlperl
  - sident
  - sigc
  - sigcperl
  - speedy-cgi-perl
  - spread
  - sufary
  - text-bidi
  - wackamole
  - webauth
  - weechat
  - wzdftpd
  - xchat
  - xchat-gnome
  - znc
  reason: Update from Perl 5.8 to Perl 5.10, changing the binary extension ABI
  rm: Marc Brockschmidt
  source: perl
--8<------------------------schnapp------------------------->8---

you can load it fine with syck.load. Now, try syck.dump on it, and you
will get

--8<------------------------schnipp------------------------->8---
perl5.10:
  new: 5.10.0-10
  packages:
  - sendmail
  - abiword
  - audio-cd
  - courier
  - crypt-ssleay
  - eperl
  - epic4
  - flow-tools
  - frozen-bubble
[...]
  - --- libtext-kakasi-perl
[...]
  - znc
  reason: Update from Perl 5.8 to Perl 5.10, changing the binary extension ABI
  rm: Marc Brockschmidt
  source: perl
--8<------------------------schnapp------------------------->8---

which is definitely wrong. Bug confirmed to be in python-syck somewhere,
by using python-yaml in exactly the same way - and it doesnt happen
there.

Its enough to do

foo = file("data.yaml", 'r')
t = syck.load(foo)
bar = file("data2.yaml", 'w')
syck.dump(t, bar)

to see the error here (using python2.4 and a simple import syck).

Severity serious as I think breaking yaml dumps in that way is enough to
warrant a fix before the release happens. :)

-- 
bye, Joerg
Some NM:
> FTBFS=Fails to Build from Start
Err, yes? How do you start in the middle?

Attachment: pgpNtmSb7EHUe.pgp
Description: PGP signature

Reply via email to