Bug 10801 - devtool: upgrade: report diff for changed files referred to by LIC_FILES_CHKSUM
Summary: devtool: upgrade: report diff for changed files referred to by LIC_FILES_CHKSUM
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.3
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 2.5 M1
Assignee: Alexander Kanavin
QA Contact: yeoh ee peng
URL:
Whiteboard:
Depends on:
Blocks: 12360
  Show dependency tree
 
Reported: 2016-12-13 13:19 UTC by Alexander Kanavin
Modified: 2017-12-19 07:43 UTC (History)
12 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kanavin 2016-12-13 13:19:20 UTC
Currently, it's rather awkward to figure out what has caused the changes in license checksums - the tools could help with that by comparing the licenses using diff, and printing the output.
Comment 1 Maxin B. John 2016-12-13 13:41:40 UTC
While agreeing that this is a good idea, some projects (eg: libunistring) updates licenses in totally different files once it changes the effective license of the Project. 

In the case of libunistring update, it left the two license files that we track in recipe unchanged (COPYING, COPYING.LIB) and updated the effective license in two different files (README, doc/libunistring.texi). We can track these kind of changes only by reading the release notes.

http://lists.openembedded.org/pipermail/openembedded-core/2016-December/130051.html
Comment 2 Alexander Kanavin 2016-12-13 13:52:49 UTC
COPYING* files themselves do not always set the effective license, but merely provide the license terms for reference (particularly the GPL type stuff). In that case we also need to track a README or some source code file where the license is actually established. libunistring was missing those other files - and that's a different issue.
Comment 3 Paul Eggleton 2016-12-13 19:58:13 UTC
I'm not sure the build system has the information needed to show this diff. We have the new file, but where will it get the old file? The metadata has been changed so that we're fetching the new source rather than the old one.

Honestly I think this kind of thing is better handled within tools that help you to update recipes, such as the AUH and devtool upgrade. I believe the AUH already provides a diff, and it's on my todo list for devtool upgrade (perhaps we should have a bug for the latter, maybe this one can be repurposed).
Comment 4 Alexander Kanavin 2016-12-14 12:38:40 UTC
That's fine with me. Paul, do you want to take the bug then? Apparently AUH will start using devtool in the future, so that all upgrade functionality is in one place without duplication.
Comment 5 Paul Eggleton 2016-12-14 19:49:09 UTC
OK, repurposing this bug. Accordingly the spec should be:

When devtool upgrade runs on a recipe, if any files referred to by LIC_FILES_CHKSUM have changed then report the difference. I suspect what we'll need to do is write out a separate diff file, show a message, and also include a comment in the recipe reminding the user that they need to check the diff.

One catch with this is that it is possible (though not too common) for those files not to be ready to look at until the end of do_configure - that's when the check runs. We perhaps may ignore that corner case for now but we should be aware of it. I'm actually not sure how widespread it is - I assume it's indended to take care of recipes where you make a license choice at configure time.
Comment 6 Alexander Kanavin 2017-10-10 14:31:01 UTC
What is the current status with this issue? Paul, shall I reassign it to you?
Comment 7 Stanley Phoong 2017-10-10 14:49:24 UTC
Hi Alexander, sorry was cooped up with some critical work over the last few weeks. Hoping to close this bug by next week. Thanks for the reminder :)
Comment 8 nagarajagopal 2017-10-30 04:33:57 UTC
 md5 LICENSE checksum is not updating in new recipe after devtool upgrade.
Comment 9 nagarajagopal 2017-10-31 01:48:07 UTC
 debugged and try to find the issue in /scripts/lib/devtool/upgrade.py and /scripts/lib/recipetool/create.py.but, unable to fix the issue.
Comment 10 Paul Eggleton 2017-10-31 10:55:06 UTC
Just for clarification - this isn't a bug, it's a missing feature. devtool upgrade needs to be changed to find the license files, compare them, update LIC_FILES_CHKSUM (which it doesn't do at the moment) and report the diff to the user as described above.
Comment 11 Shashwat Pandey 2017-12-08 02:52:17 UTC
A patch has been already pushed to mailing list.
http://lists.openembedded.org/pipermail/openembedded-core/2017-November/145000.html