Bug 10807 - Extensible SDK: sdk-update deletes some meta-data
Summary: Extensible SDK: sdk-update deletes some meta-data
Status: RESOLVED FIXED
Alias: None
Product: eSDK
Classification: Yocto Project Subprojects
Component: eSDK (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.4 M4
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard: Backport to 2.3.1
Depends on:
Blocks:
 
Reported: 2016-12-13 21:42 UTC by Henry Bruce
Modified: 2017-12-06 17:21 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Bruce 2016-12-13 21:42:28 UTC
I built an eSDK for node.js development with SDK_EXT_TYPE = "minimal and SDK_UPDATE_URL set. Target is qemux86. 

After publishing an updated eSDK and then running "devtool sdk-update", some meta-data was deleted. In this case the missing files were in 
layers/meta-oe/recipes-devtools/android-tools/android-tools

Before running sdk update:
$ ls layers/meta-oe/recipes-devtools/android-tools/android-tools
adbd.mk
adb.mk
android-tools-adbd.service
define-shell-command.patch
ext4_utils.mk
fastboot.mk
implicit-declaration-function-strlcat-strlcopy.patch
mkbootimg-Add-dt-parameter-to-specify-DT-image.patch
mkbootimg.mk
preserve-ownership.patch
remove-bionic-android.patch
remove-selinux-android.patch
use-capability.patch
use-local-socket.patch

After running sdk update:
$ ls layers/meta-oe/recipes-devtools/android-tools/android-tools
adbd.mk  adb.mk  ext4_utils.mk  fastboot.mk  mkbootimg.mk

Subsequent devtool operations generate warnings due to missing files, even though android-tools is not built. There are multiple warnings like the one below, one for each missing file.

WARNING: /home/hbruce/Tools/yocto/npm-2.2/layers/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb: Unable to get checksum for android-tools-native SRC_URI entry remove-selinux-android.patch: file could not be found

Note that even if sdk-update fails due to bug 10798 the files are still deleted.
Comment 1 Paul Eggleton 2017-09-25 00:24:27 UTC
I tried to reproduce this a few days ago without success. I'll give it another try but if anyone else is still seeing this, please let me know.
Comment 2 Andrea Galbusera 2017-09-29 10:15:12 UTC
At the time this bug was filed, there was an issue with the .gitignore file shipped within the android-tools metadata [1]. IIRC, from my observations the reported warnings for missing files were evident since the first run of 'devtool sdk-update'. To me they were a consequence of oe-publish-sdk script honoring the .gitignore file while publishing updated metadata.

That said, there is now a patch in meta-openembedded [2] that filtered out useful files (namely patches and systemd service files) from android-tools .gitignore. BTW the real need for .gitignore inside the metadata, which is really uncommon within public layers, is still not 100% clear to me.

[1] http://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-devtools/android-tools/android-tools/.gitignore
[2] http://git.openembedded.org/meta-openembedded/commit/meta-oe/recipes-devtools/android-tools/android-tools/.gitignore?id=e406d4f5ae8c3ad735611c2f1a4a8df1c9e1db6d

Unless any consideration arise on the eSDK scripts/logic side, IMO this should be closed as fixed in meta-openembedded.
Comment 3 Paul Eggleton 2017-10-01 19:44:23 UTC
Wow, that is bizarre - no wonder we were seeing problems there! I too would question why on earth we would need a .gitignore in the metadata. Thanks for pointing that out, I will indeed close this now.