[elbe-devel] elbe 1.9.13 fails on extracting licenses (jessie)

ew.foe at nassur.net ew.foe at nassur.net
Mon Nov 7 13:56:18 CET 2016


Hello,

thank you for your response!

Quoting Manuel Traut <manuel.traut at linutronix.de>:

> Hi,
>
>> with elbe 1.9.13 on a jessie system I'm trying to build a jessie
>> image (xml below).
>>
>> This fails during the "Extract Licenses" step.
>> >Build failed
>> >Traceback (most recent call last):
>> > File "/usr/lib/python2.7/dist-packages/elbepack/asyncworker.py",
>> >line 116, in execute
>> >   skip_pbuild=self.skip_pbuilder)
>> > File "/usr/lib/python2.7/dist-packages/elbepack/elbeproject.py",
>> >line 287, in build
>> >   reportpath, self.targetfs )
>> > File "/usr/lib/python2.7/dist-packages/elbepack/dump.py", line
>> >198, in elbe_report
>> >   with xml.archive_tmpfile() as fp:
>> > File "/usr/lib/python2.7/dist-packages/elbepack/elbexml.py", line
>> >272, in archive_tmpfile
>> >   fp.write( standard_b64decode( self.text("archive") ) )
>> > File "/usr/lib/python2.7/base64.py", line 93, in standard_b64decode
>> >   return b64decode(s)
>> > File "/usr/lib/python2.7/base64.py", line 73, in b64decode
>> >   return binascii.a2b_base64(s)
>> >TypeError: must be string or buffer, not None
>> >
>> >
>> >Exception:
>> >must be string or buffer, not None
>
>> >   fp.write( standard_b64decode( self.text("archive") ) )
>
> is the actual problem; because your archive tag is empty.

Good point. After removing the empty <archive> tag, and after removing
any comments[1] in the .xml file, the error message changes. And that was
most likely the reason I blamed it to the license stuff:

> Build failed
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/dist-packages/elbepack/asyncworker.py",  
> line 116, in execute
>     skip_pbuild=self.skip_pbuilder)
>   File "/usr/lib/python2.7/dist-packages/elbepack/elbeproject.py",  
> line 291, in build
>     self.buildenv.rfs.write_licenses(f, self.log, os.path.join(  
> self.builddir, "licence.xml"))
>   File "/usr/lib/python2.7/dist-packages/elbepack/efilesystem.py",  
> line 131, in write_licenses
>     licence_xml = copyright_xml()
>   File "/usr/lib/python2.7/dist-packages/elbepack/licencexml.py",  
> line 57, in __init__
>     self.outxml = etree (None)
>   File "/usr/lib/python2.7/dist-packages/elbepack/treeutils.py",  
> line 111, in __init__
>     et = parse (fname, parser=parser)
>   File "lxml.etree.pyx", line 3299, in lxml.etree.parse  
> (src/lxml/lxml.etree.c:72655)
>   File "parser.pxi", line 1814, in lxml.etree._parseDocument  
> (src/lxml/lxml.etree.c:106512)
> TypeError: cannot parse from 'NoneType'
>
>
> Exception:
> cannot parse from 'NoneType'

The effects are that
1. elbe-build-*/licence.txt has size zero,
2. sda.img.gz is not produced or not downloaded ... let me check.
    It seems sda.img.gz is not even produced.

So I disable the extraction of the licenses, just to make sure ...  
building ...
1. licence.txt is not produced/downloaded any more, OK.
2. sda.img.gz is produced and downloaded, OK!


Thank you for your patience.
Cheers,
Erich


[1] is there a reason that lxml is called with  
"remove_comments=False"? (elbepack/treeutils.py class etree(ebase))






More information about the elbe-devel mailing list