Bug 9368 - devtool: sdk-update: metadata update can result in conflict resolution
Summary: devtool: sdk-update: metadata update can result in conflict resolution
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.1
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.1 M4
Assignee: Stephano Cetola
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-04-01 03:11 UTC by Paul Eggleton
Modified: 2016-04-18 16:40 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2016-04-01 03:11:12 UTC
At the moment as part of devtool sdk-update we are performing a "git pull" on the metadata repository and that can be problematic - you may not get a fast-forward merge since the repository might have been re-created on the server end. We should probably do the following:

1) Use git status --porcelain to check if the user has made any changes and error out if so

2) Use "git fetch" followed by "git reset --hard" instead of "git pull" so that we avoid any potential conflicts.
Comment 1 Stephano Cetola 2016-04-07 13:56:47 UTC
Regarding Paul's comment, I'm going to be changing the way that the esdk is generated so that layers repo is already created and a commit only needs to be made by oe-publish-sdk.

--
Paul Eggleton: thinking about it though if we're to take better advantage of being able to pull down updates we probably need to initialise the repo when we create the SDK, and then as part of publishing we set it up as a commit in an existing repo if one exists
--

Also note that we should check to be sure that a git user exists in .gitconifg before we try to make a commit, or it will fail.