| Summary: | we are disabling file based git urls in imported (actually all) layers | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | brian avery <brian.avery> |
| Component: | toaster | Assignee: | Michael Wood <michael.g.wood> |
| Status: | VERIFIED FIXED | QA Contact: | Alexandru Roman <alexandru.costinx.roman> |
| Severity: | normal | ||
| Priority: | Medium | CC: | alexandru.costinx.roman, belen.barros.pena, jessica.zhang, michael.g.wood, stanciux.mihail |
| Version: | 2.1 | ||
| Target Milestone: | 2.1 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Yes (doc changes required) | |
michaelw suggested that we verify rechability when we do the import by doing: git ls-remote <giturl> which would work for both local and remote vcs. This is a good way to make sure there's not a typo in a long url. in the xhr_importlayer function we could add a non blocking validation condition which depends on the results of git ls-remote returning info for a valid git repo. related to bug #8429 (In reply to comment #2) > in the xhr_importlayer function we could add a non blocking validation > condition which depends on the results of git ls-remote returning info for a > valid git repo. > > related to bug #8429 I agree this is a good feature, as long as the command doesn't block users from interacting with Toaster while running: you should be free to continue using Toaster after we issue the command and while we are waiting for its outcome. Once we get the results, we show them in the UI. I think this should go as a separate feature, or be done as part of bug 8429. michaelw/toaster/localhostbctrl (In reply to comment #4) > michaelw/toaster/localhostbctrl I was able to build my imported layer with this branch, both with file:///home/belen/ypdd-adv-layer and /home/belen/ypdd-adv-layer michael, if you send a review req to the list for the michaelw/toaster/localhostbctrl I can upstream it tomoro. This commit has landed http://git.yoctoproject.org/cgit/cgit.cgi/poky/atom/b60c9943bff4448be5768e095b67bc4a291414ef We don't need to skip file:/// uri type locations for git repositories. If you're using a file:/// uri you should know that it has to be a local path. [YOCTO #9200] igned-off-by: Michael Wood <michael.g.wood@intel.com> (Bitbake rev: 4d0e5804103c2d98d038b3c490cac37a73f3cc47) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Bug link: https://bugzilla.yoctoproject.org/show_bug.cgi?id=9200 gitweb: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b60c9943bff4448be5768e095b67bc4a291414ef Verified on master. |
In localhostcontroller.py we are skipping the clone for all layers that have a giturl of file:///<local file path> This makes it impossible to have a local layer that you want to import unless you push it to somewhere web accessible. This is an unnecessary restriction. The fix: --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py @@ -129,8 +129,8 @@ class LocalhostBEController(BuildEnvironmentController): for layer in layers: # we don't process local URLs - if layer.giturl.startswith("file://"): - continue + #if layer.giturl.startswith("file://"): + # continue if not (layer.giturl, layer.commit) in gitrepos: gitrepos[(layer.giturl, layer.commit)] = [] gitrepos[(layer.giturl, layer.commit)].append( (layer.name, layer.dirpath) )