more compact data format (was Re: A Small correction for Maniac Mansion)
Alexandre Detiste
alexandre.detiste at gmail.com
Mon Jun 15 09:28:40 UTC 2015
Le dimanche 14 juin 2015, 22:57:39 Patrick Bottelberger a écrit :
> Hi all,
>
> please find attached 3 patch files:
> - One for a correction of a small mistake i made when adding the german
> version for Maniac Mansion, for the cksums i used dashes instead of
> underscores
The leftmost value is simply dropped, so it's contents doesn't matter at all,
a dash is as good as an underscore to specifiy a placeholder.
So the patch is not needed.
if 'cksums' in self.data:
for line in self.data['cksums'].splitlines():
stripped = line.strip()
if stripped == '' or stripped.startswith('#'):
continue
_, size, filename = line.split(None, 2)
f = self._ensure_file(filename)
f.size = int(size)
The support for cksum(1) was needed to boostrap this tool;
but now that a recent-enough version of "GDP make-template"
is in the archive, it could be deprecated.
I'm considering adding a more-compact "size + md5" format,
like this; this would speed-up yaml editing.
if 'size_md5' in self.data:
for line in self.data['sizemd5'].splitlines():
stripped = line.strip()
if stripped == '' or stripped.startswith('#'):
continue
size, md5, filename = line.split(None, 2)
f = self._ensure_file(filename)
f.size = int(size)
f.md5 = md5
More information about the Pkg-games-devel
mailing list