Hi Alex,

On 04.12.2023 11:54, Alexander Kanavin wrote:
On Mon, 4 Dec 2023 at 11:48, Lukas Funke
<lukas.funke-...@weidmueller.com> wrote:
Unfortunately, the patch indeed causes the tests to fail. The
problamatic lines are in the 'lib\devtool\standard.py':

if len(firstlineitems) > 1 and len(firstlineitems[1]) == 40:
         if not firstlineitems[1] in changed_revs:
                 continue

When the commit-hash becomes all zero, there is no way for devtools to
detect the change. I'm a little puzzled how to handle this situation.
However, I still think the all zero hash is usefull since it will reduce
the noise when developers review their changed in git(lab|hub). Maybe it
would be for the best to remove the check?

It would help if you provide the context for that code snippet, so we
can see why is it there, and what is it trying to do, without having
to go and separately study the code ourselves. Patch review is hard,
please do not make it harder.

You're probably right. A little context is always helpful.

From the top: the proposed change is setting the commit-hash in exported patches to all-zero.

When devtool is updating the recipes using 'devtool update-recipe <somerecipe>' it figures out (in '_get_patchset_revs()') which commits were changed during development (in the workspace). Now devtool known which commits actually contain changes. Subsequently devtool is exporting the patches with all-zero commit hash (in '_export_patches()', which contains our all-zero commit hash change). '_export_patches()' also compares the now exported commit-hash to the expected commit-hash which is an argument to the very same function. Since it they didn't match (see the code snippet), devtool thinks there is no change. Thus, the patch is ignored.

If we want to export patches with all-zero commits we have to either remove this check or have to export the original commit id in the patch. The latter would again introduce noise.

Best regards
Lukas


Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#191735): 
https://lists.openembedded.org/g/openembedded-core/message/191735
Mute This Topic: https://lists.openembedded.org/mt/102748808/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to