Mailinglist Archive: opensuse-buildservice (184 mails)

< Previous Next >
[opensuse-buildservice] bug in file method of build controller
Hi,

I ran into a bug in the file action of the build controller in the OBS
API. Whenever the backend has a file that is exactly of size 8192*n+1
and the last byte is 0x30 = '0' the API cannot deliver the complete
file through the path
build/:project/:repository/:arch/:package/:filename but delivers only
the full 8192 chunks without the final byte. Some debugging
demonstrated the the backend itself does still deliver the file
correctly but the API does cut off the last byte.

I am not a deep Ruby expert but my interpretation of this behavior is
that apparently some part of the code incorrectly interprets a chunk
consisting of a single 0x30 = '0' as an empty chunk and thus concludes
that the file reading has completed. Especially since it does not seem
to happen when the last byte is different from 0x30.

You can reproduce that by just placing a file there of the above style
(for instance with "echo -n 0 > foobar.rpm" for the most simple case
of n=0) and then try to retrieve it through the API.

Robert
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups