Bug 9301

Summary: Extensible SDK: failed to run sdk-update: checksum mismatch for uninative
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Yi Zhao <yi.zhao>
Component: devtools / tool chainAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED FIXED QA Contact: Yi Zhao <yi.zhao>
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, juro.bystricky, ke.zou, meta.mr.watcher, meta.watcher, yi.zhao, zhangle.yang
Version: 2.1   
Target Milestone: 2.2 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: New (Never tested)
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
sdk-update.log none

Description Yi Zhao 2016-03-18 07:00:20 UTC
Created attachment 3039 [details]
sdk-update.log

Git rev: master/8debfea81e69d038bd2d56314b272cb74f5582ed

I got an error when running sdk-update from a local path on 2.1_M3.RC1

#######################
NOTE: Installing sstate objects into /buildarea/poky_sdk_old_armv5e
NOTE: Updating configuration files
NOTE: Updating layers
NOTE: Preparing build system... (This may take some time.)
ERROR: Preparation failed:
WARNING: Host distribution "Fedora-23" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes...done.
Parsing of 872 .bb files complete (0 cached, 872 parsed). 1302 targets, 62 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: Fetching uninative binary shim from http://downloads.yoctoproject.org/releases/uninative/0.95/x86_64-nativesdk-libc.tar.bz2;md5sum=d939236390765e7a3915a86c09d3c7b3
WARNING: Checksum failure encountered with download of http://downloads.yoctoproject.org/releases/uninative/0.95/x86_64-nativesdk-libc.tar.bz2;md5sum=d939236390765e7a3915a86c09d3c7b3 - will attempt other sources if available
WARNING: Renaming /buildarea/poky_sdk_old_armv5e/downloads/uninative/d939236390765e7a3915a86c09d3c7b3/x86_64-nativesdk-libc.tar.bz2 to /buildarea/poky_sdk_old_armv5e/downloads/uninative/d939236390765e7a3915a86c09d3c7b3/x86_64-nativesdk-libc.tar.bz2_bad-checksum_4b6fb2106c2f18b8f9c8ac67e1cf9e57
ERROR: Checksum failure fetching http://downloads.yoctoproject.org/releases/uninative/0.95/x86_64-nativesdk-libc.tar.bz2;md5sum=d939236390765e7a3915a86c09d3c7b3
WARNING: Disabling uninative as unable to fetch uninative tarball: Fetcher failure for URL: 'http://downloads.yoctoproject.org/releases/uninative/0.95/x86_64-nativesdk-libc.tar.bz2;md5sum=d939236390765e7a3915a86c09d3c7b3'. Checksum mismatch!
File: '/buildarea/poky_sdk_old_armv5e/downloads/uninative/d939236390765e7a3915a86c09d3c7b3/x86_64-nativesdk-libc.tar.bz2' has md5 checksum 4b6fb2106c2f18b8f9c8ac67e1cf9e57 when d939236390765e7a3915a86c09d3c7b3 was expected
If this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you can use these lines within the recipe:
SRC_URI[md5sum] = "4b6fb2106c2f18b8f9c8ac67e1cf9e57"
SRC_URI[sha256sum] = "26d46c61ad88cc245e31c88549717c0092a838d111b93ec169d88b08cc027581"
Otherwise you should retry the download and/or check with upstream to determine if the file has become corrupted or otherwise unexpectedly modified.

WARNING: To build your own uninative loader, please bitbake uninative-tarball and set UNINATIVE_TARBALL appropriately.

#######################


Steps:
1. Build an ext_sdk toolchain against the old git rev
2. Build another ext_sdk toolchain against the new git rev
3. Install the old ext_sdk into poky_sdk_old directory, install the new ext_sdk into poky_sdk_new directory
4. cd poky_sdk_old, setup the environment
5. Run devtool sdk-update poky_sdk_new


Please see the attached log for details
Comment 1 Yi Zhao 2016-04-01 06:09:17 UTC
This issue still happens on 2.1 M3 RC2
git rev: master/21823cb466e79540567ad1a43ae6f93d850e4057
Comment 2 Paul Eggleton 2016-04-04 02:29:03 UTC
To test this properly the new SDK should be being published with oe-publish-sdk rather than simply installing it. (I don't think that's the cause of this issue, but it is worth noting).
Comment 3 Yi Zhao 2016-04-06 00:55:25 UTC
(In reply to comment #2)
> To test this properly the new SDK should be being published with
> oe-publish-sdk rather than simply installing it. (I don't think that's the
> cause of this issue, but it is worth noting).

OK. Thanks. I will design a new case for it.
Comment 4 Yi Zhao 2016-04-08 02:29:01 UTC
(In reply to comment #2)
> To test this properly the new SDK should be being published with
> oe-publish-sdk rather than simply installing it. (I don't think that's the
> cause of this issue, but it is worth noting).

I re-tested with this method, but still got the same error.
Comment 6 Yi Zhao 2016-04-26 04:32:51 UTC
I have tested it with 2.1 rc2 (krogoth/6c1c01392d91f512e2949ad1d57a75a8077478ba)
It worked on remote update but still failed on local update.

I checked the source and found the patch is only on remote update condition.
Comment 7 Paul Eggleton 2016-04-26 22:51:57 UTC
I'm honestly starting to consider whether we really need the local case at all - it's certainly not one I expect most users to use. Having two completely separate code paths is proving to be difficult to maintain.
Comment 8 Paul Eggleton 2016-05-10 03:07:45 UTC
I have gone ahead and sent a patch to drop the local update support.
Comment 9 Paul Eggleton 2016-05-23 04:53:30 UTC
Local update support is now removed as of:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=02986886fc40c0fcd33359a279ba9520fd5cac2a
Comment 10 Yi Zhao 2016-09-01 02:45:56 UTC
Verified with master/f038f069977170e323c9c6884c69e0b9e1cf1c6f