[OE-core] [PATCH] dpkg-native: Avoid 'file changed' errors from tar

Otavio Salvador otavio at ossystems.com.br
Mon Mar 30 15:02:03 UTC 2015


On Mon, Mar 30, 2015 at 11:58 AM, Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
> On Mon, 2015-03-30 at 10:52 -0300, Otavio Salvador wrote:
>> On Sat, Mar 28, 2015 at 5:50 AM, Richard Purdie
>> <richard.purdie at linuxfoundation.org> wrote:
>> > See the patch header for details. Hardlink count duing do_package_write_deb
>> > can change causing dpkg-deb failures. We don't care about this error
>> > case so avoid it by checking the tar exit code.
>> >
>> > [YOCTO #7529]
>> >
>> > Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
>>
>> Please don't ask someone to see the patch header for information. This
>> should be in the commit log and not necessarily read the diff to find
>> this information.
>>
>> Please send a v2 adding this information in the commit log.
>
> Just referring someone to the patch header would be incorrect and I
> agree a summary of the problem is needed. The commit message in question
> does have this. I don't see the point of cut and pasting all the details
> from the header into the commit message. The correct place for the
> details in a situation like this is the patch header so that someone has
> full details of the patch without having to look at the repo history.

+When running do_package_write_deb, we have trees of symlinked files
+such as the dbg source files in ${PN}-dbg. If something makes another
+copy of one of those files (or deletes one), the number of links a file
+has changes and tar can notice this, e.g.:
+
+| DEBUG: Executing python function do_package_deb
+| dpkg-deb: building package `sed-ptest' in
`/media/build1/poky/build/tmp/work/i586-poky-linux/sed/4.2.2-r0/deploy-debs/i586/sed-ptest_4.2.2-r0.3_i386.deb'.
+| tar: ./usr/lib/sed/ptest/testsuite/tst-regex2: file changed as we read it
+| dpkg-deb: error: subprocess tar -cf returned error exit status 1
+
+Tar returns an error of 1 when files 'change' and other errors codes
+in other error cases. We tweak dpkg-deb here so that it ignores an exit
+code of 1 from tar. The files don't really change (and we have locking in
+place to avoid that kind of issue).

This is exactly what I would expect for the long commit log. Sorry but
I strongly disagrese with you as the commit log in the patch does
connect with the short log so I still believe the commit log could be
improved.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750



More information about the Openembedded-core mailing list