[PATCH 1/2] Remove validation for existing git repository
Ioana Grigoropol <ioanax.grigoropol@...>
Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@...>
--- .../yocto/bc/ui/wizards/install/OptionsPage.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java index 37c12f8..9e94aea 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java @@ -170,11 +170,11 @@ public class OptionsPage extends FiniteStateWizardPage { setErrorMessage("Directory " + projectPath + " does not exist, please select git clone."); return false; } - IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor()); - if (gitDescr == null || !gitDescr.exists()) { - setErrorMessage("Directory " + projectPath + " does not contain a git repository, please select git clone."); - return false; - } +// IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor()); +// if (gitDescr == null || !gitDescr.exists()) { +// setErrorMessage("Directory " + projectPath + " does not contain a git repository, please select git clone."); +// return false; +// } IHostFile validationFile = RemoteHelper.getRemoteHostFile(connection, projectPath + URI_SEPARATOR + InstallWizard.VALIDATION_FILE, new NullProgressMonitor()); if (validationFile == null || !validationFile.exists()) { -- 1.7.9.5 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[PATCH 0/2] [eclipse-poky-windows] Fix validation & command running on Linux
Ioana Grigoropol <ioanax.grigoropol@...>
- Skip validating an existing git repo and only perform some "sanity" checks
- When waiting for a command to finish executing do not use the command prompt because it can change depending on the target & the connection; instead use a terminator to mark the end of the command execution - When running from Linux and using a Local connection, after restarting Eclipse RSE does not find the connection - fix it by manually checking for the localhost connection Ioana Grigoropol (2): Remove validation for existing git repository Fix synchronous waiting for command prompt in Linux & connection lost when restarting .../src/org/yocto/bc/bitbake/BBSession.java | 2 + .../src/org/yocto/bc/bitbake/ShellSession.java | 24 ++---- .../yocto/bc/remote/utils/ProcessStreamBuffer.java | 14 ++-- .../org/yocto/bc/remote/utils/RemoteHelper.java | 14 ++-- .../remote/utils/YoctoHostShellProcessAdapter.java | 28 +------ .../src/org/yocto/bc/ui/Activator.java | 79 ++++++-------------- .../src/org/yocto/bc/ui/model/ProjectInfo.java | 4 + .../bc/ui/wizards/NewBitBakeFileRecipeWizard.java | 7 +- .../ui/wizards/NewBitBakeFileRecipeWizardPage.java | 15 ++-- .../yocto/bc/ui/wizards/install/OptionsPage.java | 10 +-- 10 files changed, 65 insertions(+), 132 deletions(-) -- 1.7.9.5 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: mail list for Xilinx Zynq platform?
Bruce Ashfield <bruce.ashfield@...>
On 12-12-05 09:42 AM, Elvis Dowson wrote:
Hi,And in case anyone is wondering, efforts are (still) underway to get a single unified layer for this board (and others), but getting all the moving parts organized is taking a bit longer than expected or than we would like. Cheers, Bruce
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: mail list for Xilinx Zynq platform?
Elvis Dowson
Hi,
On Dec 5, 2012, at 5:21 PM, Andreas Schweigstill <andreas@...> wrote: I have also tried to build a kernel and root filesystem for Zynq but the kernelFrom you messages, I infer that you are using the meta-zynq layer located here: http://git.yoctoproject.org/cgit/cgit.cgi/meta-zynq/ For my builds, I used Philip Ballister's meta-zynq layer located here for the simple reason that it uses xilinx git repository: https://github.com/balister/meta-zynq Also, try to ensure that you don't put both the meta-layers in your bblayers.conf file while building, and ensure that you set machine as follows in your local.conf file MACHINE ?= "zynq-zc702" Do let me know how it goes! Best regards, Elvis Dowson |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: recrdeptask not working correctly?
Jerrod Peach <peachj@...>
Any thoughts on this? Should I log a bug in bugzilla, or am I just doing something wrong?
toggle quoted message
Show quoted text
On Mon, Dec 3, 2012 at 10:57 AM, Jerrod Peach <peachj@...> wrote: All, |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: mail list for Xilinx Zynq platform?
Andreas Schweigstill <andreas@...>
Hello!
I personally have used Philip's meta-zynq layer to build a working u-boot andI have also tried to build a kernel and root filesystem for Zynq but the kernel gets stuck when booting, regardless if on the ZC702 board or on Qemu. I tried Poky denzil and Poky danny. Also the alternate meta-zynq layer from git.yoctoproject.org shows the same behaviour. These are the last console messages which I get: ## Booting kernel from Legacy Image at 01000000 ... Image Name: Linux-3.2.11-yocto-standard Created: 2012-12-04 20:07:37 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2997472 Bytes = 2.9 MiB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK ## Flattened Device Tree blob at 01a80000 Booting using the fdt blob at 0x1a80000 Loading Device Tree to 0eff8000, end 0efff185 ... OK Loading Kernel Image ... OK OK Loading Device Tree to 0efed000, end 0eff7185 ... OK Starting kernel ... Instead of using Linux kernel version 3.5-xilinx I always get Linux-3.2.11-yocto-standard which is obviously missing the Zynq patches. meta-zynq/recipes-kernel-linux-zynq contains the following lines: LINUX_VERSION ?= "3.5" LINUX_VERSION_EXTENSION ?= "-xilinx" How can I force Yocto to build kernel 3.5-xilinx? With best regards, Andreas Schweigstill -- Dipl.-Phys. Andreas Schweigstill Schweigstill IT | Embedded Systems Schauenburgerstraße 116, D-24118 Kiel, Germany Phone: (+49) 431 530354-35, Fax: (+49) 431 530354-36 Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/ |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: sysroot for use with GDB
Wolfgang Denk <wd@...>
Hello,
In message <20121205123818.C17EB200FF2@...> I wrote: Done that; please see Bug 3540 - remote target debugging broken https://bugzilla.yoctoproject.org/show_bug.cgi?id=3540 Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@... I can type faster than I can move a mouse, so I find menu-driven drawing packages time consuming and frustrating. - W. R. Stevens |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: sysroot for use with GDB
Wolfgang Denk <wd@...>
Hello,
nobody here who could help out? In message <20121203124234.6327B200FF8@...> I wrote: It appears that documentation and code are inconsistent; at least the eclipse plugin generates a .gdbinit script which contains a set sysroot /opt/poky/1.3/sysroots/armv7a-vfp-neon-poky-linux-gnueabi statement, i. e. it uses OECORE_TARGET_SYSROOT as I thought should work - but it doesn't. Trying to do so, we see that it fails. Our current suspicion is thatOK, guess I should enter a bug in bugzilla, then? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@... Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition. - Isaac Asimov |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: [PATCH 0/3] [eclipse-poky] Eclipse plugin on Windows - fixes for progress update on wizards & input validation
Grigoropol, IoanaX <ioanax.grigoropol@...>
Hi Jessica,
toggle quoted message
Show quoted text
I have apparently associated my Execution Environment 1.6 with a jre 1.7. I have sent a patch for the syntax error. As for the error shown for the existing repository, I have sent a patch to validate the entries when switching between an existing repo and a new clone. I think that we should perform some kind of validation on the existing repo (oe-build-env-init script exists, etc.) from the very creation of the project otherwise at some point things will stop working with bitbake and the user will not know why. Indeed, check for an existing git directory does not fall into this category and should be removed. Thanks, Ioana -----Original Message-----
From: Zhang, Jessica Sent: Wednesday, December 05, 2012 12:55 AM To: Grigoropol, IoanaX; yocto@... Subject: RE: [yocto] [PATCH 0/3] [eclipse-poky] Eclipse plugin on Windows - fixes for progress update on wizards & input validation Hi Ioana, There's issue as to syntax for YoctoHostShellProcessAdaptor since it's only supported by JDK version 1.7 and above. Also, when I tried the plugin on Linux, it still failed for creating a project for an existing metadata directory. With a not very clear error message " Directory /home/jzhang/poky contains a repository, please select validate repository" which is what I did. It seems we are calling out the git repository for bitbake commander project, which I don't think there's the need. I think we should preserve the existing interface that only provide user the option to clone a new one if there's the need. Otherwise, we should just validate the project repo behind the scene. And we shouldn't make the clone a new one as the default as the current implementation. Thanks, Jessica -----Original Message----- From: yocto-bounces@... [mailto:yocto-bounces@...] On Behalf Of Ioana Grigoropol Sent: Tuesday, December 04, 2012 5:26 AM To: yocto@... Subject: [yocto] [PATCH 0/3] [eclipse-poky] Eclipse plugin on Windows - fixes for progress update on wizards & input validation - Resending patches with proper header for eclipse-poky - Include fixes for showing progress information for long time running tasks on wizards for Bitbake Commander project & Bitbake recipe - Includes validation for the location & name of a new Bitbake Commander in a new repo clone or an existing one Ioana Grigoropol (3): Show progress bar for New Bitbake Commander project Show progress bar for building new Recipe in Bitbake commander perspective Validate project name and location for Bitbake command project .../src/org/yocto/bc/bitbake/ShellSession.java | 116 +++----- .../yocto/bc/remote/utils/ProcessStreamBuffer.java | 3 +- .../org/yocto/bc/remote/utils/RemoteHelper.java | 155 +++++------ .../org/yocto/bc/remote/utils/RemoteMachine.java | 4 +- .../remote/utils/YoctoHostShellProcessAdapter.java | 136 +++++----- .../bc/remote/utils/YoctoRunnableWithProgress.java | 106 ++++++++ .../bc/ui/wizards/NewBitBakeFileRecipeWizard.java | 2 +- .../ui/wizards/NewBitBakeFileRecipeWizardPage.java | 285 ++++++++++---------- .../yocto/bc/ui/wizards/install/InstallWizard.java | 113 ++------ .../yocto/bc/ui/wizards/install/OptionsPage.java | 178 ++++++------ .../BBConfigurationInitializeOperation.java | 6 +- .../newproject/CreateBBCProjectOperation.java | 31 +-- 12 files changed, 551 insertions(+), 584 deletions(-) create mode 100644 plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoRunnableWithProgress.java -- 1.7.9.5 _______________________________________________ yocto mailing list yocto@... https://lists.yoctoproject.org/listinfo/yocto |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[PATCH] Validate Bitbake Commander project when switching between new repo and existing one
Ioana Grigoropol <ioanax.grigoropol@...>
Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@...>
--- .../yocto/bc/ui/wizards/FiniteStateWizardPage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizardPage.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizardPage.java index 795a9c0..366ab1b 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizardPage.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizardPage.java @@ -106,7 +106,7 @@ public abstract class FiniteStateWizardPage extends WizardPage { * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent e) { -// validate(); + validate(); } /* -- 1.7.9.5 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[PATCH] Fix incompatibility with jre1.6 support for typed HashMap
Ioana Grigoropol <ioanax.grigoropol@...>
Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@...>
--- .../remote/utils/YoctoHostShellProcessAdapter.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java index 9ab43cf..2dba0a6 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java @@ -34,6 +34,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { private Semaphore sem; + public YoctoHostShellProcessAdapter(IHostShell hostShell, ProcessStreamBuffer processStreamBuffer, CommandResponseHandler commandResponseHandler) throws IOException { super(hostShell); this.processStreamBuffer = processStreamBuffer; @@ -41,7 +42,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { this.calculator = new GitCalculatePercentage(); this.sem = new Semaphore(1); this.command = ""; - this.commandMonitors = new HashMap<>(); + this.commandMonitors = new HashMap<String, IProgressMonitor>(); } public String getLastCommand() { @@ -50,7 +51,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { public synchronized void setLastCommand(String lastCommand) { try { - // there are still some processes that might take a long time and if we do not wait for them, + // there are still some processes that might take a long time and if we do not wait for them, // then the semaphore will not be released, because an interrupted exception will occur Thread.sleep(2000); isFinished = false; @@ -70,6 +71,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { private class GitCalculatePercentage implements ICalculatePercentage { final Pattern pattern = Pattern.compile("^Receiving objects:\\s*(\\d+)%.*"); + @Override public float calWorkloadDone(String info) throws IllegalArgumentException { Matcher m = pattern.matcher(info.trim()); if(m.matches()) { @@ -88,13 +90,16 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { } private void updateMonitor(final int work){ + Display.getDefault().asyncExec(new Runnable() { + @Override public void run() { if (getMonitor() != null) { getMonitor().worked(work); } } + }); } @@ -124,7 +129,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { updateMonitor(delta); reportedWorkload += delta; } - + if (reportedWorkload == RemoteHelper.TOTALWORKLOAD) doneMonitor(); } @@ -152,8 +157,9 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { continue; } setCommandPrompt(value); + if (commandPrompt != null && endChar != null && command != null && processStreamBuffer != null && - value.startsWith(commandPrompt) && value.endsWith(endChar) && + value.startsWith(commandPrompt) && value.endsWith(endChar) && !value.endsWith(command) && processStreamBuffer.getLastOutputLineContaining(command) != null /*&& waitForOutput*/) { sem.release(); isFinished = true; @@ -165,7 +171,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { this.commandResponseHandler.response(value, false); } } - + } private void setCommandPrompt(String value) { if (commandPrompt == null) { @@ -178,7 +184,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { commandPrompt = value.substring(0, end); endChar = PROMPT_USER_CH; } - + } } public boolean isFinished() { -- 1.7.9.5 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Fullpass Test Report for Yocto 1.4 M1 RC1 20121128 Build
Palalau, AlexandruX <alexandrux.palalau@...>
Hello,
The testing for p1022ds is blocked since the image didn't build out. For beagleboard, the X can’t startup in this build (Bug 3522). For Core Build System we have new issues regarding HOB under build appliance, incremental RPM and multilib with ipks (Bugs 3531, 3453, 3534). ADT toolchain fails regarding Clutter (Bugs 3477, 3488).
Best Regards,
Alexandru Palalau QA Contractor @ Yocto Project Open-source Technology Center Romania System Software Division
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: [PATCH 0/3] [eclipse-poky] Eclipse plugin on Windows - fixes for progress update on wizards & input validation
Zhang, Jessica
Hi Ioana,
toggle quoted message
Show quoted text
There's issue as to syntax for YoctoHostShellProcessAdaptor since it's only supported by JDK version 1.7 and above. Also, when I tried the plugin on Linux, it still failed for creating a project for an existing metadata directory. With a not very clear error message " Directory /home/jzhang/poky contains a repository, please select validate repository" which is what I did. It seems we are calling out the git repository for bitbake commander project, which I don't think there's the need. I think we should preserve the existing interface that only provide user the option to clone a new one if there's the need. Otherwise, we should just validate the project repo behind the scene. And we shouldn't make the clone a new one as the default as the current implementation. Thanks, Jessica -----Original Message-----
From: yocto-bounces@... [mailto:yocto-bounces@...] On Behalf Of Ioana Grigoropol Sent: Tuesday, December 04, 2012 5:26 AM To: yocto@... Subject: [yocto] [PATCH 0/3] [eclipse-poky] Eclipse plugin on Windows - fixes for progress update on wizards & input validation - Resending patches with proper header for eclipse-poky - Include fixes for showing progress information for long time running tasks on wizards for Bitbake Commander project & Bitbake recipe - Includes validation for the location & name of a new Bitbake Commander in a new repo clone or an existing one Ioana Grigoropol (3): Show progress bar for New Bitbake Commander project Show progress bar for building new Recipe in Bitbake commander perspective Validate project name and location for Bitbake command project .../src/org/yocto/bc/bitbake/ShellSession.java | 116 +++----- .../yocto/bc/remote/utils/ProcessStreamBuffer.java | 3 +- .../org/yocto/bc/remote/utils/RemoteHelper.java | 155 +++++------ .../org/yocto/bc/remote/utils/RemoteMachine.java | 4 +- .../remote/utils/YoctoHostShellProcessAdapter.java | 136 +++++----- .../bc/remote/utils/YoctoRunnableWithProgress.java | 106 ++++++++ .../bc/ui/wizards/NewBitBakeFileRecipeWizard.java | 2 +- .../ui/wizards/NewBitBakeFileRecipeWizardPage.java | 285 ++++++++++---------- .../yocto/bc/ui/wizards/install/InstallWizard.java | 113 ++------ .../yocto/bc/ui/wizards/install/OptionsPage.java | 178 ++++++------ .../BBConfigurationInitializeOperation.java | 6 +- .../newproject/CreateBBCProjectOperation.java | 31 +-- 12 files changed, 551 insertions(+), 584 deletions(-) create mode 100644 plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoRunnableWithProgress.java -- 1.7.9.5 _______________________________________________ yocto mailing list yocto@... https://lists.yoctoproject.org/listinfo/yocto |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Yocto Project Technical Team Meeting
Liu, Song <song.liu@...>
When: Occurs every Tuesday effective 6/26/2012 until 6/18/2013 from 8:00 AM to 9:00 AM (UTC-08:00) Pacific Time (US & Canada).
Where: Bridge Info Enclosed
Note: The GMT offset above does not reflect daylight saving time adjustments.
*~*~*~*~*~*~*~*~*~*
We encourage people attending the meeting to logon the Yocto IRC chancel during the meeting (optional):
Yocto IRC: http://webchat.freenode.net/?channels=#yocto
IRC Tutorial: http://www.irchelp.org/irchelp/irctutorial.html
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Minutes: Yocto Project Technical Team Meeting - Tuesday, December 04, 2012 8:00 AM-9:00 AM (UTC-08:00) Pacific Time (US & Canada).
Liu, Song <song.liu@...>
Attendees:
Amit, Ross, Eren, Beth, ChrisL, ScottR, JeffP, TomZ, Nitin, PaulE, ScottG, BruceA, CristianI, JessicaZ, Saul, RichardP, SeanH, MarkH, Ioana, Corneliu, MichaelH, AlexD, BjörnS, Ramana, Song. Minutes: * Opens collection - 5 min (Song) * Yocto 1.4 status - 20 min (Song/team) - 1.4 test plan: would like to ask everyone to review and comment: https://wiki.yoctoproject.org/wiki/Yocto_1.4_Overall_Test_Plan - M2 planning: . 2 highs scheduled: zypper, running post install at rootfs gen time. . 167 perfect days work scheduled. - Bug fixing: 25 bug fixed, 298 open, a little high. We need to pay more attention to bug fixing. Two bugs I would like to ask the team for help: . Connman issue: 3227. Issue is not in connman 1.9. Will upgrade to 1.9. . Beagle Board X issue: 3522 - Master: Build Appliance failed (Beth is changing autobuilder to automate this, Beth has a fix), nightly-x86 (connman issue,3227), Freescale BSP issue, Matthew knows it. meta-intel BSP failed. - QA: RC1 final report ETA, later Today. * SWAT team rotation: LaurentiuP -> Ioana Grigoropol * Opens - 10 min - Eren: Hello World documentation. Finished the oe part. http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/ . Would like to feedback. After that integrate with Wiki or others. . ScottR: sent email to Eren. Fold part of this into quick start. Bitbake information will be good to be in the newly revised bitbake manual. Will get this in Bill's hands. Suggest Eren to post specific technical questions on the mailing list. Hopefully Eren can get answers there. Afterwards, will work together to integrate this doc. . Eren: good plan. Will get answers to technical questions first, then work with Scott to integrate the doc. - ScottR: adding doc alert to comments in Bugzilla when filing a bug that effects documentation . If you are filing a bug or working on a bug you think might affect doc, it will be help if you add a comment (something like 'this will affect documentation')to alert ScottR and add ScottR in the CC list of the bug. We are trying to be more proactive on doc changes for this release. * Team Sharing - 20 min - AlexD: working on integrating Wayland, started building, making progress... Sent email to people working on Wayland. Paul can help if there is no response, these people are sitting right behind Paul. - Cristian: handling transition of HOB to be able to run on windows. One of 1.4 features. Setting up new dev environment. Investigation making the jump and figure out what would be possible problems. Bug #: 1972. - Andrei: working on package reporting system, finished the work. Submitted some patches, waiting for Saul's review. - Ioana: working on eclipse plugin on windows. Submitted patches for issues, should be running fine now. Next step is using hob on windows. - Mark: SMART work. At a point that we are ready to submit the code to the community. Some bug fixes, will be the first batch. Integration will be second batch of patches. - Bjorn: working on package testing. Would like some response to some issues already sent to the mailing list. RP suggested to do it in a different way, that needs to be discussed. (RP will respond). What we do with packages that don't have tests. Would like people to spend some time to think about it. RP: this is important, we can get these integrated, and then expand.. - Ramana: posted about configuration tool. Would like to get more comments. Bruce commented, Mark and RP will reply. RP: this is important, encourage people to look at it. The more people the better. . https://lists.yoctoproject.org/pipermail/yocto/2012-November/012867.html . https://lists.yoctoproject.org/pipermail/yocto/2012-November/012973.html - MichaelH: bugzilal management, auto generation, patch review process, etc. patch work basically setup. Schedule a demo with some key people for one of the patch review tools ?. Continue some of these work this week and other things. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: Howto use yocto meta-toolchain?
Marco <koansoftware@...>
Il 04/12/2012 13:37, Laurentiu Palcu ha scritto:
script it doesn't work https://bugzilla.yoctoproject.org/show_bug.cgi?id=3532 -- Marco |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: Using vendo kernel with Yocto
Paul Eggleton
On Friday 16 November 2012 18:25:59 you wrote:
Hello, just a reportGreat to hear! Please let us know if you have any other feedback or issues. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: Question: How to install the mkfs tools from the e2fsprogs instead of the BusyBox tools.
Paul Eggleton
On Monday 12 November 2012 12:10:59 Elad Yosef wrote:
I have created my own image based in existing one.Sorry for the late reply - the "mkfs" command is provided by util-linux and is in its own separate package, so I think you want to add the util-linux-mkfs package to IMAGE_INSTALL. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Packaging ROS for Yocto-Linux
Lukas Bulwahn
Hi all,
we are interested in setting up a computing platform for our development using Yocto-Linux and the robotic operating system ROS (http://www.ros.org/). We are currently at the very beginning of this development: As a first step, we want to package ROS for our own needs, but we are open to contribute this to the community if there are others that need this as well. Has someone in the community already packaged ROS for Yocto? Are there others that also interested in a ROS package for Yocto? We are happy about any feedback. Lukas Bulwahn BMW Car IT GmbH Petuelring 116 D-80809 Muenchen Germany Mail: lukas.bulwahn@... Web: http://www.bmw-carit.de ------------------------------------------------------------- BMW Car IT GmbH Geschäftsführer: Harald Heinecke Sitz und Registergericht: München HRB134810 ------------------------------------------------------------- |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[PATCH 3/3] Validate project name and location for Bitbake command project
Ioana Grigoropol <ioanax.grigoropol@...>
- if the project location is empty default value will be used (e.g. /home/user/)
- project name must not contain whitespaces and/or invalid characters - if we choose to clone a new repo but the destination directory already contains a .git directory, do not allow moving forward - if we choose to validate an existing repository, make sure that the directory exists, and contains a .git directory as well as a oe-init-build-env script Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@...> --- .../src/org/yocto/bc/bitbake/ShellSession.java | 94 +++-------- .../org/yocto/bc/remote/utils/RemoteHelper.java | 69 ++++---- .../remote/utils/YoctoHostShellProcessAdapter.java | 15 +- .../yocto/bc/ui/wizards/install/OptionsPage.java | 178 ++++++++++---------- .../BBConfigurationInitializeOperation.java | 6 +- .../newproject/CreateBBCProjectOperation.java | 24 ++- 6 files changed, 173 insertions(+), 213 deletions(-) diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/ShellSession.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/ShellSession.java index 961472f..f143bed 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/ShellSession.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/ShellSession.java @@ -48,23 +48,23 @@ public class ShellSession { public static final String LT = System.getProperty("line.separator"); public static final String exportCmd = "export BB_ENV_EXTRAWHITE=\"DISABLE_SANITY_CHECKS $BB_ENV_EXTRAWHITE\""; public static final String exportColumnsCmd = "export COLUMNS=1000"; - + public static String getFilePath(String file) throws IOException { File f = new File(file); - + if (!f.exists() || f.isDirectory()) { throw new IOException("Path passed is not a file: " + file); } - + StringBuffer sb = new StringBuffer(); - + String elems[] = file.split("//"); - + for (int i = 0; i < elems.length - 1; ++i) { sb.append(elems[i]); sb.append("//"); } - + return sb.toString(); } private Process process; @@ -90,7 +90,7 @@ public class ShellSession { // shellPath = "/bin/sh"; // } // shellPath = "/bin/bash"; - + initializeShell(new NullProgressMonitor()); } @@ -104,13 +104,14 @@ public class ShellSession { } } - synchronized + synchronized public String execute(String command) throws IOException { return execute(command, false); } - synchronized + synchronized public String execute(String command, boolean hasErrors) throws IOException { + try { IHost connection = RemoteHelper.getRemoteConnectionByName(projectInfo.getConnection().getName()); hasErrors = RemoteHelper.runCommandRemote(connection, new YoctoCommand(command, root.getAbsolutePath() + "/build/", "")); @@ -119,57 +120,15 @@ public class ShellSession { e.printStackTrace(); } return null; -// sendToProcessAndTerminate(command); -// -// if (process.getErrorStream().available() > 0) { -// byte[] msg = new byte[process.getErrorStream().available()]; -// -// process.getErrorStream().read(msg, 0, msg.length); -// out.write(new String(msg)); -// out.write(LT); -// errorMessage = "Error while executing: " + command + LT + new String(msg); -// } -// -// BufferedReader br = new BufferedReader(new InputStreamReader(process -// .getInputStream())); -// -// StringBuffer sb = new StringBuffer(); -// String line = null; - -// while (((line = br.readLine()) != null) && !line.endsWith(TERMINATOR) && !interrupt) { -// sb.append(line); -// sb.append(LT); -// out.write(line); -// out.write(LT); -// } -// -// if (interrupt) { -// process.destroy(); -// initializeShell(null); -// interrupt = false; -// } -// else if (line != null && retCode != null) { -// try { -// retCode[0]=Integer.parseInt(line.substring(0,line.lastIndexOf(TERMINATOR))); -// }catch (NumberFormatException e) { -// throw new IOException("Can NOT get return code" + command + LT + line); -// } -// } -// -// if (errorMessage != null) { -// throw new IOException(errorMessage); -// } -// -// return sb.toString(); } -synchronized +synchronized public void execute(String command, ICommandResponseHandler handler) throws IOException { System.out.println(command); execute(command, TERMINATOR, handler); } - - synchronized + + synchronized public void execute(String command, String terminator, ICommandResponseHandler handler) throws IOException { interrupt = false; InputStream errIs = process.getErrorStream(); @@ -177,40 +136,40 @@ synchronized clearErrorStream(errIs); } sendToProcessAndTerminate(command); - + BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream())); String std = null; - do { + do { if (errIs.available() > 0) { byte[] msg = new byte[errIs.available()]; errIs.read(msg, 0, msg.length); // out.write(new String(msg)); handler.response(new String(msg), true); - } - + } + std = br.readLine(); - + if (std != null && !std.endsWith(terminator)) { // out.write(std); handler.response(std, false); - } - + } + } while (std != null && !std.endsWith(terminator) && !interrupt); - + if (interrupt) { process.destroy(); initializeShell(null); interrupt = false; } } - + private void clearErrorStream(InputStream is) { - + try { byte b[] = new byte[is.available()]; - is.read(b); + is.read(b); System.out.println("clearing: " + new String(b)); } catch (IOException e) { e.printStackTrace(); @@ -221,7 +180,7 @@ synchronized /** * Send command string to shell process and add special terminator string so * reader knows when output is complete. - * + * * @param command * @throws IOException */ @@ -241,6 +200,5 @@ synchronized public void interrupt() { interrupt = true; } - -} +} \ No newline at end of file diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteHelper.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteHelper.java index 929ad63..f375de1 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteHelper.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteHelper.java @@ -47,13 +47,13 @@ import org.yocto.bc.ui.wizards.install.Messages; public class RemoteHelper { public static final int TOTALWORKLOAD = 100; private static Map<IHost, RemoteMachine> machines; - + public static RemoteMachine getRemoteMachine(IHost connection){ if (!getMachines().containsKey(connection)) getMachines().put(connection, new RemoteMachine(connection)); return getMachines().get(connection); } - + private static Map<IHost, RemoteMachine> getMachines() { if (machines == null) machines = new HashMap<IHost, RemoteMachine>(); @@ -71,7 +71,7 @@ public class RemoteHelper { public static YoctoHostShellProcessAdapter getHostShellProcessAdapter(IHost connection) { return getRemoteMachine(connection).getHostShellProcessAdapter(); } - + public static ProcessStreamBuffer getProcessBuffer(IHost connection) { return getRemoteMachine(connection).getProcessBuffer(); } @@ -87,20 +87,20 @@ public class RemoteHelper { for (int i = 0; i < connections.length; i++) if (connections[i].getAliasName().equals(remoteConnection)) return connections[i]; - return null; + return null; } - + public static IHost getRemoteConnectionForURI(URI uri, IProgressMonitor monitor) { if (uri == null) return null; - + String host = uri.getHost(); - if (host == null) + if (host == null) return null; - + ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry(); IHost[] connections = sr.getHosts(); - + IHost unconnected = null; for (IHost conn : connections) { if (host.equalsIgnoreCase(conn.getHostName())) { @@ -110,26 +110,26 @@ public class RemoteHelper { unconnected = conn; } } - + return unconnected; } - + public static IRemoteFileSubSystem getRemoteFileSubSystem(IHost host) { IRemoteFileSubSystem candidate = null; IRemoteFileSubSystem otherServiceCandidate = null; IRemoteFileSubSystem[] subSystems = RemoteFileUtility.getFileSubSystems(host); - + for (IRemoteFileSubSystem subSystem : subSystems) { if (subSystem instanceof FileServiceSubSystem) { if (subSystem.isConnected()) return subSystem; - + if (otherServiceCandidate == null) otherServiceCandidate = subSystem; - + } else if (candidate == null || (subSystem.isConnected() && !candidate.isConnected())) candidate = subSystem; - + } if (candidate != null && candidate.isConnected()) return candidate; @@ -137,7 +137,7 @@ public class RemoteHelper { return otherServiceCandidate; return null; } - + public static String getRemoteHostName(String remoteConnection){ final IHost host = getRemoteConnectionByName(remoteConnection); if(host == null) @@ -149,9 +149,9 @@ public class RemoteHelper { public static IFileService getConnectedRemoteFileService(IHost connection, IProgressMonitor monitor) throws Exception { return getRemoteMachine(connection).getRemoteFileService(monitor); } - + public static IHostFile[] getRemoteDirContent(IHost connection, String remoteParent, String fileFilter, int fileType, IProgressMonitor monitor){ - + try { IFileService fileServ = getConnectedRemoteFileService(connection, monitor); return fileServ.list(remoteParent, fileFilter, fileType, monitor); @@ -182,11 +182,11 @@ public class RemoteHelper { return ((IFileServiceSubSystem) subsystem).getFileService(); } - + public static ISubSystem getFileSubsystem(IHost connection) { return getRemoteMachine(connection).getFileSubsystem(); } - + public static IService getConnectedShellService(IHost connection, IProgressMonitor monitor) throws Exception { return getRemoteMachine(connection).getShellService(monitor); } @@ -201,21 +201,21 @@ public class RemoteHelper { } return null; } - + public static void getRemoteFile(IHost connection, String localExePath, String remoteExePath, IProgressMonitor monitor) throws Exception { - + assert(connection!=null); monitor.beginTask(Messages.InfoDownload, 100); - + IFileService fileService; try { - fileService = (IFileService) getConnectedRemoteFileService(connection, new SubProgressMonitor(monitor, 10)); + fileService = getConnectedRemoteFileService(connection, new SubProgressMonitor(monitor, 10)); File file = new File(localExePath); file.deleteOnExit(); monitor.worked(5); Path remotePath = new Path(remoteExePath); - fileService.download(remotePath.removeLastSegments(1).toString(), + fileService.download(remotePath.removeLastSegments(1).toString(), remotePath.lastSegment(),file,true, null, new SubProgressMonitor(monitor, 85)); } finally { @@ -223,13 +223,13 @@ public class RemoteHelper { } return; } - + public static IHostFile getRemoteHostFile(IHost connection, String remoteFilePath, IProgressMonitor monitor){ assert(connection != null); monitor.beginTask(Messages.InfoDownload, 100); - + try { - IFileService fileService = (IFileService) getConnectedRemoteFileService(connection, new SubProgressMonitor(monitor, 10)); + IFileService fileService = getConnectedRemoteFileService(connection, new SubProgressMonitor(monitor, 10)); Path remotePath = new Path(remoteFilePath); IHostFile remoteFile = fileService.getFile(remotePath.removeLastSegments(1).toString(), remotePath.lastSegment(), new SubProgressMonitor(monitor, 5)); return remoteFile; @@ -239,20 +239,20 @@ public class RemoteHelper { } return null; } - + public static boolean runCommandRemote(final IHost connection, final YoctoCommand cmd) throws Exception { final String remoteCommand = cmd.getCommand() + " " + cmd.getArguments(); final boolean hasErrors = false; - + if (!cmd.getInitialDirectory().isEmpty()) { writeToShell(connection, "cd " + cmd.getInitialDirectory()); } if (!hasErrors) writeToShell(connection, remoteCommand); - + return hasErrors; } - + public static boolean writeToShell(final IHost connection, final String remoteCommand){ new Thread(new Runnable() { @Override @@ -282,7 +282,7 @@ public class RemoteHelper { } writeToShell(connection, remoteCommand); } - + } catch (Exception e1) { e1.printStackTrace(); } @@ -291,7 +291,7 @@ public class RemoteHelper { /** * Throws a core exception with an error status object built from the given * message, lower level exception, and error code. - * + * * @param message * the status message * @param exception @@ -329,6 +329,7 @@ public class RemoteHelper { String parentPath = path.substring(0, nameStart); String name = path.substring(nameStart + 1); IHostFile hostFile = fs.getFile(parentPath, name, monitor); + return hostFile.exists(); } catch (Exception e) { e.printStackTrace(); diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java index baedc3b..9ab43cf 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java @@ -33,7 +33,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { private String endChar = null; private Semaphore sem; - + public YoctoHostShellProcessAdapter(IHostShell hostShell, ProcessStreamBuffer processStreamBuffer, CommandResponseHandler commandResponseHandler) throws IOException { super(hostShell); this.processStreamBuffer = processStreamBuffer; @@ -67,11 +67,11 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { private interface ICalculatePercentage { public float calWorkloadDone(String info) throws IllegalArgumentException; } - + private class GitCalculatePercentage implements ICalculatePercentage { final Pattern pattern = Pattern.compile("^Receiving objects:\\s*(\\d+)%.*"); public float calWorkloadDone(String info) throws IllegalArgumentException { - Matcher m = pattern.matcher(info.trim()); + Matcher m = pattern.matcher(info.trim()); if(m.matches()) { return new Float(m.group(1)) / 100; }else { @@ -79,7 +79,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { } } } - + private IProgressMonitor getMonitor() { if (command == null) { return null; @@ -88,16 +88,13 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { } private void updateMonitor(final int work){ - Display.getDefault().asyncExec(new Runnable() { - @Override public void run() { if (getMonitor() != null) { getMonitor().worked(work); } } - }); } @@ -155,10 +152,9 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { continue; } setCommandPrompt(value); - if (commandPrompt != null && endChar != null && command != null && processStreamBuffer != null && value.startsWith(commandPrompt) && value.endsWith(endChar) && - !value.endsWith(command) && processStreamBuffer.getLastOutputLineContaining(command) != null) { + !value.endsWith(command) && processStreamBuffer.getLastOutputLineContaining(command) != null /*&& waitForOutput*/) { sem.release(); isFinished = true; } @@ -210,4 +206,3 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { } } - diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java index 7c1a655..37c12f8 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java @@ -1,7 +1,6 @@ package org.yocto.bc.ui.wizards.install; import java.io.File; -import java.io.FilenameFilter; import java.net.URI; import java.net.URISyntaxException; import java.util.Map; @@ -13,6 +12,7 @@ import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; import org.eclipse.ptp.rdt.ui.wizards.RemoteProjectContentsLocationArea; @@ -22,9 +22,9 @@ import org.eclipse.ptp.remote.core.IRemoteFileManager; import org.eclipse.ptp.remote.core.IRemoteServices; import org.eclipse.ptp.remote.core.exception.RemoteConnectionException; import org.eclipse.ptp.remote.rse.core.RSEConnection; +import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.services.files.IHostFile; import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; @@ -32,31 +32,32 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; +import org.yocto.bc.remote.utils.RemoteHelper; import org.yocto.bc.ui.wizards.FiniteStateWizardPage; /** * Select which flavor of OE is to be installed. - * + * * @author kgilmer - * + * * Setting up the parameters for creating the new Yocto Bitbake project - * + * * @modified jzhang */ public class OptionsPage extends FiniteStateWizardPage { public static final String URI_SEPARATOR = "/"; public static final String LOCALHOST = "LOCALHOST"; - + private Composite top; - + private ValidationListener validationListener; private Text txtProjectName; private Button btnGit; private Button btnValidate; - + private RemoteProjectContentsLocationArea locationArea; - + protected OptionsPage(Map<String, Object> model) { super("Options", model); setMessage("Enter these parameters to create new Yocto Project BitBake commander project"); @@ -69,7 +70,7 @@ public class OptionsPage extends FiniteStateWizardPage { top.setLayoutData(new GridData(GridData.FILL_BOTH)); GridData gdFillH = new GridData(GridData.FILL_HORIZONTAL); - + Composite projectNameComp = new Composite(top, SWT.NONE); GridData gdProjName = new GridData(GridData.FILL_HORIZONTAL); projectNameComp.setLayoutData(gdProjName); @@ -81,11 +82,11 @@ public class OptionsPage extends FiniteStateWizardPage { txtProjectName.setLayoutData(gdFillH); txtProjectName.setFocus(); validationListener = new ValidationListener(); - + txtProjectName.addModifyListener(validationListener); IErrorMessageReporter errorReporter = new IErrorMessageReporter() { - + @Override public void reportError(String errorMessage, boolean infoOnly) { setMessage(errorMessage); @@ -93,47 +94,32 @@ public class OptionsPage extends FiniteStateWizardPage { updateModel(); } }; - + locationArea = new RemoteProjectContentsLocationArea(errorReporter, top, null); - + Group locationValidationGroup = new Group(top, SWT.NONE); locationValidationGroup.setText("Git repository"); GridData gd = new GridData(GridData.VERTICAL_ALIGN_END | GridData.FILL_HORIZONTAL); locationValidationGroup.setLayoutData(gd); GridLayout gl = new GridLayout(1, false); locationValidationGroup.setLayout(gl); - - SelectionListener lst = new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - if (validateProjectName() && validateProjectLocation()) - setPageComplete(true); - - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - } - }; - - + btnGit = new Button(locationValidationGroup, SWT.RADIO); btnGit.setText("Clone from Yocto Project &Git Repository into new location"); btnGit.setEnabled(true); btnGit.setSelection(true); - btnGit.addSelectionListener(lst); - - + btnGit.addSelectionListener(validationListener); + + btnValidate = new Button(locationValidationGroup, SWT.RADIO); btnValidate.setText("&Validate existing Git project location"); btnValidate.setEnabled(true); btnValidate.setSelection(false); - btnValidate.addSelectionListener(lst); - + btnValidate.addSelectionListener(validationListener); + setControl(top); } - + private boolean validateProjectName() { IWorkspaceRoot wsroot = ResourcesPlugin.getWorkspace().getRoot(); @@ -143,7 +129,7 @@ public class OptionsPage extends FiniteStateWizardPage { setErrorMessage("Project name cannot be empty!"); return false; } - + if (!validate.isOK() || !isValidProjectName(txtProjectName.getText())) { setErrorMessage("Invalid project name: " + txtProjectName.getText()); return false; @@ -156,67 +142,78 @@ public class OptionsPage extends FiniteStateWizardPage { } return true; } - + public String getProjectName(){ return txtProjectName.getText().trim(); } - + protected boolean validateProjectLocation() { - + String projectLoc = locationArea.getProjectLocation().trim(); - - File checkProject_dir = new File(projectLoc); - if (!checkProject_dir.isDirectory()) { - setErrorMessage("The project location directory " + projectLoc + " is not valid"); + + IRemoteConnection remoteConnection = locationArea.getRemoteConnection(); + if (remoteConnection == null) return false; - } + + if (projectLoc.isEmpty()) + return true; + + IHost connection = RemoteHelper.getRemoteConnectionByName(remoteConnection.getName()); + projectLoc = convertToRealPath(projectLoc); String separator = projectLoc.endsWith(URI_SEPARATOR) ? "" : URI_SEPARATOR; String projectPath = projectLoc + separator + getProjectName(); - File gitDir = new File(projectPath); + IHostFile repoDest = RemoteHelper.getRemoteHostFile(connection, projectPath, new NullProgressMonitor()); + if(btnValidate.getSelection()) { - if(!gitDir.isDirectory() || !gitDir.exists()) { + if (repoDest == null || !repoDest.exists()) { setErrorMessage("Directory " + projectPath + " does not exist, please select git clone."); return false; } - File[] filesMatched = gitDir.listFiles(new FilenameFilter() { - - @Override - public boolean accept(File file, String pattern) { - return file.getName().equals(".git"); - } - }); - - if (filesMatched.length != 1) { + IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor()); + if (gitDescr == null || !gitDescr.exists()) { setErrorMessage("Directory " + projectPath + " does not contain a git repository, please select git clone."); return false; } - - if(!new File(projectLoc + separator + InstallWizard.VALIDATION_FILE).exists()) { + + IHostFile validationFile = RemoteHelper.getRemoteHostFile(connection, projectPath + URI_SEPARATOR + InstallWizard.VALIDATION_FILE, new NullProgressMonitor()); + if (validationFile == null || !validationFile.exists()) { setErrorMessage("Directory " + projectPath + " seems invalid, please use other directory or project name."); return false; } + } else { //git clone + if (repoDest.exists() && repoDest.isDirectory()) { + IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor()); + if (gitDescr != null && gitDescr.exists()) { + setErrorMessage("Directory " + projectPath + " contains a repository, please select validate repository."); + return false; + } + } } - + try { - IWorkspaceRoot wsroot = ResourcesPlugin.getWorkspace().getRoot(); - IProject proj = wsroot.getProject(txtProjectName.getText()); - if (proj.exists()) { - setErrorMessage("A project with the name " + txtProjectName.getText() + " already exists"); - return false; - } - URI location = new URI("file:" + URI_SEPARATOR + URI_SEPARATOR + convertToRealPath(projectLoc) + URI_SEPARATOR + txtProjectName.getText()); - - IStatus status = ResourcesPlugin.getWorkspace().validateProjectLocationURI(proj, location); - if (!status.isOK()) { - setErrorMessage(status.getMessage()); - return false; + String projName = txtProjectName.getText(); + if (!projName.trim().isEmpty() && validateProjectName()) { + IWorkspaceRoot wsroot = ResourcesPlugin.getWorkspace().getRoot(); + IProject proj = wsroot.getProject(); + if (proj != null && proj.exists()) { + setErrorMessage("A project with the name " + projName + " already exists"); + return false; + } + URI location = new URI("file:" + URI_SEPARATOR + URI_SEPARATOR + convertToRealPath(projectLoc) + URI_SEPARATOR + txtProjectName.getText()); + + IStatus status = ResourcesPlugin.getWorkspace().validateProjectLocationURI(proj, location); + if (!status.isOK()) { + setErrorMessage(status.getMessage()); + return false; + } } } catch (Exception e) { + e.printStackTrace(); setErrorMessage("Run into error while trying to validate entries!"); return false; } - + setErrorMessage(null); return true; } @@ -238,7 +235,7 @@ public class OptionsPage extends FiniteStateWizardPage { return convertedpath; } - + @Override public void pageCleanup() { @@ -249,7 +246,7 @@ public class OptionsPage extends FiniteStateWizardPage { } @Override - + protected void updateModel() { try { URI uri = getProjectLocationURI(); @@ -266,12 +263,12 @@ public class OptionsPage extends FiniteStateWizardPage { public URI getProjectLocationURI() throws URISyntaxException { URI uri = locationArea.getProjectLocationURI(); - + if (uri != null) { String location = locationArea.getProjectLocation(); if (!uri.getPath().isEmpty()) { String separator = uri.getPath().endsWith(URI_SEPARATOR) ? "" : URI_SEPARATOR; - + return new URI( uri.getScheme(), uri.getHost(), uri.getPath() + separator + txtProjectName.getText(), @@ -284,7 +281,7 @@ public class OptionsPage extends FiniteStateWizardPage { } else { String location = locationArea.getProjectLocation(); String separator = location.endsWith(URI_SEPARATOR) ? "" : URI_SEPARATOR; - + IRemoteConnection conn = locationArea.getConnection(); if (conn instanceof RSEConnection) { RSEConnection rseConn = (RSEConnection)conn; @@ -294,7 +291,7 @@ public class OptionsPage extends FiniteStateWizardPage { } } } - + private String getDefaultPathDisplayString(IRemoteConnection connection, IRemoteServices remoteServices) { String projectName = getProjectName(); if (projectName.isEmpty()) @@ -306,7 +303,7 @@ public class OptionsPage extends FiniteStateWizardPage { } catch (RemoteConnectionException e) { e.printStackTrace(); } - + IRemoteFileManager fileMgr = remoteServices.getFileManager(connection); URI defaultURI = fileMgr.toURI(connection.getWorkingDirectory()); @@ -322,19 +319,30 @@ public class OptionsPage extends FiniteStateWizardPage { } return ""; //$NON-NLS-1$ } - + private boolean isValidProjectName(String projectName) { - if (projectName.indexOf('$') > -1) { + if (projectName.contains("\\s+")) + return false; + + if (projectName.indexOf('$') != -1) return false; - } + char[] chars = projectName.toCharArray(); + if (!Character.isJavaIdentifierStart(chars[0])) + return false; + for (int i = 1; i < chars.length; i++) + if (!Character.isJavaIdentifierPart(chars[i])) + return false; return true; - } + } @Override protected boolean validatePage() { if (!validateProjectName()) return false; - + + if (!validateProjectLocation()) + return false; + setErrorMessage(null); setMessage("All the entries are valid, press \"Finish\" to start the process, "+ "this will take a while. Please don't interrupt till there's output in the Yocto Console window..."); diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/newproject/BBConfigurationInitializeOperation.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/newproject/BBConfigurationInitializeOperation.java index a2af6e4..7a68ed5 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/newproject/BBConfigurationInitializeOperation.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/newproject/BBConfigurationInitializeOperation.java @@ -15,7 +15,6 @@ import java.lang.reflect.InvocationTargetException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.operation.IRunnableWithProgress; - import org.yocto.bc.bitbake.BBSession; import org.yocto.bc.bitbake.ProjectInfoHelper; import org.yocto.bc.remote.utils.RemoteHelper; @@ -37,13 +36,16 @@ public class BBConfigurationInitializeOperation implements IRunnableWithProgress this.writer = writer; } + @Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { BBSession session; try { + monitor.beginTask("Initialize bitbake session ...", RemoteHelper.TOTALWORKLOAD); ProjectInfoHelper.store(RemoteHelper.getRemoteConnectionByName(pinfo.getConnection().getName()), pinfo.getURI(), pinfo, monitor); session = Activator.getBBSession(pinfo, writer, monitor); session.initialize(); - + monitor.worked(90); + monitor.done(); } catch (Exception e) { throw new InvocationTargetException(e); } diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/newproject/CreateBBCProjectOperation.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/newproject/CreateBBCProjectOperation.java index fcc939c..1a19479 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/newproject/CreateBBCProjectOperation.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/newproject/CreateBBCProjectOperation.java @@ -42,40 +42,40 @@ public class CreateBBCProjectOperation extends WorkspaceModifyOperation { public static void addNatureToProject(IProject proj, String nature_id, IProgressMonitor monitor) throws CoreException { IProjectDescription desc = proj.getDescription(); Vector<String> natureIds = new Vector<String>(); - + natureIds.add(nature_id); natureIds.addAll(Arrays.asList(desc.getNatureIds())); - desc.setNatureIds((String[]) natureIds.toArray(new String[natureIds.size()])); - + desc.setNatureIds(natureIds.toArray(new String[natureIds.size()])); + proj.setDescription(desc, monitor); } - + private ProjectInfo projInfo; public CreateBBCProjectOperation(ProjectInfo projInfo) { this.projInfo = projInfo; } - + protected void addNatures(IProject proj, IProgressMonitor monitor) throws CoreException { addNatureToProject(proj, BitbakeCommanderNature.NATURE_ID, monitor); } private IProjectDescription createProjectDescription(IWorkspace workspace, ProjectInfo projInformation) throws CoreException { IProjectDescription desc = workspace.newProjectDescription(projInformation.getProjectName()); - + desc.setLocationURI(projInformation.getURI()); - + return desc; } @Override protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException { IProjectDescription desc = createProjectDescription(ResourcesPlugin.getWorkspace(), projInfo); - + IWorkspaceRoot wsroot = ResourcesPlugin.getWorkspace().getRoot(); IProject proj = wsroot.getProject(projInfo.getProjectName()); - + try { proj.create(desc, monitor); ProjectInfoHelper.store(RemoteHelper.getRemoteConnectionByName(projInfo.getConnection().getName()), proj.getLocationURI(), projInfo, monitor); @@ -85,13 +85,9 @@ public class CreateBBCProjectOperation extends WorkspaceModifyOperation { } catch (Exception e) { e.printStackTrace(); } - - - - addNatures(proj, monitor); } - + public ProjectInfo getProjectInfo() { return projInfo; } -- 1.7.9.5 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|