Date   

Re: Installation of i686 SDK on a x86_64 machine?

Laurentiu Palcu <laurentiu.palcu@...>
 

On 01/22/2013 11:03 AM, Wolfgang Denk wrote:
Id SDK_ARCH INST_ARCH Status
==============================================
1 ix86 ix86 works
2 ix86 x86_64 works
3 x86_64 ix86 cannot work
4 x86_64 x86_64 works

The bug report is about case 3 - attempting to install a 64 bit SDK on
a 32 bit machine. This indeed cannot work and shuld be prevented byy
the installer.

But the current code also prevents case 2, installing 32 bit images on
a 64 bit machine, which works perfectly fine (assuming you have the
needed 32 bit libraries installed).
I see your point. Would you please file a bug on this?

Thanks,
Laurentiu


Re: [PATCH v2] [eclipse-poky][branch:windows-build]Performance fix for Windows implementation

Grigoropol, IoanaX <ioanax.grigoropol@...>
 

Hi Jessica,

This patch applies on top of the last patch I sent on Thursday,
"[PATCH] [eclipse-poky][branch:windows-build]Performance fix for Linux implementation".

Attached is my local git log.

Please let me know it there are any problems.

Thanks,
Ioana

-----Original Message-----
From: Zhang, Jessica
Sent: Tuesday, January 22, 2013 12:30 AM
To: Grigoropol, IoanaX; yocto@...
Subject: RE: [yocto] [PATCH v2] [eclipse-poky][branch:windows-build]Performance fix for Windows implementation

Hi Ioana,

This patch seems not apply to the code of the latest windows-build, can you do a rebase?

Thanks,
Jessica

-----Original Message-----
From: yocto-bounces@... [mailto:yocto-bounces@...] On Behalf Of Ioana Grigoropol
Sent: Monday, January 21, 2013 6:37 AM
To: yocto@...
Subject: [yocto] [PATCH v2] [eclipse-poky][branch:windows-build]Performance fix for Windows implementation

- run each command in a separate shell - needs explicit sourcing of environment and closing for each command
- add distinction between OEFS URI and actual URI of the remote project and files -> YoctoLocation of the project contains both URIs
- use OEFS URI only for initialization of OEFSFileSystem,OEIgnoredPaths, OEFile (oefs://...)
- use actual URI (file:// or rse://) for all other operations (new file, copy, save, delete)
- tested only against Windows machine & RSE connection to BuildAppliance machine
IMPORTANT: please make sure that sshd configurations on the remote machine has variable MaxSessions set to a reasonable number (more than the default 10 sessions), otherwise an "Error creating terminal" will be thrown when more channels are opened for running remote commands (ChannelSftp)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@...>
---
.../src/org/yocto/bc/bitbake/BBRecipe.java | 2 +-
.../src/org/yocto/bc/bitbake/BBSession.java | 30 +++--
.../src/org/yocto/bc/bitbake/ShellSession.java | 10 +-
.../org/yocto/bc/remote/utils/CommandRunnable.java | 3 +-
.../org/yocto/bc/remote/utils/RemoteHelper.java | 19 ++++
.../org/yocto/bc/remote/utils/RemoteMachine.java | 31 +++---
.../src/org/yocto/bc/ui/Activator.java | 12 +-
.../editors/bitbake/BitBakeDocumentProvider.java | 27 +++--
.../bc/ui/editors/bitbake/BitBakeFileEditor.java | 2 +-
.../bitbake/BitBakeSourceViewerConfiguration.java | 20 +++-
.../src/org/yocto/bc/ui/filesystem/OEFile.java | 115 ++++----------------
.../org/yocto/bc/ui/filesystem/YoctoLocation.java | 36 ++++++
.../src/org/yocto/bc/ui/model/ProjectInfo.java | 38 ++++---
.../src/org/yocto/bc/ui/model/YoctoHostFile.java | 20 ++--
.../ui/wizards/NewBitBakeFileRecipeWizardPage.java | 19 +++-
.../importProject/ImportYoctoProjectWizard.java | 4 +-
.../yocto/bc/ui/wizards/install/InstallWizard.java | 4 +-
.../yocto/bc/ui/wizards/install/OptionsPage.java | 8 +-
.../BBConfigurationInitializeOperation.java | 2 +-
.../newproject/CreateBBCProjectOperation.java | 7 +-
20 files changed, 233 insertions(+), 176 deletions(-) create mode 100755 plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/YoctoLocation.java

diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBRecipe.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBRecipe.java
index 6d003ce..e8e8d30 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBRecipe.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBRecipe.java
@@ -23,7 +23,7 @@ public class BBRecipe extends BBSession {
private final URI fileURI;

public BBRecipe(BBSession session, URI filePath) throws IOException {
- super(session.shell, session.pinfo.getURI());
+ super(session.shell, session.pinfo.getOriginalURI());
this.session = session;
this.fileURI = filePath;
this.parsingCmd = "DISABLE_SANITY_CHECKS=\"1\" bitbake -e -b " + filePath.getPath() + " >& " + BB_ENV_FILE; diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java
index 9adeb3f..8a8de22 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java
@@ -15,6 +15,8 @@ import java.io.File;
import java.io.FileFilter;
import java.io.FileReader;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
@@ -33,15 +35,18 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status; import org.eclipse.jface.preference.JFacePreferences;
import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.rse.core.model.IHost;
import org.eclipse.ui.console.ConsolePlugin;
import org.eclipse.ui.console.IConsole; import org.eclipse.ui.console.IConsoleManager;
import org.eclipse.ui.console.MessageConsole;
import org.eclipse.ui.console.MessageConsoleStream;
import org.eclipse.ui.progress.WorkbenchJob;
+import org.yocto.bc.remote.utils.RemoteHelper;
import org.yocto.bc.ui.model.IModelElement;
import org.yocto.bc.ui.model.ProjectInfo;

@@ -60,10 +65,10 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {

public static final String BB_ENV_FILE = "bitbake.env";

- public static final String CONF_DIR = "/conf";
+ public static final String CONF_DIR = "conf";
public static final String BUILDDIR_INDICATORS [] = {
- "/local.conf",
- "/bblayers.conf",
+ "local.conf",
+ "bblayers.conf",
};

protected final ProjectInfo pinfo;
@@ -81,9 +86,9 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {
public BBSession(ShellSession ssession, URI projectRoot) throws IOException {
shell = ssession;
this.pinfo = new ProjectInfo();
- pinfo.setLocation(projectRoot);
+ pinfo.setLocationURI(projectRoot);
pinfo.setInitScriptPath(ProjectInfoHelper.getInitScriptPath(projectRoot));
- this.parsingCmd = "sh -c 'DISABLE_SANITY_CHECKS=\"1\" bitbake -e >& " + BB_ENV_FILE + " '" ;
+ this.parsingCmd = "DISABLE_SANITY_CHECKS=\"1\" bitbake -e >& " +
+BB_ENV_FILE;
}

public BBSession(ShellSession ssession, URI projectRoot, boolean silent) throws IOException { @@ -190,7 +195,7 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {
}

public URI getProjInfoRoot() {
- return pinfo.getURI();
+ return pinfo.getOriginalURI();
}

/**
@@ -271,7 +276,7 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {
*/
public MessageConsole getConsole() {
if (sessionConsole == null) {
- String cName = ProjectInfoHelper.getProjectName(pinfo.getURI()) + " Console";
+ String cName =
+ProjectInfoHelper.getProjectName(pinfo.getOriginalURI()) + " Console";
IConsoleManager conMan = ConsolePlugin.getDefault().getConsoleManager();
IConsole[] existing = conMan.getConsoles();
for (int i = 0; i < existing.length; i++) @@ -391,10 +396,10 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {
String result = shell.execute(parsingCmd, hasErrors);

//FIXME : wait for bitbake to finish
-
properties = parseBBEnvironment(result);

initialized = true;
+ //FIXME: cleanup BB env file
}
} finally {
//downgrade lock
@@ -453,7 +458,10 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {
}

protected void parse(String bbOutfilePath, Map outMap) throws Exception {
- BufferedReader reader = new BufferedReader(new FileReader(bbOutfilePath + BB_ENV_FILE));
+ IHost connection = shell.getProjectInfo().getConnection();
+ InputStream is = RemoteHelper.getRemoteInputStream(connection, bbOutfilePath, BB_ENV_FILE, new NullProgressMonitor());
+ RemoteHelper.getRemoteHostFile(connection, bbOutfilePath + BB_ENV_FILE, new NullProgressMonitor());
+ BufferedReader reader = new BufferedReader(new
+InputStreamReader(is));
String line;
boolean inLine = false;
StringBuffer sb = null;
@@ -769,4 +777,8 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {
return (Map<String, String>) properties;
}

+ public ProjectInfo getProjectInfo() {
+ return pinfo;
+ }
+
}
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 ef01d96..6603bfb 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
@@ -78,6 +78,14 @@ public class ShellSession {
// private final Writer out;
private ProjectInfo projectInfo;

+ public ProjectInfo getProjectInfo() {
+ return projectInfo;
+ }
+
+ public void setProjectInfo(ProjectInfo projectInfo) {
+ this.projectInfo = projectInfo;
+ }
+
public ShellSession(ProjectInfo pInfo, int shellType, IHostFile root, String initCmd, Writer out) throws IOException {
this.projectInfo = pInfo;
this.root = root;
@@ -129,7 +137,7 @@ public class ShellSession {
}

private String getInitCmd() {
- return "source " + initCmd + " " + getBuildDirAbsolutePath() + " > tempsf; rm -rf tempsf;";
+ return "source " + initCmd + " " + getBuildDirAbsolutePath() + " >
+ tempsf; rm -rf tempsf;" + exportCmd + ";" + exportColumnsCmd + ";" +
+ "cd " + getBuildDirAbsolutePath() + ";";
}

synchronized
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/CommandRunnable.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/CommandRunnable.java
index fe8b7a7..98c3758 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/CommandRunnable.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/CommandRunna
+++ ble.java
@@ -52,6 +52,7 @@ public class CommandRunnable implements Runnable{
}
StringBuffer buffer = new StringBuffer();
int c;
+ if (errbr != null)
while ((c = errbr.read()) != -1) {
char ch = (char) c;
buffer.append(ch);
@@ -66,7 +67,7 @@ public class CommandRunnable implements Runnable{
buffer.delete(0, buffer.length());
}
}
-
+ if (inbr != null)
while ((c = inbr.read()) != -1) {
char ch = (char) c;
buffer.append(ch);
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 1134c8e..9bce9e3 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
@@ -11,6 +11,7 @@
package org.yocto.bc.remote.utils;

import java.io.File;
+import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
@@ -268,6 +269,24 @@ public class RemoteHelper {
return null;
}

+ public static InputStream getRemoteInputStream(IHost connection, String parentPath, String remoteFilePath, IProgressMonitor monitor){
+ assert(connection != null);
+ monitor.beginTask(Messages.InfoDownload, 100);
+
+ try {
+ IFileService fileService = getConnectedRemoteFileService(connection,
+new SubProgressMonitor(monitor, 10));
+
+ return fileService.getInputStream(parentPath, remoteFilePath, false, monitor);
+// IHostFile remoteFile = fileService.getFile(remotePath.removeLastSegments(1).toString(), remotePath.lastSegment(), new SubProgressMonitor(monitor, 5));
+// return remoteFile;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }finally {
+ monitor.done();
+ }
+ return null;
+ }
+
/**
* Throws a core exception with an error status object built from the given
* message, lower level exception, and error code.
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteMachine.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteMachine.java
index 18c41e1..ba925ca 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteMachine.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteMachin
+++ e.java
@@ -1,11 +1,11 @@
package org.yocto.bc.remote.utils;

import java.io.BufferedReader;
-import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.locks.Lock;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -18,7 +18,6 @@ import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.internal.services.local.shells.LocalShellService;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.shells.HostShellProcessAdapter;
import org.eclipse.rse.services.shells.IHostShell;
import org.eclipse.rse.services.shells.IShellService;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
@@ -43,13 +42,16 @@ public class RemoteMachine {
public RemoteMachine(IHost connection) {
setConnection(connection);
}
- private ProcessStreamBuffer processOutput(Process process, IProgressMonitor monitor) throws Exception {
- if (process == null)
+ private ProcessStreamBuffer processOutput(IHostShell shell, IProgressMonitor monitor) throws Exception {
+ if (shell == null)
throw new Exception("An error has occured while trying to run remote command!");
ProcessStreamBuffer processBuffer = new ProcessStreamBuffer();
-
- BufferedReader inbr = new BufferedReader(new InputStreamReader(process.getInputStream()));
- BufferedReader errbr = new BufferedReader(new InputStreamReader(process.getErrorStream()));
+
+ Lock lock = shell.getStandardOutputReader().getReaderLock();
+ lock.lock();
+ BufferedReader inbr = shell.getStandardOutputReader().getReader();
+ BufferedReader errbr = shell.getStandardErrorReader().getReader();
+
boolean cancel = false;
while (!cancel) {
if(monitor.isCanceled()) {
@@ -58,6 +60,7 @@ public class RemoteMachine {
}
StringBuffer buffer = new StringBuffer();
int c;
+ if (errbr != null)
while ((c = errbr.read()) != -1) {
char ch = (char) c;
buffer.append(ch);
@@ -71,7 +74,7 @@ public class RemoteMachine {
buffer.delete(0, buffer.length());
}
}
-
+ if (inbr != null)
while ((c = inbr.read()) != -1) {
char ch = (char) c;
buffer.append(ch);
@@ -120,13 +123,13 @@ public class RemoteMachine {

IShellService shellService = getShellService(new SubProgressMonitor(monitor, 7));

- HostShellProcessAdapter p = null;
+// HostShellProcessAdapter p = null;
ProcessStreamBuffer buffer = null;
try {
SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 3);
IHostShell hostShell = shellService.runCommand("", "env" + " ; echo " + RemoteHelper.TERMINATOR + "; exit;", new String[]{}, subMonitor);
- p = new HostShellProcessAdapter(hostShell);
- buffer = processOutput(p, subMonitor);
+// p = new HostShellProcessAdapter(hostShell);
+ buffer = processOutput(hostShell, subMonitor);
for(int i = 0; i < buffer.getOutputLines().size(); i++) {
String out = buffer.getOutputLines().get(i);
String[] tokens = out.split("=");
@@ -138,9 +141,9 @@ public class RemoteMachine {
environment.put(varName, varValue);
}
} catch (Exception e) {
- if (p != null) {
- p.destroy();
- }
+// if (p != null) {
+// p.destroy();
+// }
e.printStackTrace();
}

diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/Activator.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/Activator.java
index 188efe6..3b97526 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/Activator.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/Activator.java
@@ -61,7 +61,7 @@ public class Activator extends AbstractUIPlugin {
URI key = session.getProjInfoRoot();// + filePath;
BBRecipe recipe = (BBRecipe) bbRecipeMap.get(key);
if (recipe == null) {
- recipe = new BBRecipe(session,filePath);
+ recipe = new BBRecipe(session, filePath);
bbRecipeMap.put(key, recipe);
}

@@ -75,7 +75,7 @@ public class Activator extends AbstractUIPlugin {
* @throws IOException
*/
public static BBSession getBBSession(ProjectInfo projectInfo, Writer out, IProgressMonitor monitor) throws IOException {
- URI projectRoot = projectInfo.getURI();
+ URI projectRoot = projectInfo.getOriginalURI();
if (bbSessionMap == null) {
bbSessionMap = new Hashtable<URI, BBSession>();
}
@@ -97,7 +97,7 @@ public class Activator extends AbstractUIPlugin {
* @throws Exception
*/
public static BBSession getBBSession(ProjectInfo projectInfo, IProgressMonitor monitor) throws Exception {
- URI projectRoot = projectInfo.getURI();
+ URI projectRoot = projectInfo.getOriginalURI();
if (bbSessionMap == null) {
bbSessionMap = new Hashtable<URI, BBSession>();
}
@@ -151,12 +151,12 @@ public class Activator extends AbstractUIPlugin {
if (projInfoMap == null) {
projInfoMap = new Hashtable<URI, ProjectInfo>();
}
- location = convertOEFSUri(location);
+// location = convertOEFSUri(location);
if (location != null) {
ProjectInfo pi = projInfoMap.get(location);
if (pi == null) {
pi = new ProjectInfo();
- pi.setLocation(location);
+ pi.setLocationURI(location);
try {
pi.setInitScriptPath(ProjectInfoHelper.getInitScriptPath(location));
} catch (IOException e) {
@@ -195,7 +195,7 @@ public class Activator extends AbstractUIPlugin {
* @throws IOException
*/
private static ShellSession getShellSession(ProjectInfo projInfo, Writer out, IProgressMonitor monitor) throws IOException {
- URI absolutePath = projInfo.getURI();
+ URI absolutePath = projInfo.getOriginalURI();
if (shellMap == null) {
shellMap = new Hashtable<String, ShellSession>();
}
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeDocumentProvider.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeDocumentProvider.java
index 2d28261..d9d5754 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeDocumentProvider.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBak
+++ eDocumentProvider.java
@@ -11,6 +11,9 @@
package org.yocto.bc.ui.editors.bitbake;

import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.security.auth.login.Configuration;

import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -43,12 +46,18 @@ public class BitBakeDocumentProvider extends FileDocumentProvider {
public static final String RECIPE_COMMENT= "RECIPE_COMMENT"; //$NON-NLS-1$

private IHost connection;
+
+ private BitBakeSourceViewerConfiguration viewerConfiguration;

private static final String[] CONTENT_TYPES= {
RECIPE_CODE,
RECIPE_COMMENT
};

+ public BitBakeDocumentProvider(BitBakeSourceViewerConfiguration viewerConfiguration) {
+ this.viewerConfiguration = viewerConfiguration;
+ }
+
private IDocumentPartitioner createRecipePartitioner() {
IPredicateRule[] rules= { new SingleLineRule("#", null, new Token(RECIPE_COMMENT), (char) 0, true, false) }; //$NON-NLS-1$

@@ -73,13 +82,17 @@ public class BitBakeDocumentProvider extends FileDocumentProvider {
if (element instanceof IFileEditorInput) {
IFileEditorInput input= (IFileEditorInput) element;

- URI uri = input.getFile().getLocationURI();
- if (uri == null)
- return true;
-
- if (connection == null)
- connection = RemoteHelper.getRemoteConnectionForURI(uri, new NullProgressMonitor());
- return !RemoteHelper.fileExistsRemote(connection, new NullProgressMonitor(), uri.getPath());
+ URI root = viewerConfiguration.getBBSession().getProjInfoRoot();
+ String relPath = input.getFile().getProjectRelativePath().toPortableString();
+ try {
+ URI fileURI = new URI(root.getScheme(), root.getHost(), root.getPath() + "/" + relPath, root.getFragment());
+ if (connection == null)
+ //connection = RemoteHelper.getRemoteConnectionForURI(fileURI, new NullProgressMonitor());
+ connection = viewerConfiguration.getBBSession().getProjectInfo().getConnection();
+ return !RemoteHelper.fileExistsRemote(connection, new NullProgressMonitor(), fileURI.getPath());
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
}

return super.isDeleted(element);
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeFileEditor.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeFileEditor.java
index be856ff..b2da775 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeFileEditor.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBak
+++ eFileEditor.java
@@ -45,7 +45,7 @@ public class BitBakeFileEditor extends AbstractDecoratedTextEditor {
super();
viewerConfiguration = new BitBakeSourceViewerConfiguration(getSharedColors(), getPreferenceStore());
setSourceViewerConfiguration(viewerConfiguration);
- setDocumentProvider(new BitBakeDocumentProvider());
+ setDocumentProvider(new
+BitBakeDocumentProvider(viewerConfiguration));
}

@Override
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeSourceViewerConfiguration.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeSourceViewerConfiguration.java
index 98768a8..06a8233 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeSourceViewerConfiguration.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBak
+++ eSourceViewerConfiguration.java
@@ -10,6 +10,9 @@
*******************************************************************************/
package org.yocto.bc.ui.editors.bitbake;

+import java.net.URI;
+import java.net.URISyntaxException;
+
import org.eclipse.core.resources.IFile; import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.ITextHover;
@@ -33,9 +36,9 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.RGB; import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
-
import org.yocto.bc.bitbake.BBLanguageHelper;
import org.yocto.bc.bitbake.BBSession;
+import org.yocto.bc.bitbake.ProjectInfoHelper;

public class BitBakeSourceViewerConfiguration extends TextSourceViewerConfiguration {

@@ -66,7 +69,15 @@ public class BitBakeSourceViewerConfiguration extends TextSourceViewerConfigurat
public ITextHover getTextHover(ISourceViewer sv, String contentType) {
//only .bb file support Text Hover.
if (textHover == null && targetFile.getFileExtension().equals(BBLanguageHelper.BITBAKE_RECIPE_FILE_EXTENSION)) {
- textHover = new BBVariableTextHover(session, targetFile.getLocationURI());
+ URI root = session.getProjInfoRoot();
+ try {
+ URI targetFIleURI = new URI(root.getScheme(), root.getHost(), root.getPath() + "/" +targetFile.getProjectRelativePath().toPortableString(), root.getFragment());
+ textHover = new BBVariableTextHover(session, targetFIleURI);
+ } catch (URISyntaxException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
}

return textHover;
@@ -192,4 +203,9 @@ public class BitBakeSourceViewerConfiguration extends TextSourceViewerConfigurat
public void setBBSession(BBSession session) {
this.session = session;
}
+
+ public BBSession getBBSession() {
+ return this.session;
+ }
+
}
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/OEFile.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/OEFile.java
index f12d6f3..7360588 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/OEFile.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/OEFile.java
@@ -37,6 +37,7 @@ import org.yocto.bc.bitbake.BBSession; import org.yocto.bc.bitbake.ProjectInfoHelper;
import org.yocto.bc.bitbake.ShellSession;
import org.yocto.bc.remote.utils.RemoteHelper;
+import org.yocto.bc.ui.Activator;
import org.yocto.bc.ui.model.ProjectInfo;
import org.yocto.bc.ui.model.YoctoHostFile;

@@ -58,6 +59,10 @@ public class OEFile extends FileStore {
*/
protected final String filePath;

+ public String getFilePath() {
+ return filePath;
+ }
+
private final URI root;

/**
@@ -84,17 +89,18 @@ public class OEFile extends FileStore {
*/
private boolean isPotentialBuildDir(String path) {
String parentPath = path.substring(0, path.lastIndexOf("/"));
+ String name = path.substring(path.lastIndexOf("/") + 1);
boolean ret = true;
try {
IFileService fs = file.getFileService();
- IHostFile hostFile = fs.getFile(parentPath, path, new NullProgressMonitor());
+ IHostFile hostFile = fs.getFile(parentPath, name, new
+NullProgressMonitor());
if (!hostFile.isDirectory())
return false;
- IHostFile confDir = fs.getFile(path, path + BBSession.CONF_DIR, new NullProgressMonitor());
+ IHostFile confDir = fs.getFile(path, BBSession.CONF_DIR, new
+NullProgressMonitor());
if (!confDir.exists() || !confDir.isDirectory())
return false;
for (int i = 0; i < BBSession.BUILDDIR_INDICATORS.length && ret == true; i++) {
- IHostFile child = fs.getFile(path, path + BBSession.CONF_DIR + BBSession.BUILDDIR_INDICATORS[i], new NullProgressMonitor());
+ IHostFile child = fs.getFile(path + "/" + BBSession.CONF_DIR,
+BBSession.BUILDDIR_INDICATORS[i], new NullProgressMonitor());
if(!child.exists() || !child.isFile()) {
ret = false;
break;
@@ -114,10 +120,11 @@ public class OEFile extends FileStore {
if(isPotentialBuildDir(path)) {
BBSession config = null;
try {
- ShellSession shell = new ShellSession(file.getProjectInfo(), ShellSession.SHELL_TYPE_BASH,
- RemoteHelper.getRemoteHostFile(file.getConnection(), root.getPath(), new NullProgressMonitor()),
- ProjectInfoHelper.getInitScriptPath(root) + " " + path, null);
- config = new BBSession(shell, root, true);
+// ShellSession shell = new ShellSession(file.getProjectInfo(), ShellSession.SHELL_TYPE_BASH,
+// RemoteHelper.getRemoteHostFile(file.getConnection(), root.getPath(), new NullProgressMonitor()),
+// ProjectInfoHelper.getInitScriptPath(root) + " " + path, null);
+// config = new BBSession(shell, root, true);
+ config = Activator.getBBSession(Activator.getProjInfo(root),
+monitor);
config.initialize();
} catch(Exception e) {
e.printStackTrace();
@@ -146,7 +153,7 @@ public class OEFile extends FileStore {
IFileStore[] wrapped = new IFileStore[children.length];

for (int i = 0; i < wrapped.length; i++) {
- String fullPath = file.getAbsolutePath() + File.separatorChar + children[i];
+ String fullPath = file.getAbsolutePath() + "/" + children[i];

updateIgnorePaths(fullPath, ignoredPaths, monitor);
if (ignoredPaths.contains(fullPath)) { @@ -164,23 +171,7 @@ public class OEFile extends FileStore {
if (destFileStore instanceof OEFile) {
file.copy(destFileStore, monitor);

-// File source = file;
-// File destination = ((OEFile) destFile).file;
-// //handle case variants on a case-insensitive OS, or copying between
-// //two equivalent files in an environment that supports symbolic links.
-// //in these nothing needs to be copied (and doing so would likely lose data)
-// try {
-// if (source.getCanonicalFile().equals(destination.getCanonicalFile())) {
-// //nothing to do
-// return;
-// }
-// } catch (IOException e) {
-// String message = NLS.bind(Messages.couldNotRead, source.getAbsolutePath());
-// Policy.error(EFS.ERROR_READ, message, e);
-// }
}
- //fall through to super implementation
-// super.copy(destFileStore, options, monitor);
}

@Override
@@ -372,17 +363,6 @@ public class OEFile extends FileStore {

@Override
public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException {
-// boolean shallow = (options & EFS.SHALLOW) != 0;
-// //must be a directory
-// if (shallow)
-// file.mkdir();
-// else
-// file.mkdirs();
-// if (!file.isDirectory()) {
-// checkReadOnlyParent(file, null);
-// String message = NLS.bind(Messages.failedCreateWrongType, filePath);
-// Policy.error(EFS.ERROR_WRONG_TYPE, message);
-// }
file.mkdir(options);
return this;
}
@@ -390,64 +370,6 @@ public class OEFile extends FileStore {
@Override
public void move(IFileStore destFile, int options, IProgressMonitor monitor) throws CoreException {
file.move(destFile, monitor);
-// if (!(destFile instanceof OEFile)) {
-// super.move(destFile, options, monitor);
-// return;
-// }
-// File source = file;
-// File destination = ((OEFile) destFile).file;
-// boolean overwrite = (options & EFS.OVERWRITE) != 0;
-// monitor = Policy.monitorFor(monitor);
-// try {
-// monitor.beginTask(NLS.bind(Messages.moving, source.getAbsolutePath()), 10);
-// //this flag captures case renaming on a case-insensitive OS, or moving
-// //two equivalent files in an environment that supports symbolic links.
-// //in these cases we NEVER want to delete anything
-// boolean sourceEqualsDest = false;
-// try {
-// sourceEqualsDest = source.getCanonicalFile().equals(destination.getCanonicalFile());
-// } catch (IOException e) {
-// String message = NLS.bind(Messages.couldNotMove, source.getAbsolutePath());
-// Policy.error(EFS.ERROR_WRITE, message, e);
-// }
-// if (!sourceEqualsDest && !overwrite && destination.exists()) {
-// String message = NLS.bind(Messages.fileExists, destination.getAbsolutePath());
-// Policy.error(EFS.ERROR_EXISTS, message);
-// }
-// if (source.renameTo(destination)) {
-// // double-check to ensure we really did move
-// // since java.io.File#renameTo sometimes lies
-// if (!sourceEqualsDest && source.exists()) {
-// // XXX: document when this occurs
-// if (destination.exists()) {
-// // couldn't delete the source so remove the destination and throw an error
-// // XXX: if we fail deleting the destination, the destination (root) may still exist
-// new OEFile(destination, ignoredPaths, root).delete(EFS.NONE, null);
-// String message = NLS.bind(Messages.couldnotDelete, source.getAbsolutePath());
-// Policy.error(EFS.ERROR_DELETE, message);
-// }
-// // source exists but destination doesn't so try to copy below
-// } else {
-// if (!destination.exists()) {
-// // neither the source nor the destination exist. this is REALLY bad
-// String message = NLS.bind(Messages.failedMove, source.getAbsolutePath(), destination.getAbsolutePath());
-// Policy.error(EFS.ERROR_WRITE, message);
-// }
-// //the move was successful
-// monitor.worked(10);
-// return;
-// }
-// }
-// // for some reason renameTo didn't work
-// if (sourceEqualsDest) {
-// String message = NLS.bind(Messages.couldNotMove, source.getAbsolutePath());
-// Policy.error(EFS.ERROR_WRITE, message, null);
-// }
-// // fall back to default implementation
-// super.move(destFile, options, Policy.subMonitorFor(monitor, 10));
-// } finally {
-// monitor.done();
-// }
}

@Override
@@ -470,9 +392,6 @@ public class OEFile extends FileStore {
*/
@Override
public File toLocalFile(int options, IProgressMonitor monitor) throws CoreException {
-// if (options == EFS.CACHE)
-// return super.toLocalFile(options, monitor);
-// return file;
return file.toLocalFile();
}

@@ -495,4 +414,8 @@ public class OEFile extends FileStore {
public ProjectInfo getProjectInfo() {
return file.getProjectInfo();
}
+
+ public String getParentPath() {
+ return filePath.substring(0, filePath.lastIndexOf("/"));
+ }
}
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/YoctoLocation.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/YoctoLocation.java
new file mode 100755
index 0000000..1e069a3
--- /dev/null
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/YoctoLocati
+++ on.java
@@ -0,0 +1,36 @@
+package org.yocto.bc.ui.filesystem;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+public class YoctoLocation{
+ URI oefsURI;
+ URI originalURI;
+
+ public YoctoLocation(){
+ try {
+ oefsURI = new URI("");
+ originalURI = new URI("");
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public URI getOEFSURI() {
+ return oefsURI;
+ }
+
+ public URI getOriginalURI() {
+ return originalURI;
+ }
+
+ public void setOriginalURI(URI originalURI) {
+ this.originalURI = originalURI;
+ }
+
+ public void setOEFSURI(URI uri) {
+ this.oefsURI = uri;
+ }
+
+
+}
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/ProjectInfo.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/ProjectInfo.java
index 089c1ac..743a754 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/ProjectInfo.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/ProjectInfo.java
@@ -11,19 +11,21 @@
package org.yocto.bc.ui.model;

import java.net.URI;
+import java.net.URISyntaxException;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.ptp.remote.core.IRemoteServices;
import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.services.files.IFileService;
+import org.yocto.bc.bitbake.ProjectInfoHelper;
import org.yocto.bc.remote.utils.RemoteHelper;
+import org.yocto.bc.ui.filesystem.YoctoLocation;


public class ProjectInfo implements IModelElement {
private String name;
- private URI location;
- private URI oefsLocation;
+ private YoctoLocation location;
private String init;
private IHost connection;
private IRemoteServices remoteServices; @@ -37,13 +39,13 @@ public class ProjectInfo implements IModelElement {
public String getProjectName() {
return name;
}
- public URI getURI() {
- return location;
+ public URI getOriginalURI() {
+ return location.getOriginalURI();
}
@Override
public void initialize() throws Exception {
name = new String();
- location = new URI("");
+ location = new YoctoLocation();
init = new String();
}

@@ -51,8 +53,20 @@ public class ProjectInfo implements IModelElement {
this.init = init;
}

- public void setLocation(URI location) {
- this.location = location;
+ public void setLocationURI(URI location) {
+ if (this.location == null)
+ this.location = new YoctoLocation();
+ this.location.setOriginalURI(location);
+ try {
+ this.location.setOEFSURI(new URI(ProjectInfoHelper.OEFS_SCHEME + location.getPath() ));
+ } catch (URISyntaxException e) {
+ try {
+ this.location.setOEFSURI(new URI(""));
+ } catch (URISyntaxException e1) {
+ e1.printStackTrace();
+ }
+ e.printStackTrace();
+ }
}

public void setName(String name) {
@@ -61,7 +75,7 @@ public class ProjectInfo implements IModelElement {

public IHost getConnection() {
if (connection == null) {
- connection = RemoteHelper.getRemoteConnectionForURI(location, new NullProgressMonitor());
+ connection =
+RemoteHelper.getRemoteConnectionForURI(location.getOriginalURI(), new
+NullProgressMonitor());
}
return connection;
}
@@ -87,11 +101,7 @@ public class ProjectInfo implements IModelElement {
}
}

- public URI getOefsLocation() {
- return oefsLocation;
- }
-
- public void setOefsLocation(URI oefsLocation) {
- this.oefsLocation = oefsLocation;
+ public URI getOEFSURI() {
+ return location.getOEFSURI();
}
}
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/YoctoHostFile.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/YoctoHostFile.java
index ca5a960..db5b37c 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/YoctoHostFile.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/YoctoHostFile.ja
+++ va
@@ -21,6 +21,7 @@ import org.eclipse.rse.services.files.IFileService;
import org.eclipse.rse.services.files.IHostFile;
import org.yocto.bc.remote.utils.RemoteHelper;
import org.yocto.bc.ui.filesystem.Messages;
+import org.yocto.bc.ui.filesystem.OEFile;
import org.yocto.bc.ui.filesystem.Policy;

public class YoctoHostFile implements IHostFile{ @@ -33,12 +34,8 @@ public class YoctoHostFile implements IHostFile{
this.projectInfo = pInfo;
this.fileURI = fileURI;
String path = fileURI.getPath();
-// int parentEnd = path.lastIndexOf("/");
-// String parentPath = path.substring(0, parentEnd);
-// String fileName = path.substring(parentEnd + 1);
fileService = projectInfo.getFileService(monitor);
file = RemoteHelper.getRemoteHostFile(projectInfo.getConnection(), path, monitor);
-// fileService.getFile(parentPath, fileName, monitor);
}

public YoctoHostFile(ProjectInfo projectInfo, URI uri) { @@ -67,11 +64,11 @@ public class YoctoHostFile implements IHostFile{
return file.getName();
}
public URI getProjectLocationURI() {
- return projectInfo.getURI();
+ return projectInfo.getOriginalURI();
}
public URI getLocationURI() {
- projectInfo.getURI().getPath().indexOf(file.getAbsolutePath());
- return projectInfo.getURI();
+ projectInfo.getOriginalURI().getPath().indexOf(file.getAbsolutePath());
+ return projectInfo.getOriginalURI();
}
@Override
public boolean isDirectory() {
@@ -84,7 +81,9 @@ public class YoctoHostFile implements IHostFile{
public boolean copy(IFileStore destFileStore, IProgressMonitor monitor) {
IHostFile destFile;
try {
- destFile = fileService.createFile(destFileStore.getParent().toURI().getPath(), destFileStore.getName(), monitor);
+ OEFile oeFile = (OEFile)destFileStore;
+ String parentPath = oeFile.getParentPath();
+ destFile = fileService.createFile(parentPath,
+destFileStore.getName(), monitor);
fileService.copy(file.getParentPath(), file.getName(), destFile.getParentPath(), destFile.getName(), monitor);
} catch (SystemMessageException e) {
e.printStackTrace();
@@ -250,7 +249,10 @@ public class YoctoHostFile implements IHostFile{

public URI getChildURIformPath(IPath path) {
try {
- return new URI(fileURI.getScheme(), fileURI.getHost(), fileService.getFile(file.getAbsolutePath(), path.toPortableString(), null).getAbsolutePath(), fileURI.getFragment());
+ String fileName = path.lastSegment();
+ path = path.removeLastSegments(1);
+ String newPath = fileService.getFile(file.getAbsolutePath() + "/" + path.toPortableString(), fileName, null).getAbsolutePath();
+ return new URI(fileURI.getScheme(), fileURI.getHost(), newPath,
+fileURI.getFragment());
} catch (URISyntaxException e) {
e.printStackTrace();
return null;
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizardPage.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizardPage.java
index dd6feea..633dc89 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizardPage.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFile
+++ RecipeWizardPage.java
@@ -25,6 +25,7 @@ import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
@@ -52,6 +53,8 @@ import org.eclipse.ui.dialogs.ContainerSelectionDialog;
import org.yocto.bc.remote.utils.ProcessStreamBuffer;
import org.yocto.bc.remote.utils.RemoteHelper;
import org.yocto.bc.remote.utils.YoctoCommand;
+import org.yocto.bc.ui.Activator;
+import org.yocto.bc.ui.model.ProjectInfo;

public class NewBitBakeFileRecipeWizardPage extends WizardPage {
private Text containerText;
@@ -246,7 +249,17 @@ public class NewBitBakeFileRecipeWizardPage extends WizardPage {
}

IProject project = container.getProject();
- metaDirLoc = RemoteHelper.createNewURI(project.getLocationURI(), "meta");
+ ProjectInfo projInfo = null;
+ try {
+ projInfo = Activator.getProjInfo(project.getLocationURI());
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ metaDirLoc = RemoteHelper.createNewURI(projInfo.getOriginalURI(),
+"meta");

if (fileName.length() == 0) {
updateStatus("File name must be specified"); @@ -356,7 +369,7 @@ public class NewBitBakeFileRecipeWizardPage extends WizardPage {

updateTempFolderPath();
monitor.worked(10);
-
+
monitor.subTask("Downloading package sources");

updateTempFolderPath();
@@ -365,7 +378,7 @@ public class NewBitBakeFileRecipeWizardPage extends WizardPage {
RemoteHelper.handleRunCommandRemote(connection, wgetYCmd, new SubProgressMonitor(monitor, 40));

monitor.worked(50);
-
+
monitor.subTask("Compute package checksums");
String md5Cmd = "md5sum " + srcFileNameExt;
YoctoCommand md5YCmd = new YoctoCommand(md5Cmd, tempFolderPath, ""); diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/importProject/ImportYoctoProjectWizard.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/importProject/ImportYoctoProjectWizard.java
index 5e37133..82c5ab3 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/importProject/ImportYoctoProjectWizard.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/importProject/
+++ ImportYoctoProjectWizard.java
@@ -67,7 +67,7 @@ public class ImportYoctoProjectWizard extends FiniteStateWizard implements IImp
public boolean performFinish() {
ProjectInfo pinfo = new ProjectInfo();
pinfo.setInitScriptPath((String) projectModel.get(ImportYoctoProjectWizard.KEY_INITPATH));
- pinfo.setLocation((URI) projectModel.get(ImportYoctoProjectWizard.KEY_LOCATION));
+ pinfo.setLocationURI((URI)
+projectModel.get(ImportYoctoProjectWizard.KEY_LOCATION));
pinfo.setName((String) projectModel.get(ImportYoctoProjectWizard.KEY_NAME));

try {
@@ -86,7 +86,7 @@ public class ImportYoctoProjectWizard extends FiniteStateWizard implements IImp
projectModel.put(ImportYoctoProjectWizard.KEY_PINFO, pinfo);
//setPageComplete(valid);
//ProjectInfo pinfo = (ProjectInfo) projectModel.get(KEY_PINFO);
- Activator.putProjInfo(pinfo.getURI(), pinfo);
+ Activator.putProjInfo(pinfo.getOEFSURI(), pinfo);
try {
getContainer().run(false, false, new CreateBBCProjectOperation(pinfo));
} catch (Exception e) {
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/InstallWizard.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/InstallWizard.java
index 071f6aa..100eee3 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/InstallWizard.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/Instal
+++ lWizard.java
@@ -141,7 +141,7 @@ public class InstallWizard extends FiniteStateWizard implements IWorkbenchWizard
String prjName = (String) options.get(PROJECT_NAME);
ProjectInfo pinfo = new ProjectInfo();
pinfo.setInitScriptPath(initPath);
- pinfo.setLocation(uri);
+ pinfo.setLocationURI(uri);
pinfo.setName(prjName);
pinfo.setConnection(connection);
pinfo.setRemoteServices(remoteServices);
@@ -153,7 +153,7 @@ public class InstallWizard extends FiniteStateWizard implements IWorkbenchWizard
console.newMessageStream().println(cw.getContents());

model.put(InstallWizard.KEY_PINFO, pinfo);
- Activator.putProjInfo(pinfo.getURI(), pinfo);
+ Activator.putProjInfo(pinfo.getOEFSURI(), pinfo);

container.run(false, false, new CreateBBCProjectOperation(pinfo));
return true;
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 486bd8b..f8ef0d2 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/Option
+++ sPage.java
@@ -23,6 +23,7 @@ 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.IFileService;
import org.eclipse.rse.services.files.IHostFile;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData; @@ -169,7 +170,12 @@ public class OptionsPage extends FiniteStateWizardPage {
return false;
}
} else { //git clone
- if (repoDest.exists() && repoDest.isDirectory()) {
+ if (repoDest != null && repoDest.exists() && repoDest.isDirectory()) {
+ IHostFile[] hostFiles = RemoteHelper.getRemoteDirContent(connection, repoDest.getAbsolutePath(), "", IFileService.FILE_TYPE_FILES_AND_FOLDERS, new NullProgressMonitor());
+ if (hostFiles.length != 0) {
+ setErrorMessage("Directory " + projectPath + " is not empty, please choose another location.");
+ return false;
+ }
IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor());
if (gitDescr != null && gitDescr.exists()) {
setErrorMessage("Directory " + projectPath + " contains a repository, please choose another location or skip cloning the repository."); 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 942f303..5dd8944 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/BBC
+++ onfigurationInitializeOperation.java
@@ -42,7 +42,7 @@ public class BBConfigurationInitializeOperation implements IRunnableWithProgress
try {
System.out.println("Initialize bitbake session ...");
monitor.beginTask("Initialize bitbake session ...", RemoteHelper.TOTALWORKLOAD);
- ProjectInfoHelper.store(RemoteHelper.getRemoteConnectionByName(pinfo.getConnection().getName()), pinfo.getURI(), pinfo, monitor);
+
+ProjectInfoHelper.store(RemoteHelper.getRemoteConnectionByName(pinfo.ge
+tConnection().getName()), pinfo.getOriginalURI(), pinfo, monitor);
session = Activator.getBBSession(pinfo, writer, monitor);
session.initialize();
monitor.worked(90);
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 5ba661c..338c2e6 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/Cre
+++ ateBBCProjectOperation.java
@@ -67,12 +67,7 @@ public class CreateBBCProjectOperation extends WorkspaceModifyOperation {
private IProjectDescription createProjectDescription(IWorkspace workspace, ProjectInfo projInfo) throws CoreException {
IProjectDescription desc = workspace.newProjectDescription(projInfo.getProjectName());

-// desc.setLocationURI(projInfo.getURI());
- try {
- desc.setLocationURI(new URI(ProjectInfoHelper.OEFS_SCHEME + projInfo.getURI().getPath()));
- } catch (URISyntaxException e) {
- throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Unable to load filesystem.", e));
- }
+ desc.setLocationURI(projInfo.getOEFSURI());
return desc;
}

--
1.7.9.5

_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto


Re: Installation of i686 SDK on a x86_64 machine?

Wolfgang Denk <wd@...>
 

Dear Laurentiu,

In message <50FE4900.7020804@...> you wrote:

in previous releases it ha always been possible to install a SDK
configured for a i686 machine on both x86 and x86_64 systems.

Since commit c04f5435 "populate_sdk_base.bbclass: use SDK_ARCH instead
of SDKMACHINE" this does not work any more; instead, installation will
abort with "Error: Installation machine not supported!"
...

Is this intended behaviour (and if so, why?) or rather a bug that
should be reported and fixed?
This is the intended behavior. Please check:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=3269
Sorry, but this bug is about a different problem - the fix overshoots
the mark.

The following combinations of SDK_ARCH and INST_ARCH are possible and
relevant here:

Id SDK_ARCH INST_ARCH Status
==============================================
1 ix86 ix86 works
2 ix86 x86_64 works
3 x86_64 ix86 cannot work
4 x86_64 x86_64 works

The bug report is about case 3 - attempting to install a 64 bit SDK on
a 32 bit machine. This indeed cannot work and shuld be prevented byy
the installer.

But the current code also prevents case 2, installing 32 bit images on
a 64 bit machine, which works perfectly fine (assuming you have the
needed 32 bit libraries installed).

For any distribution it is very convenient to provide only one set of
images (configured for ix86), as these images will work both on 32 and
64 bit systems.

I consider it a major drawback if you intentionally prevent such use.

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'm not a god, I was misquoted." - Lister, Red Dwarf


Re: FW: YP Linux Kernel Development Manual

Christian Ege <christian.ege@...>
 

Hi,
I am not sure if this is the problem you are struggling with.
I am wondering why class module.bbclass behaves completely different
than kernel.bbclacc

hi, I follow the kernel development manual "2.5. Incorporating
Out-of-Tree Modules",
copy the "hello-mod_0.1.bb" and "files" folder into my taget layer
"meta-intel/meta-jasperforest/recipe-kernel", then add "MACHINE_EXTRA_
RDEPENDS += "kernel-module-hello" in the conf/local.conf
after build and boot, there's no "hello.ko" found in the binary image
also there's no hello.ko in the "tmp/work/..." folder
If you hello-mod_0.1.bb inherits module class there is no mechanism
to create the kernel-module package. This only applies to the kernel.bbclass

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/module.bbclass
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/module-base.bbclass

Have a look at kernel.bbclass instead shows some pathon code which handles the module package creation:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/kernel.bbclass#n301

I've fixed this in my layer by stealing the code from kernel.bbclass
https://github.com/project-magpie/meta-stlinux/blob/master/recipes-bsp/tdt-driver/tdt-driver.inc

With this you can also use the following extends with your module:
module_autoload_aotom = "aotom"
and
module_conf_stmfb = "options stmfb display0=1280x720-32@50:8m:pal:yuv:yuv"

If you are only inherting from module this have not worked for me.

The next part I had to fight against was the fact that in core-image-minimal the package managment information are stripped and thus no pre hooks are executet. So the module is installed in the image but not loaded on boot-up unless you call update-modules by hand.

ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; "

To prevent this I've defined an image without the stripping:
https://github.com/project-magpie/meta-stlinux/blob/master/recipes-core/images/core-image-base.bb

I hope this clarify things a little bit


regards,
Christian


Eddy

All,

There is a new YP manual under development. It is a development manual
for Linux kernels in the YP. Darren Hart is the original author of the
manual as you probably know. It is still being worked on but it is in
HTML form and now part of the yocto-docs/master branch. It is
published at
http://www.yoctoproject.org/docs/1.4/kernel-dev/kernel-dev.html [1].
Feel free to access it and comment.

Thanks,

Scott

Scott Rifenbark

Intel Corporation

Yocto Project Documentation

503.712.2702

503.341.0418 (cell)

_______________________________________________

yocto mailing list

yocto@... [2]

https://lists.yoctoproject.org/listinfo/yocto [3]



Links:
------
[1] http://www.yoctoproject.org/docs/1.4/kernel-dev/kernel-dev.html
[2] mailto:yocto@...
[3] https://lists.yoctoproject.org/listinfo/yocto
Hi,

I am reposting this to the discussion list and copying Darren Hart.

Scott

FROM: Eddy Lai GMail [mailto:eddy.lai.tw@...]
SENT: Monday, January 21, 2013 3:36 PM
TO: Rifenbark, Scott M
SUBJECT: Re: [yocto] YP Linux Kernel Development Manual

hi

hi, I follow the kernel development manual "2.5. Incorporating
Out-of-Tree Modules",
copy the "hello-mod_0.1.bb" and "files" folder into my taget layer
"meta-intel/meta-jasperforest/recipe-kernel", then add "MACHINE_EXTRA_
RDEPENDS += "kernel-module-hello" in the conf/local.conf
after build and boot, there's no "hello.ko" found in the binary image
also there's no hello.ko in the "tmp/work/..." folder

Eddy

All,

There is a new YP manual under development. It is a development manual
for Linux kernels in the YP. Darren Hart is the original author of the
manual as you probably know. It is still being worked on but it is in
HTML form and now part of the yocto-docs/master branch. It is
published at
http://www.yoctoproject.org/docs/1.4/kernel-dev/kernel-dev.html [1].
Feel free to access it and comment.

Thanks,

Scott

Scott Rifenbark

Intel Corporation

Yocto Project Documentation

503.712.2702

503.341.0418 (cell)

_______________________________________________

yocto mailing list

yocto@... [2]

https://lists.yoctoproject.org/listinfo/yocto [3]



Links:
------
[1] http://www.yoctoproject.org/docs/1.4/kernel-dev/kernel-dev.html
[2] mailto:yocto@...
[3] https://lists.yoctoproject.org/listinfo/yocto


Re: Installation of i686 SDK on a x86_64 machine?

Laurentiu Palcu <laurentiu.palcu@...>
 

Hi Wolfgang,

On 01/22/2013 09:16 AM, Wolfgang Denk wrote:
Hi,

in previous releases it ha always been possible to install a SDK
configured for a i686 machine on both x86 and x86_64 systems.

Since commit c04f5435 "populate_sdk_base.bbclass: use SDK_ARCH instead
of SDKMACHINE" this does not work any more; instead, installation will
abort with "Error: Installation machine not supported!"

++ uname -m
++ sed -e 's/i[3-6]86/ix86/' -e 's/x86[-_]64/x86_64/'
+ INST_ARCH=x86_64
++ echo i686
++ sed -e 's/i[5-6]86/ix86/'
+ SDK_ARCH=ix86
+ '[' x86_64 '!=' ix86 ']'
+ echo 'Error: Installation machine not supported!'
Error: Installation machine not supported!
+ exit -1


Is this intended behaviour (and if so, why?) or rather a bug that
should be reported and fixed?
This is the intended behavior. Please check:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=3269

Also, this thread:
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-November/031519.html

If people really need to install SDK tarballs intended for other hosts
than the SDK was built for (i686 on x86_64 or vice-versa), we could add
a -f flag to force installation and show an error message like this:

"Error: Installation machine not supported! Use -f to force installation."

Thanks,
Laurentiu


Thanks in advance.

Best regards,

Wolfgang Denk


Installation of i686 SDK on a x86_64 machine?

Wolfgang Denk <wd@...>
 

Hi,

in previous releases it ha always been possible to install a SDK
configured for a i686 machine on both x86 and x86_64 systems.

Since commit c04f5435 "populate_sdk_base.bbclass: use SDK_ARCH instead
of SDKMACHINE" this does not work any more; instead, installation will
abort with "Error: Installation machine not supported!"

++ uname -m
++ sed -e 's/i[3-6]86/ix86/' -e 's/x86[-_]64/x86_64/'
+ INST_ARCH=x86_64
++ echo i686
++ sed -e 's/i[5-6]86/ix86/'
+ SDK_ARCH=ix86
+ '[' x86_64 '!=' ix86 ']'
+ echo 'Error: Installation machine not supported!'
Error: Installation machine not supported!
+ exit -1


Is this intended behaviour (and if so, why?) or rather a bug that
should be reported and fixed?

Thanks in advance.

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@...
If there was anything that depressed him more than his own cynicism,
it was that quite often it still wasn't as cynical as real life.
- Terry Pratchett, _Guards! Guards!_


M2, M3, M4 milestones available?

Wolfgang Denk <wd@...>
 

Hello,

I wonder if the M2, M3 and M4 milestones have been reached already?
The release schedule [1] says they were due on Nov 26 2012, Dec 24
2012 and Jan 11 2013 respectively, and even lists bugs against these.

[1] https://wiki.yoctoproject.org/wiki/Yocto_1.4_Schedule


However, I cannot find any other git tags but 1.4_M1.rc1 and
1.4_M1.final

So are these later milestones available somewhere?


Thanks in advance.

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@...
Neckties strangle clear thinking. -- Lin Yutang


FW: YP Linux Kernel Development Manual

Rifenbark, Scott M <scott.m.rifenbark@...>
 

Hi,

 

I am reposting this to the discussion list and copying Darren Hart.

 

Scott

 

From: Eddy Lai GMail [mailto:eddy.lai.tw@...]
Sent: Monday, January 21, 2013 3:36 PM
To: Rifenbark, Scott M
Subject: Re: [yocto] YP Linux Kernel Development Manual

 

hi

hi, I follow the kernel development manual "2.5. Incorporating Out-of-Tree Modules",
copy the "hello-mod_0.1.bb" and "files" folder into my taget layer "meta-intel/meta-jasperforest/recipe-kernel", then add "MACHINE_EXTRA_ RDEPENDS += "kernel-module-hello" in the conf/local.conf
after build and boot, there's no "hello.ko" found in the binary image
also there's no hello.ko in the "tmp/work/..." folder

Eddy

All, 
 
There is a new YP manual under development.  It is a development manual for Linux kernels in the YP.  Darren Hart is the original author of the manual as you probably know.  It is still being worked on but it is in HTML form and now part of the yocto-docs/master branch.  It is published at http://www.yoctoproject.org/docs/1.4/kernel-dev/kernel-dev.html.  Feel free to access it and comment.
 
Thanks, 
Scott
 
Scott Rifenbark
Intel Corporation
Yocto Project Documentation
503.712.2702
503.341.0418 (cell)
 
 
_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto

 


[meta-mono][PATCH 2/2] monotools-server: Remove multiline comment

Khem Raj
 

bitbake/master does not like it anymore

Signed-off-by: Khem Raj <raj.khem@...>
---
.../monotools-server/monotools-server_2.0.bb | 2 --
1 file changed, 2 deletions(-)

diff --git a/recipes-mono/monotools-server/monotools-server_2.0.bb b/recipes-mono/monotools-server/monotools-server_2.0.bb
index 551c586..ef738da 100644
--- a/recipes-mono/monotools-server/monotools-server_2.0.bb
+++ b/recipes-mono/monotools-server/monotools-server_2.0.bb
@@ -22,8 +22,6 @@ SRC_URI += " \
file://fix-pkglib_SCRIPTS.patch \
"

-# file://Makefile-pkglib.patch \
-
DEPENDS = "mono-xsp gtk-sharp"

S = "${WORKDIR}/${PN}"
--
1.7.9.5


[meta-mono][PATCH 1/2] layer.conf: Use .= for adding to BBPATH and += to BBFILES

Khem Raj
 

Fixes parsing errors which is appearing after this commit to
meta-openembedded

http://cgit.openembedded.org/meta-openembedded/commit/?id=3c21a46020bd0816579648f

This triggers
exception NameError: name 'base_contains' is not defined
without this change

Signed-off-by: Khem Raj <raj.khem@...>
---
conf/layer.conf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/conf/layer.conf b/conf/layer.conf
index 6bcf70e..d8cc797 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -1,8 +1,8 @@
# We have a conf and classes directory, add to BBPATH
-BBPATH := "${BBPATH}:${LAYERDIR}"
+BBPATH .= ":${LAYERDIR}"

# We have a recipes directory, add to BBFILES
-BBFILES := "${BBFILES} ${LAYERDIR}/recipes-mono/*/*.bb \
+BBFILES += "${LAYERDIR}/recipes-mono/*/*.bb \
${LAYERDIR}/recipes-mono/*/*.bbappend"

BBFILE_COLLECTIONS += "mono"
--
1.7.9.5


Re: Adding ALSA to the Yocto SDK

Patrick Turley <PatrickTurley@...>
 

On Jan 21, 2013, at 4:35 PM, "Zhang, Jessica" <jessica.zhang@...> wrote:

Hi Patrick,

Since you're able to add the dev packages to images, just do bitbake yourimagewithALSA -c populate_sdk, that should generate a SDK contains ALSA. By default, meta-toolchain-sdk is predefined unless you use "-c populate_sdk" to enforce the SDK sysroot to match your rootfs.

All the clues rolling in are starting to knit together.

At first, I regarded the "populate_sdk" task as a hack, since it seemed to be expressing something that was naturally a "target" -- not a "task."

Now I see that it is a way to connect an image to a corresponding SDK. That makes a *lot* more sense.


What are the other options to boot the Image if USB is NOT Detected from BIOS?

Bodke, Kishore K <kishore.k.bodke@...>
 

Hi,

 

I want to boot the Yocto Image for a new hardware platform, for which unfortunately the USB is not detectable in the BIOS (due to h/w issues)

 

Trying to find out what other options do we have if we cannot boot from USB?

Tried burning the CD  from an ISO image.  That did not work either.

Any pointers would be helpful.

 

Thanks

Kishore.


[ANNOUNCEMENT] Yocto 1.2.2 Released

Flanagan, Elizabeth <elizabeth.flanagan@...>
 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

The latest point release of the Yocto Project, 1.2.2 "denzil", is now
available for download at:

* http://downloads.yoctoproject.org/releases/yocto/yocto-1.2.2/poky-denzil-7.0.2.tar.bz2
* http://mirrors.kernel.org/yocto/yocto/yocto-1.2.2/poky-denzil-7.0.2.tar.bz2

Thanks go out to everyone for all their hard work during this release!

Sincerely,

Elizabeth Flanagan
Yocto Build and Release
<elizabeth.flanagan@...>

- --------------------
yocto-1.2.2 Errata
- --------------------
Release Name: eclipse-poky-denzil-7.0.2
Branch: denzil
Tag: denzil-7.0.2
Hash: 3c5c3e87fa63e89110abdfed3c5214a67e8383f9
md5: 5b89aaaddb3a205abcb0f3531f90c492
Download Locations:
http://downloads.yoctoproject.org/releases/yocto/yocto-1.2.2/eclipse-poky-denzil-7.0.2.tar.bz2
http://mirrors.kernel.org/yocto/yocto/yocto-1.2.2/eclipse-poky-denzil-7.0.2.tar.bz2

Release Name: meta-intel-denzil-7.0.2
Branch: denzil
Tag: denzil-7.0.2
Hash: 8f02d4f8600bbc69a4b5b7bc5128942949f6b8fa
md5: 6939121bebc8ec79688a437dc0d331a7
Download Locations:
http://downloads.yoctoproject.org/releases/yocto/yocto-1.2.2/meta-intel-denzil-7.0.2.tar.bz2
http://mirrors.kernel.org/yocto/yocto/yocto-1.2.2/meta-intel-denzil-7.0.2.tar.bz2

Release Name: meta-qt3-denzil-7.0.2
Branch: denzil
Tag: denzil-7.0.2
Hash: f8475d5c5935695d4d1dfff1d7be30f49e162094
md5: eabb129f5d9edd50609a4afdb0a73e27
Download Locations:
http://downloads.yoctoproject.org/releases/yocto/yocto-1.2.2/meta-qt3-denzil-7.0.2.tar.bz2
http://mirrors.kernel.org/yocto/yocto/yocto-1.2.2/meta-qt3-denzil-7.0.2.tar.bz2

Release Name: poky-denzil-7.0.2
Branch: denzil
Tag: denzil-7.0.2
Hash: 3456295898bf157e40ea1f8c335f0b7285d3d8a7
md5: 4a60c87d02fbdfe4ee9aed4258b99c4c
Download Locations:
http://downloads.yoctoproject.org/releases/yocto/yocto-1.2.2/poky-denzil-7.0.2.tar.bz2
http://mirrors.kernel.org/yocto/yocto/yocto-1.2.2/poky-denzil-7.0.2.tar.bz2

- --------------------
Features
- --------------------
* HOB fixes and improvements when working behind a network proxy
* Bitbake fetcher improvements in error-handling
* Performance fixes to improve write speeds on live images
* Updated to build properly on host OSes that use eglibc 2.16
* Fix for kernel menuconfig bug that was not triggering a rebuild after a
* config change
* linux-dtb: support multi-dtb build support
* Enable SSL support in curl (to allow git clones from https URIs)
* shadow: use 'users' group by default
* Buildhistory fixes
* yocto-bsp compatability improvements and bugfixes
* opkg-utils upgrade to add python v2.6 compatability
* Documentation updates
* Many fixes for edge case builds

- --------------------
Recipe Upgrades:
- --------------------
* libxml2 upgraded to 2.8.0 (security)
* openssl upgraded to 1.0.0j (security)
* xinetd upgraded to 2.3.15 (security)
* xz upgraded to 5.1.1alpha (compatability, fetcher)
* python-pygtk upgraded to 2.24.0 (compatability, build appliance
* improvements)
* bluez4 upgraded to 4.101 (compatability with other layers)
* bluez-hcidump upgraded to 2.4 (compatability with other layers)
* gst-plugin-bluetooth upgraded to 4.101 (compatability with other layers)
* pulseaudio upgraded to 2.1 (compatability with other layers)
* libcanberra upgraded to 0.29 (compatability with other layers)
* libatomics-ops upgraded to 7.2 (fix broken build)

- --------------------
Security Issues addressed
- --------------------
* CUPS: CVE-2011-2896
* freetype: CVE-2012-5668, 5669, and 5670
* libproxy: CVE-2012-4504
* librsvg: CVE-2011-3146
* libxml2: CVE-2011-1944, CVE-2012-2871
* openssl: CVE-2012-2333
* squashfs-tools: CVE-2012-4024 and 4025
* xinetd: CVE-2012-0862

- --------------------
Known Issues
- --------------------
Bug 3714 - hjl-tools missing from github.com for x32 kernel builds
Bug 3453 - Build fails when building multilib with ipk packaging
Bug 3686 - Errors when building headless build for eclipse-plugin 1.2.2
Bug 3693 - BUILDDIR error - when selecting kernel version in yocto bsp tool
for denzil (A fix for this is expected to be added to the denzil branch
in coming weeks)
Bug 3690 - Clutter - Unable to find suitable fbconfig for the GLX context
Bug 3695 - incorrect message when using ABORT in disk space monitoring
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iQEcBAEBAgAGBQJQ/atYAAoJEEyK+E/MEkQP+EYH/RAlHqGMbn5/+ZGwtSNQbtVH
7c4SE+EOVQ+adbTiz6JR0mIJOBcHb3QxTkUQdTgkqvZqcTQU/a8mqNKxIateMDpz
iJLUBG6BGoP/8ljhsYBsWYPLqtJsqO47N4t77VLAjeToin6fjClTA7yFdhLIAQ8j
4alUxBvvTbCLCuAS/+OtOuXzOSzdBpB9cBlTbXIy0NdTK3gMYiCQlBj94M7TvC3E
UeB6tYUymXDKAb5rsuKKQ70WeSgN6U16MBCoD+UsTUNQnjZrFLdqxPBdaP6guxAp
Jg0ZmXCyZ+7NMNOH4kHnz2A2byihmCWALGNFm3tDyAim3DMlJDwbwGdv4kbMe+c=
=U46t
-----END PGP SIGNATURE-----


Re: Adding ALSA to the Yocto SDK

Jack Mitchell <ml@...>
 

On 01/21/13 21:27, Patrick Turley wrote:
I've been working on re-targeting some code from a vendor's board to our own board.

For libraries and other low-level code, everything's been fine. For test applications, I'm running into a dependency on the header file alsa/asoundlib.h, which is obviously part of ALSA.

I've been building our SDK with:

bitbake meta-toolchain-sdk

This gives us most everything we need, but it does *not* include header files and libraries for ALSA. That actually seems perfectly reasonable to me -- not everyone needs ALSA support in their applications, so the *default* SDK shouldn't be burdened with that.

We *do* need it. As I see it, there are two possibilities:

1) There's something I can do that will cause OE/Yocto to include ALSA header files in the SDK I produce. If that's the case, can you tell me what I need to do?

2) The ALSA header files aren't *supposed* to be in the SDK -- I'm supposed to be delivering them to the compilation process in another way. If that's the case, can you tell me what I need to do?


Other items of note…

-- Executing "bitbake alsa-lib" *did* put the expected files within our sysroot (under tmp/sysroots). Even so (as we intuitively expected) executing "bitbake meta-toolchain-sdk" afterward did *not* put them into the SDK. We conclude that having a package built and available for the SDK doesn't necessarily get it into the SDK.

-- Adding ALSA to our image also caused the correct files to end up in our sysroot but, again, nothing appeared in the SDK. We conclude that the contents of the image do *not* dictate the contents of the SDK.

_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto
Hi Patrick,

I'm sure someone very knowledgeable wull be about soon. But if you're running a fairly recent build then you will be able to execute:

bitbake your-image -c populate_sdk

which will build a custom sdk which will match the libs and files on in 'your-image' exactly.

meta-toolchain-sdk is an odd beast, as it is not related to anything apart from being a generic toolchain with some base libs included. I also fell into this trap, in order to get a custom sdk which you can build like this, you must copy the meta-toolchain-sdk image and add/remove packages as you would in a target image.

Hope this helps!
Regards,
Jack.


Agenda: Yocto Project Technical Team Meeting - Tuesday, January 22, 2013 8:00 AM-9:00 AM (UTC-08:00) Pacific Time (US & Canada).

Liu, Song <song.liu@...>
 

Agenda:
 
* Opens collection - 5 min (Song)
* Yocto Project 1.2.2 status - 10 min (Scott/Beth)
* Yocto Project 1.3.1 status - 10 min (Ross)
* Yocto 1.4 status - 10 min (Song/team)
https://wiki.yoctoproject.org/wiki/Yocto_Project_v1.4_Status#Overview
* SWAT team rotation: Constantin Musca -> Bogdan Marinescu
* Opens - 10 min
* Team Sharing - 20 min


-----Original Appointment-----
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

Conference details
Conference name:
Yocto Technical Team
Conference date/start time:
Tue Jun 26, 2012 at 10:00 AM Central Daylight Time
Participants:
30
Duration:
60 minutes
Participant passcode:
76994298
Dial-in number:
1.972.995.7777
US Toll Free number:
1.877.561.6828
BlackBerry users, click this link to join your conference as a participant:
1.972.995.7777x76994298#
 
Depending on where you are dialing from, either your BlackBerry will pause and enter the passcode automatically or you will be prompted to click again to dial the passcode.

Local and Global Access Numbers


Country
Dial-in number
Australia:
1800 636 843
Czech Republic:
242 430 350
China (Beijing):
From office dial 8-9957777 or 8784277
Beijing Out of Office dial 5878 4277
China (Shanghai):
From office dial 8-9957777 or 3073322
Shanghai Out of Office dial 2307 3322
China (Shenzen):
From office dial 8-9957777 or 6007877
Shenzen Out of Office dial 2600 7877
China (Other Cities):
From IP phone dial 8-9957777
Other cities - Non IP phone dial 021-23073322
Denmark:
8060 1400
Finland:
09 41333477
France:
0497 275888
Germany:
08161 803232
Holland:
030 2417490
India:
BSNL subscribers use 1800 425 9996 (Toll Free)
Airtel subscribers use 0008 009 861 212 (Toll Free)
From TI Campus use 89957777
Others use 2509 9555 (Landline within Bangalore) or
80 2509 9555 (Outside Bangalore)
Israel:
09 790 6715
Italy:
039 69061234 (039 is local city code not country code)
Japan:
From TI Campus use 8 995 7777
Outside TI use 03 4331 3777
Malaysia:
From IP phone dial 2643799
From Kuala Lumpur dial 4264 3799
Outside Kuala Lumpur dial (03)4264 3799
Norway:
2 295 8744
Philippines:
From Baguio City use 4471177
From Metro Manila area use 8702477
Singapore:
From IP phone dial 3894777
Outside TI use 6389 4777
South Korea:
From IP phone dial 5606998
From Seoul dial 5606998
Outside Seoul dial (02)5606998
Sweden:
08 58755577
Taiwan:
From IP phone dial 1363
From Taipei dial 2241 1363
Outside Taipei dial (02)2241 1363
Turkey:
Landline Only dial 0811 288 0001
then enter 877 633 1123
UK:
01604 663003
US:
972 995 7777 or 1877 561 6828

Recurring conferences
First scheduled conference:
Tue Jun 26, 2012
Recurrence frequency:
Weekly - Every 1 week(s) on Tuesday
Recurrence ends:
End on Fri Jun 21, 2013, 10:40 AM CDT


Agenda: Yocto Project Technical Team Meeting - Tuesday, January 22, 2013 8:00 AM-9:00 AM (UTC-08:00) Pacific Time (US & Canada).

Liu, Song <song.liu@...>
 

Agenda:
 
* Opens collection - 5 min (Song)
* Yocto Project 1.2.2 status - 10 min (Scott/Beth)
* Yocto Project 1.3.1 status - 10 min :
* Yocto 1.4 status - 10 min (Song/team)
* SWAT team rotation: Constantin Musca -> Bogdan Marinescu
* Opens - 10 min
* Team Sharing - 20 min
 
 
-----Original Appointment-----
We encourage people attending the meeting to logon the Yocto IRC chancel during the meeting (optional):
 
 
Conference details
Conference name: Yocto Technical Team
Conference date/start time: Tue Jun 26, 2012 at 10:00 AM Central Daylight Time
Participants: 30
Duration: 60 minutes
Participant passcode: 76994298
Dial-in number: 1.972.995.7777
US Toll Free number: 1.877.561.6828
BlackBerry users, click this link to join your conference as a participant: 1.972.995.7777x76994298#
  Depending on where you are dialing from, either your BlackBerry will pause and enter the passcode automatically or you will be prompted to click again to dial the passcode.
Local and Global Access Numbers
 
Country Dial-in number
Australia: 1800 636 843
Czech Republic: 242 430 350
China (Beijing): From office dial 8-9957777 or 8784277
Beijing Out of Office dial 5878 4277
China (Shanghai): From office dial 8-9957777 or 3073322
Shanghai Out of Office dial 2307 3322
China (Shenzen): From office dial 8-9957777 or 6007877
Shenzen Out of Office dial 2600 7877
China (Other Cities): From IP phone dial 8-9957777
Other cities - Non IP phone dial 021-23073322
Denmark: 8060 1400
Finland: 09 41333477
France: 0497 275888
Germany: 08161 803232
Holland: 030 2417490
India: BSNL subscribers use 1800 425 9996 (Toll Free)
Airtel subscribers use 0008 009 861 212 (Toll Free)
From TI Campus use 89957777
Others use 2509 9555 (Landline within Bangalore) or
80 2509 9555 (Outside Bangalore)
Israel: 09 790 6715
Italy: 039 69061234 (039 is local city code not country code)
Japan: From TI Campus use 8 995 7777
Outside TI use 03 4331 3777
Malaysia: From IP phone dial 2643799
From Kuala Lumpur dial 4264 3799
Outside Kuala Lumpur dial (03)4264 3799
Norway: 2 295 8744
Philippines: From Baguio City use 4471177
From Metro Manila area use 8702477
Singapore: From IP phone dial 3894777
Outside TI use 6389 4777
South Korea: From IP phone dial 5606998
From Seoul dial 5606998
Outside Seoul dial (02)5606998
Sweden: 08 58755577
Taiwan: From IP phone dial 1363
From Taipei dial 2241 1363
Outside Taipei dial (02)2241 1363
Turkey: Landline Only dial 0811 288 0001
then enter 877 633 1123
UK: 01604 663003
US: 972 995 7777 or 1877 561 6828
 
Recurring conferences
First scheduled conference: Tue Jun 26, 2012
Recurrence frequency: Weekly - Every 1 week(s) on Tuesday
Recurrence ends: End on Fri Jun 21, 2013, 10:40 AM CDT
 
 
 
 
 


Re: Adding ALSA to the Yocto SDK

Zhang, Jessica
 

Hi Patrick,

Since you're able to add the dev packages to images, just do bitbake yourimagewithALSA -c populate_sdk, that should generate a SDK contains ALSA. By default, meta-toolchain-sdk is predefined unless you use "-c populate_sdk" to enforce the SDK sysroot to match your rootfs.

Cheers,
Jessica

-----Original Message-----
From: yocto-bounces@... [mailto:yocto-bounces@...] On Behalf Of Patrick Turley
Sent: Monday, January 21, 2013 1:27 PM
To: yocto@...
Subject: [yocto] Adding ALSA to the Yocto SDK

I've been working on re-targeting some code from a vendor's board to our own board.

For libraries and other low-level code, everything's been fine. For test applications, I'm running into a dependency on the header file alsa/asoundlib.h, which is obviously part of ALSA.

I've been building our SDK with:

bitbake meta-toolchain-sdk

This gives us most everything we need, but it does *not* include header files and libraries for ALSA. That actually seems perfectly reasonable to me -- not everyone needs ALSA support in their applications, so the *default* SDK shouldn't be burdened with that.

We *do* need it. As I see it, there are two possibilities:

1) There's something I can do that will cause OE/Yocto to include ALSA header files in the SDK I produce. If that's the case, can you tell me what I need to do?

2) The ALSA header files aren't *supposed* to be in the SDK -- I'm supposed to be delivering them to the compilation process in another way. If that's the case, can you tell me what I need to do?


Other items of note...

-- Executing "bitbake alsa-lib" *did* put the expected files within our sysroot (under tmp/sysroots). Even so (as we intuitively expected) executing "bitbake meta-toolchain-sdk" afterward did *not* put them into the SDK. We conclude that having a package built and available for the SDK doesn't necessarily get it into the SDK.

-- Adding ALSA to our image also caused the correct files to end up in our sysroot but, again, nothing appeared in the SDK. We conclude that the contents of the image do *not* dictate the contents of the SDK.

_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto


Re: [PATCH v2] [eclipse-poky][branch:windows-build]Performance fix for Windows implementation

Zhang, Jessica
 

Hi Ioana,

This patch seems not apply to the code of the latest windows-build, can you do a rebase?

Thanks,
Jessica

-----Original Message-----
From: yocto-bounces@... [mailto:yocto-bounces@...] On Behalf Of Ioana Grigoropol
Sent: Monday, January 21, 2013 6:37 AM
To: yocto@...
Subject: [yocto] [PATCH v2] [eclipse-poky][branch:windows-build]Performance fix for Windows implementation

- run each command in a separate shell - needs explicit sourcing of environment and closing for each command
- add distinction between OEFS URI and actual URI of the remote project and files -> YoctoLocation of the project contains both URIs
- use OEFS URI only for initialization of OEFSFileSystem,OEIgnoredPaths, OEFile (oefs://...)
- use actual URI (file:// or rse://) for all other operations (new file, copy, save, delete)
- tested only against Windows machine & RSE connection to BuildAppliance machine
IMPORTANT: please make sure that sshd configurations on the remote machine has variable MaxSessions set to a reasonable number (more than the default 10 sessions), otherwise an "Error creating terminal" will be thrown when more channels are opened for running remote commands (ChannelSftp)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@...>
---
.../src/org/yocto/bc/bitbake/BBRecipe.java | 2 +-
.../src/org/yocto/bc/bitbake/BBSession.java | 30 +++--
.../src/org/yocto/bc/bitbake/ShellSession.java | 10 +-
.../org/yocto/bc/remote/utils/CommandRunnable.java | 3 +-
.../org/yocto/bc/remote/utils/RemoteHelper.java | 19 ++++
.../org/yocto/bc/remote/utils/RemoteMachine.java | 31 +++---
.../src/org/yocto/bc/ui/Activator.java | 12 +-
.../editors/bitbake/BitBakeDocumentProvider.java | 27 +++--
.../bc/ui/editors/bitbake/BitBakeFileEditor.java | 2 +-
.../bitbake/BitBakeSourceViewerConfiguration.java | 20 +++-
.../src/org/yocto/bc/ui/filesystem/OEFile.java | 115 ++++----------------
.../org/yocto/bc/ui/filesystem/YoctoLocation.java | 36 ++++++
.../src/org/yocto/bc/ui/model/ProjectInfo.java | 38 ++++---
.../src/org/yocto/bc/ui/model/YoctoHostFile.java | 20 ++--
.../ui/wizards/NewBitBakeFileRecipeWizardPage.java | 19 +++-
.../importProject/ImportYoctoProjectWizard.java | 4 +-
.../yocto/bc/ui/wizards/install/InstallWizard.java | 4 +-
.../yocto/bc/ui/wizards/install/OptionsPage.java | 8 +-
.../BBConfigurationInitializeOperation.java | 2 +-
.../newproject/CreateBBCProjectOperation.java | 7 +-
20 files changed, 233 insertions(+), 176 deletions(-) create mode 100755 plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/YoctoLocation.java

diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBRecipe.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBRecipe.java
index 6d003ce..e8e8d30 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBRecipe.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBRecipe.java
@@ -23,7 +23,7 @@ public class BBRecipe extends BBSession {
private final URI fileURI;

public BBRecipe(BBSession session, URI filePath) throws IOException {
- super(session.shell, session.pinfo.getURI());
+ super(session.shell, session.pinfo.getOriginalURI());
this.session = session;
this.fileURI = filePath;
this.parsingCmd = "DISABLE_SANITY_CHECKS=\"1\" bitbake -e -b " + filePath.getPath() + " >& " + BB_ENV_FILE; diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java
index 9adeb3f..8a8de22 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java
@@ -15,6 +15,8 @@ import java.io.File;
import java.io.FileFilter;
import java.io.FileReader;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
@@ -33,15 +35,18 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status; import org.eclipse.jface.preference.JFacePreferences;
import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.rse.core.model.IHost;
import org.eclipse.ui.console.ConsolePlugin;
import org.eclipse.ui.console.IConsole; import org.eclipse.ui.console.IConsoleManager;
import org.eclipse.ui.console.MessageConsole;
import org.eclipse.ui.console.MessageConsoleStream;
import org.eclipse.ui.progress.WorkbenchJob;
+import org.yocto.bc.remote.utils.RemoteHelper;
import org.yocto.bc.ui.model.IModelElement;
import org.yocto.bc.ui.model.ProjectInfo;

@@ -60,10 +65,10 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {

public static final String BB_ENV_FILE = "bitbake.env";

- public static final String CONF_DIR = "/conf";
+ public static final String CONF_DIR = "conf";
public static final String BUILDDIR_INDICATORS [] = {
- "/local.conf",
- "/bblayers.conf",
+ "local.conf",
+ "bblayers.conf",
};

protected final ProjectInfo pinfo;
@@ -81,9 +86,9 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {
public BBSession(ShellSession ssession, URI projectRoot) throws IOException {
shell = ssession;
this.pinfo = new ProjectInfo();
- pinfo.setLocation(projectRoot);
+ pinfo.setLocationURI(projectRoot);
pinfo.setInitScriptPath(ProjectInfoHelper.getInitScriptPath(projectRoot));
- this.parsingCmd = "sh -c 'DISABLE_SANITY_CHECKS=\"1\" bitbake -e >& " + BB_ENV_FILE + " '" ;
+ this.parsingCmd = "DISABLE_SANITY_CHECKS=\"1\" bitbake -e >& " +
+BB_ENV_FILE;
}

public BBSession(ShellSession ssession, URI projectRoot, boolean silent) throws IOException { @@ -190,7 +195,7 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {
}

public URI getProjInfoRoot() {
- return pinfo.getURI();
+ return pinfo.getOriginalURI();
}

/**
@@ -271,7 +276,7 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {
*/
public MessageConsole getConsole() {
if (sessionConsole == null) {
- String cName = ProjectInfoHelper.getProjectName(pinfo.getURI()) + " Console";
+ String cName =
+ProjectInfoHelper.getProjectName(pinfo.getOriginalURI()) + " Console";
IConsoleManager conMan = ConsolePlugin.getDefault().getConsoleManager();
IConsole[] existing = conMan.getConsoles();
for (int i = 0; i < existing.length; i++) @@ -391,10 +396,10 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {
String result = shell.execute(parsingCmd, hasErrors);

//FIXME : wait for bitbake to finish
-
properties = parseBBEnvironment(result);

initialized = true;
+ //FIXME: cleanup BB env file
}
} finally {
//downgrade lock
@@ -453,7 +458,10 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {
}

protected void parse(String bbOutfilePath, Map outMap) throws Exception {
- BufferedReader reader = new BufferedReader(new FileReader(bbOutfilePath + BB_ENV_FILE));
+ IHost connection = shell.getProjectInfo().getConnection();
+ InputStream is = RemoteHelper.getRemoteInputStream(connection, bbOutfilePath, BB_ENV_FILE, new NullProgressMonitor());
+ RemoteHelper.getRemoteHostFile(connection, bbOutfilePath + BB_ENV_FILE, new NullProgressMonitor());
+ BufferedReader reader = new BufferedReader(new
+InputStreamReader(is));
String line;
boolean inLine = false;
StringBuffer sb = null;
@@ -769,4 +777,8 @@ public class BBSession implements IBBSessionListener, IModelElement, Map {
return (Map<String, String>) properties;
}

+ public ProjectInfo getProjectInfo() {
+ return pinfo;
+ }
+
}
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 ef01d96..6603bfb 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
@@ -78,6 +78,14 @@ public class ShellSession {
// private final Writer out;
private ProjectInfo projectInfo;

+ public ProjectInfo getProjectInfo() {
+ return projectInfo;
+ }
+
+ public void setProjectInfo(ProjectInfo projectInfo) {
+ this.projectInfo = projectInfo;
+ }
+
public ShellSession(ProjectInfo pInfo, int shellType, IHostFile root, String initCmd, Writer out) throws IOException {
this.projectInfo = pInfo;
this.root = root;
@@ -129,7 +137,7 @@ public class ShellSession {
}

private String getInitCmd() {
- return "source " + initCmd + " " + getBuildDirAbsolutePath() + " > tempsf; rm -rf tempsf;";
+ return "source " + initCmd + " " + getBuildDirAbsolutePath() + " >
+ tempsf; rm -rf tempsf;" + exportCmd + ";" + exportColumnsCmd + ";" +
+ "cd " + getBuildDirAbsolutePath() + ";";
}

synchronized
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/CommandRunnable.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/CommandRunnable.java
index fe8b7a7..98c3758 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/CommandRunnable.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/CommandRunna
+++ ble.java
@@ -52,6 +52,7 @@ public class CommandRunnable implements Runnable{
}
StringBuffer buffer = new StringBuffer();
int c;
+ if (errbr != null)
while ((c = errbr.read()) != -1) {
char ch = (char) c;
buffer.append(ch);
@@ -66,7 +67,7 @@ public class CommandRunnable implements Runnable{
buffer.delete(0, buffer.length());
}
}
-
+ if (inbr != null)
while ((c = inbr.read()) != -1) {
char ch = (char) c;
buffer.append(ch);
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 1134c8e..9bce9e3 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
@@ -11,6 +11,7 @@
package org.yocto.bc.remote.utils;

import java.io.File;
+import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
@@ -268,6 +269,24 @@ public class RemoteHelper {
return null;
}

+ public static InputStream getRemoteInputStream(IHost connection, String parentPath, String remoteFilePath, IProgressMonitor monitor){
+ assert(connection != null);
+ monitor.beginTask(Messages.InfoDownload, 100);
+
+ try {
+ IFileService fileService = getConnectedRemoteFileService(connection,
+new SubProgressMonitor(monitor, 10));
+
+ return fileService.getInputStream(parentPath, remoteFilePath, false, monitor);
+// IHostFile remoteFile = fileService.getFile(remotePath.removeLastSegments(1).toString(), remotePath.lastSegment(), new SubProgressMonitor(monitor, 5));
+// return remoteFile;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }finally {
+ monitor.done();
+ }
+ return null;
+ }
+
/**
* Throws a core exception with an error status object built from the given
* message, lower level exception, and error code.
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteMachine.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteMachine.java
index 18c41e1..ba925ca 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteMachine.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteMachin
+++ e.java
@@ -1,11 +1,11 @@
package org.yocto.bc.remote.utils;

import java.io.BufferedReader;
-import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.locks.Lock;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -18,7 +18,6 @@ import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.internal.services.local.shells.LocalShellService;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.services.shells.HostShellProcessAdapter;
import org.eclipse.rse.services.shells.IHostShell;
import org.eclipse.rse.services.shells.IShellService;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
@@ -43,13 +42,16 @@ public class RemoteMachine {
public RemoteMachine(IHost connection) {
setConnection(connection);
}
- private ProcessStreamBuffer processOutput(Process process, IProgressMonitor monitor) throws Exception {
- if (process == null)
+ private ProcessStreamBuffer processOutput(IHostShell shell, IProgressMonitor monitor) throws Exception {
+ if (shell == null)
throw new Exception("An error has occured while trying to run remote command!");
ProcessStreamBuffer processBuffer = new ProcessStreamBuffer();
-
- BufferedReader inbr = new BufferedReader(new InputStreamReader(process.getInputStream()));
- BufferedReader errbr = new BufferedReader(new InputStreamReader(process.getErrorStream()));
+
+ Lock lock = shell.getStandardOutputReader().getReaderLock();
+ lock.lock();
+ BufferedReader inbr = shell.getStandardOutputReader().getReader();
+ BufferedReader errbr = shell.getStandardErrorReader().getReader();
+
boolean cancel = false;
while (!cancel) {
if(monitor.isCanceled()) {
@@ -58,6 +60,7 @@ public class RemoteMachine {
}
StringBuffer buffer = new StringBuffer();
int c;
+ if (errbr != null)
while ((c = errbr.read()) != -1) {
char ch = (char) c;
buffer.append(ch);
@@ -71,7 +74,7 @@ public class RemoteMachine {
buffer.delete(0, buffer.length());
}
}
-
+ if (inbr != null)
while ((c = inbr.read()) != -1) {
char ch = (char) c;
buffer.append(ch);
@@ -120,13 +123,13 @@ public class RemoteMachine {

IShellService shellService = getShellService(new SubProgressMonitor(monitor, 7));

- HostShellProcessAdapter p = null;
+// HostShellProcessAdapter p = null;
ProcessStreamBuffer buffer = null;
try {
SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 3);
IHostShell hostShell = shellService.runCommand("", "env" + " ; echo " + RemoteHelper.TERMINATOR + "; exit;", new String[]{}, subMonitor);
- p = new HostShellProcessAdapter(hostShell);
- buffer = processOutput(p, subMonitor);
+// p = new HostShellProcessAdapter(hostShell);
+ buffer = processOutput(hostShell, subMonitor);
for(int i = 0; i < buffer.getOutputLines().size(); i++) {
String out = buffer.getOutputLines().get(i);
String[] tokens = out.split("=");
@@ -138,9 +141,9 @@ public class RemoteMachine {
environment.put(varName, varValue);
}
} catch (Exception e) {
- if (p != null) {
- p.destroy();
- }
+// if (p != null) {
+// p.destroy();
+// }
e.printStackTrace();
}

diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/Activator.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/Activator.java
index 188efe6..3b97526 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/Activator.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/Activator.java
@@ -61,7 +61,7 @@ public class Activator extends AbstractUIPlugin {
URI key = session.getProjInfoRoot();// + filePath;
BBRecipe recipe = (BBRecipe) bbRecipeMap.get(key);
if (recipe == null) {
- recipe = new BBRecipe(session,filePath);
+ recipe = new BBRecipe(session, filePath);
bbRecipeMap.put(key, recipe);
}

@@ -75,7 +75,7 @@ public class Activator extends AbstractUIPlugin {
* @throws IOException
*/
public static BBSession getBBSession(ProjectInfo projectInfo, Writer out, IProgressMonitor monitor) throws IOException {
- URI projectRoot = projectInfo.getURI();
+ URI projectRoot = projectInfo.getOriginalURI();
if (bbSessionMap == null) {
bbSessionMap = new Hashtable<URI, BBSession>();
}
@@ -97,7 +97,7 @@ public class Activator extends AbstractUIPlugin {
* @throws Exception
*/
public static BBSession getBBSession(ProjectInfo projectInfo, IProgressMonitor monitor) throws Exception {
- URI projectRoot = projectInfo.getURI();
+ URI projectRoot = projectInfo.getOriginalURI();
if (bbSessionMap == null) {
bbSessionMap = new Hashtable<URI, BBSession>();
}
@@ -151,12 +151,12 @@ public class Activator extends AbstractUIPlugin {
if (projInfoMap == null) {
projInfoMap = new Hashtable<URI, ProjectInfo>();
}
- location = convertOEFSUri(location);
+// location = convertOEFSUri(location);
if (location != null) {
ProjectInfo pi = projInfoMap.get(location);
if (pi == null) {
pi = new ProjectInfo();
- pi.setLocation(location);
+ pi.setLocationURI(location);
try {
pi.setInitScriptPath(ProjectInfoHelper.getInitScriptPath(location));
} catch (IOException e) {
@@ -195,7 +195,7 @@ public class Activator extends AbstractUIPlugin {
* @throws IOException
*/
private static ShellSession getShellSession(ProjectInfo projInfo, Writer out, IProgressMonitor monitor) throws IOException {
- URI absolutePath = projInfo.getURI();
+ URI absolutePath = projInfo.getOriginalURI();
if (shellMap == null) {
shellMap = new Hashtable<String, ShellSession>();
}
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeDocumentProvider.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeDocumentProvider.java
index 2d28261..d9d5754 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeDocumentProvider.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBak
+++ eDocumentProvider.java
@@ -11,6 +11,9 @@
package org.yocto.bc.ui.editors.bitbake;

import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.security.auth.login.Configuration;

import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -43,12 +46,18 @@ public class BitBakeDocumentProvider extends FileDocumentProvider {
public static final String RECIPE_COMMENT= "RECIPE_COMMENT"; //$NON-NLS-1$

private IHost connection;
+
+ private BitBakeSourceViewerConfiguration viewerConfiguration;

private static final String[] CONTENT_TYPES= {
RECIPE_CODE,
RECIPE_COMMENT
};

+ public BitBakeDocumentProvider(BitBakeSourceViewerConfiguration viewerConfiguration) {
+ this.viewerConfiguration = viewerConfiguration;
+ }
+
private IDocumentPartitioner createRecipePartitioner() {
IPredicateRule[] rules= { new SingleLineRule("#", null, new Token(RECIPE_COMMENT), (char) 0, true, false) }; //$NON-NLS-1$

@@ -73,13 +82,17 @@ public class BitBakeDocumentProvider extends FileDocumentProvider {
if (element instanceof IFileEditorInput) {
IFileEditorInput input= (IFileEditorInput) element;

- URI uri = input.getFile().getLocationURI();
- if (uri == null)
- return true;
-
- if (connection == null)
- connection = RemoteHelper.getRemoteConnectionForURI(uri, new NullProgressMonitor());
- return !RemoteHelper.fileExistsRemote(connection, new NullProgressMonitor(), uri.getPath());
+ URI root = viewerConfiguration.getBBSession().getProjInfoRoot();
+ String relPath = input.getFile().getProjectRelativePath().toPortableString();
+ try {
+ URI fileURI = new URI(root.getScheme(), root.getHost(), root.getPath() + "/" + relPath, root.getFragment());
+ if (connection == null)
+ //connection = RemoteHelper.getRemoteConnectionForURI(fileURI, new NullProgressMonitor());
+ connection = viewerConfiguration.getBBSession().getProjectInfo().getConnection();
+ return !RemoteHelper.fileExistsRemote(connection, new NullProgressMonitor(), fileURI.getPath());
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
}

return super.isDeleted(element);
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeFileEditor.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeFileEditor.java
index be856ff..b2da775 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeFileEditor.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBak
+++ eFileEditor.java
@@ -45,7 +45,7 @@ public class BitBakeFileEditor extends AbstractDecoratedTextEditor {
super();
viewerConfiguration = new BitBakeSourceViewerConfiguration(getSharedColors(), getPreferenceStore());
setSourceViewerConfiguration(viewerConfiguration);
- setDocumentProvider(new BitBakeDocumentProvider());
+ setDocumentProvider(new
+BitBakeDocumentProvider(viewerConfiguration));
}

@Override
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeSourceViewerConfiguration.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeSourceViewerConfiguration.java
index 98768a8..06a8233 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBakeSourceViewerConfiguration.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/editors/bitbake/BitBak
+++ eSourceViewerConfiguration.java
@@ -10,6 +10,9 @@
*******************************************************************************/
package org.yocto.bc.ui.editors.bitbake;

+import java.net.URI;
+import java.net.URISyntaxException;
+
import org.eclipse.core.resources.IFile; import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.ITextHover;
@@ -33,9 +36,9 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.RGB; import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
-
import org.yocto.bc.bitbake.BBLanguageHelper;
import org.yocto.bc.bitbake.BBSession;
+import org.yocto.bc.bitbake.ProjectInfoHelper;

public class BitBakeSourceViewerConfiguration extends TextSourceViewerConfiguration {

@@ -66,7 +69,15 @@ public class BitBakeSourceViewerConfiguration extends TextSourceViewerConfigurat
public ITextHover getTextHover(ISourceViewer sv, String contentType) {
//only .bb file support Text Hover.
if (textHover == null && targetFile.getFileExtension().equals(BBLanguageHelper.BITBAKE_RECIPE_FILE_EXTENSION)) {
- textHover = new BBVariableTextHover(session, targetFile.getLocationURI());
+ URI root = session.getProjInfoRoot();
+ try {
+ URI targetFIleURI = new URI(root.getScheme(), root.getHost(), root.getPath() + "/" +targetFile.getProjectRelativePath().toPortableString(), root.getFragment());
+ textHover = new BBVariableTextHover(session, targetFIleURI);
+ } catch (URISyntaxException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
}

return textHover;
@@ -192,4 +203,9 @@ public class BitBakeSourceViewerConfiguration extends TextSourceViewerConfigurat
public void setBBSession(BBSession session) {
this.session = session;
}
+
+ public BBSession getBBSession() {
+ return this.session;
+ }
+
}
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/OEFile.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/OEFile.java
index f12d6f3..7360588 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/OEFile.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/OEFile.java
@@ -37,6 +37,7 @@ import org.yocto.bc.bitbake.BBSession; import org.yocto.bc.bitbake.ProjectInfoHelper;
import org.yocto.bc.bitbake.ShellSession;
import org.yocto.bc.remote.utils.RemoteHelper;
+import org.yocto.bc.ui.Activator;
import org.yocto.bc.ui.model.ProjectInfo;
import org.yocto.bc.ui.model.YoctoHostFile;

@@ -58,6 +59,10 @@ public class OEFile extends FileStore {
*/
protected final String filePath;

+ public String getFilePath() {
+ return filePath;
+ }
+
private final URI root;

/**
@@ -84,17 +89,18 @@ public class OEFile extends FileStore {
*/
private boolean isPotentialBuildDir(String path) {
String parentPath = path.substring(0, path.lastIndexOf("/"));
+ String name = path.substring(path.lastIndexOf("/") + 1);
boolean ret = true;
try {
IFileService fs = file.getFileService();
- IHostFile hostFile = fs.getFile(parentPath, path, new NullProgressMonitor());
+ IHostFile hostFile = fs.getFile(parentPath, name, new
+NullProgressMonitor());
if (!hostFile.isDirectory())
return false;
- IHostFile confDir = fs.getFile(path, path + BBSession.CONF_DIR, new NullProgressMonitor());
+ IHostFile confDir = fs.getFile(path, BBSession.CONF_DIR, new
+NullProgressMonitor());
if (!confDir.exists() || !confDir.isDirectory())
return false;
for (int i = 0; i < BBSession.BUILDDIR_INDICATORS.length && ret == true; i++) {
- IHostFile child = fs.getFile(path, path + BBSession.CONF_DIR + BBSession.BUILDDIR_INDICATORS[i], new NullProgressMonitor());
+ IHostFile child = fs.getFile(path + "/" + BBSession.CONF_DIR,
+BBSession.BUILDDIR_INDICATORS[i], new NullProgressMonitor());
if(!child.exists() || !child.isFile()) {
ret = false;
break;
@@ -114,10 +120,11 @@ public class OEFile extends FileStore {
if(isPotentialBuildDir(path)) {
BBSession config = null;
try {
- ShellSession shell = new ShellSession(file.getProjectInfo(), ShellSession.SHELL_TYPE_BASH,
- RemoteHelper.getRemoteHostFile(file.getConnection(), root.getPath(), new NullProgressMonitor()),
- ProjectInfoHelper.getInitScriptPath(root) + " " + path, null);
- config = new BBSession(shell, root, true);
+// ShellSession shell = new ShellSession(file.getProjectInfo(), ShellSession.SHELL_TYPE_BASH,
+// RemoteHelper.getRemoteHostFile(file.getConnection(), root.getPath(), new NullProgressMonitor()),
+// ProjectInfoHelper.getInitScriptPath(root) + " " + path, null);
+// config = new BBSession(shell, root, true);
+ config = Activator.getBBSession(Activator.getProjInfo(root),
+monitor);
config.initialize();
} catch(Exception e) {
e.printStackTrace();
@@ -146,7 +153,7 @@ public class OEFile extends FileStore {
IFileStore[] wrapped = new IFileStore[children.length];

for (int i = 0; i < wrapped.length; i++) {
- String fullPath = file.getAbsolutePath() + File.separatorChar + children[i];
+ String fullPath = file.getAbsolutePath() + "/" + children[i];

updateIgnorePaths(fullPath, ignoredPaths, monitor);
if (ignoredPaths.contains(fullPath)) { @@ -164,23 +171,7 @@ public class OEFile extends FileStore {
if (destFileStore instanceof OEFile) {
file.copy(destFileStore, monitor);

-// File source = file;
-// File destination = ((OEFile) destFile).file;
-// //handle case variants on a case-insensitive OS, or copying between
-// //two equivalent files in an environment that supports symbolic links.
-// //in these nothing needs to be copied (and doing so would likely lose data)
-// try {
-// if (source.getCanonicalFile().equals(destination.getCanonicalFile())) {
-// //nothing to do
-// return;
-// }
-// } catch (IOException e) {
-// String message = NLS.bind(Messages.couldNotRead, source.getAbsolutePath());
-// Policy.error(EFS.ERROR_READ, message, e);
-// }
}
- //fall through to super implementation
-// super.copy(destFileStore, options, monitor);
}

@Override
@@ -372,17 +363,6 @@ public class OEFile extends FileStore {

@Override
public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException {
-// boolean shallow = (options & EFS.SHALLOW) != 0;
-// //must be a directory
-// if (shallow)
-// file.mkdir();
-// else
-// file.mkdirs();
-// if (!file.isDirectory()) {
-// checkReadOnlyParent(file, null);
-// String message = NLS.bind(Messages.failedCreateWrongType, filePath);
-// Policy.error(EFS.ERROR_WRONG_TYPE, message);
-// }
file.mkdir(options);
return this;
}
@@ -390,64 +370,6 @@ public class OEFile extends FileStore {
@Override
public void move(IFileStore destFile, int options, IProgressMonitor monitor) throws CoreException {
file.move(destFile, monitor);
-// if (!(destFile instanceof OEFile)) {
-// super.move(destFile, options, monitor);
-// return;
-// }
-// File source = file;
-// File destination = ((OEFile) destFile).file;
-// boolean overwrite = (options & EFS.OVERWRITE) != 0;
-// monitor = Policy.monitorFor(monitor);
-// try {
-// monitor.beginTask(NLS.bind(Messages.moving, source.getAbsolutePath()), 10);
-// //this flag captures case renaming on a case-insensitive OS, or moving
-// //two equivalent files in an environment that supports symbolic links.
-// //in these cases we NEVER want to delete anything
-// boolean sourceEqualsDest = false;
-// try {
-// sourceEqualsDest = source.getCanonicalFile().equals(destination.getCanonicalFile());
-// } catch (IOException e) {
-// String message = NLS.bind(Messages.couldNotMove, source.getAbsolutePath());
-// Policy.error(EFS.ERROR_WRITE, message, e);
-// }
-// if (!sourceEqualsDest && !overwrite && destination.exists()) {
-// String message = NLS.bind(Messages.fileExists, destination.getAbsolutePath());
-// Policy.error(EFS.ERROR_EXISTS, message);
-// }
-// if (source.renameTo(destination)) {
-// // double-check to ensure we really did move
-// // since java.io.File#renameTo sometimes lies
-// if (!sourceEqualsDest && source.exists()) {
-// // XXX: document when this occurs
-// if (destination.exists()) {
-// // couldn't delete the source so remove the destination and throw an error
-// // XXX: if we fail deleting the destination, the destination (root) may still exist
-// new OEFile(destination, ignoredPaths, root).delete(EFS.NONE, null);
-// String message = NLS.bind(Messages.couldnotDelete, source.getAbsolutePath());
-// Policy.error(EFS.ERROR_DELETE, message);
-// }
-// // source exists but destination doesn't so try to copy below
-// } else {
-// if (!destination.exists()) {
-// // neither the source nor the destination exist. this is REALLY bad
-// String message = NLS.bind(Messages.failedMove, source.getAbsolutePath(), destination.getAbsolutePath());
-// Policy.error(EFS.ERROR_WRITE, message);
-// }
-// //the move was successful
-// monitor.worked(10);
-// return;
-// }
-// }
-// // for some reason renameTo didn't work
-// if (sourceEqualsDest) {
-// String message = NLS.bind(Messages.couldNotMove, source.getAbsolutePath());
-// Policy.error(EFS.ERROR_WRITE, message, null);
-// }
-// // fall back to default implementation
-// super.move(destFile, options, Policy.subMonitorFor(monitor, 10));
-// } finally {
-// monitor.done();
-// }
}

@Override
@@ -470,9 +392,6 @@ public class OEFile extends FileStore {
*/
@Override
public File toLocalFile(int options, IProgressMonitor monitor) throws CoreException {
-// if (options == EFS.CACHE)
-// return super.toLocalFile(options, monitor);
-// return file;
return file.toLocalFile();
}

@@ -495,4 +414,8 @@ public class OEFile extends FileStore {
public ProjectInfo getProjectInfo() {
return file.getProjectInfo();
}
+
+ public String getParentPath() {
+ return filePath.substring(0, filePath.lastIndexOf("/"));
+ }
}
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/YoctoLocation.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/YoctoLocation.java
new file mode 100755
index 0000000..1e069a3
--- /dev/null
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/YoctoLocati
+++ on.java
@@ -0,0 +1,36 @@
+package org.yocto.bc.ui.filesystem;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+public class YoctoLocation{
+ URI oefsURI;
+ URI originalURI;
+
+ public YoctoLocation(){
+ try {
+ oefsURI = new URI("");
+ originalURI = new URI("");
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public URI getOEFSURI() {
+ return oefsURI;
+ }
+
+ public URI getOriginalURI() {
+ return originalURI;
+ }
+
+ public void setOriginalURI(URI originalURI) {
+ this.originalURI = originalURI;
+ }
+
+ public void setOEFSURI(URI uri) {
+ this.oefsURI = uri;
+ }
+
+
+}
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/ProjectInfo.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/ProjectInfo.java
index 089c1ac..743a754 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/ProjectInfo.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/ProjectInfo.java
@@ -11,19 +11,21 @@
package org.yocto.bc.ui.model;

import java.net.URI;
+import java.net.URISyntaxException;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.ptp.remote.core.IRemoteServices;
import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.services.files.IFileService;
+import org.yocto.bc.bitbake.ProjectInfoHelper;
import org.yocto.bc.remote.utils.RemoteHelper;
+import org.yocto.bc.ui.filesystem.YoctoLocation;


public class ProjectInfo implements IModelElement {
private String name;
- private URI location;
- private URI oefsLocation;
+ private YoctoLocation location;
private String init;
private IHost connection;
private IRemoteServices remoteServices; @@ -37,13 +39,13 @@ public class ProjectInfo implements IModelElement {
public String getProjectName() {
return name;
}
- public URI getURI() {
- return location;
+ public URI getOriginalURI() {
+ return location.getOriginalURI();
}
@Override
public void initialize() throws Exception {
name = new String();
- location = new URI("");
+ location = new YoctoLocation();
init = new String();
}

@@ -51,8 +53,20 @@ public class ProjectInfo implements IModelElement {
this.init = init;
}

- public void setLocation(URI location) {
- this.location = location;
+ public void setLocationURI(URI location) {
+ if (this.location == null)
+ this.location = new YoctoLocation();
+ this.location.setOriginalURI(location);
+ try {
+ this.location.setOEFSURI(new URI(ProjectInfoHelper.OEFS_SCHEME + location.getPath() ));
+ } catch (URISyntaxException e) {
+ try {
+ this.location.setOEFSURI(new URI(""));
+ } catch (URISyntaxException e1) {
+ e1.printStackTrace();
+ }
+ e.printStackTrace();
+ }
}

public void setName(String name) {
@@ -61,7 +75,7 @@ public class ProjectInfo implements IModelElement {

public IHost getConnection() {
if (connection == null) {
- connection = RemoteHelper.getRemoteConnectionForURI(location, new NullProgressMonitor());
+ connection =
+RemoteHelper.getRemoteConnectionForURI(location.getOriginalURI(), new
+NullProgressMonitor());
}
return connection;
}
@@ -87,11 +101,7 @@ public class ProjectInfo implements IModelElement {
}
}

- public URI getOefsLocation() {
- return oefsLocation;
- }
-
- public void setOefsLocation(URI oefsLocation) {
- this.oefsLocation = oefsLocation;
+ public URI getOEFSURI() {
+ return location.getOEFSURI();
}
}
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/YoctoHostFile.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/YoctoHostFile.java
index ca5a960..db5b37c 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/YoctoHostFile.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/YoctoHostFile.ja
+++ va
@@ -21,6 +21,7 @@ import org.eclipse.rse.services.files.IFileService;
import org.eclipse.rse.services.files.IHostFile;
import org.yocto.bc.remote.utils.RemoteHelper;
import org.yocto.bc.ui.filesystem.Messages;
+import org.yocto.bc.ui.filesystem.OEFile;
import org.yocto.bc.ui.filesystem.Policy;

public class YoctoHostFile implements IHostFile{ @@ -33,12 +34,8 @@ public class YoctoHostFile implements IHostFile{
this.projectInfo = pInfo;
this.fileURI = fileURI;
String path = fileURI.getPath();
-// int parentEnd = path.lastIndexOf("/");
-// String parentPath = path.substring(0, parentEnd);
-// String fileName = path.substring(parentEnd + 1);
fileService = projectInfo.getFileService(monitor);
file = RemoteHelper.getRemoteHostFile(projectInfo.getConnection(), path, monitor);
-// fileService.getFile(parentPath, fileName, monitor);
}

public YoctoHostFile(ProjectInfo projectInfo, URI uri) { @@ -67,11 +64,11 @@ public class YoctoHostFile implements IHostFile{
return file.getName();
}
public URI getProjectLocationURI() {
- return projectInfo.getURI();
+ return projectInfo.getOriginalURI();
}
public URI getLocationURI() {
- projectInfo.getURI().getPath().indexOf(file.getAbsolutePath());
- return projectInfo.getURI();
+ projectInfo.getOriginalURI().getPath().indexOf(file.getAbsolutePath());
+ return projectInfo.getOriginalURI();
}
@Override
public boolean isDirectory() {
@@ -84,7 +81,9 @@ public class YoctoHostFile implements IHostFile{
public boolean copy(IFileStore destFileStore, IProgressMonitor monitor) {
IHostFile destFile;
try {
- destFile = fileService.createFile(destFileStore.getParent().toURI().getPath(), destFileStore.getName(), monitor);
+ OEFile oeFile = (OEFile)destFileStore;
+ String parentPath = oeFile.getParentPath();
+ destFile = fileService.createFile(parentPath,
+destFileStore.getName(), monitor);
fileService.copy(file.getParentPath(), file.getName(), destFile.getParentPath(), destFile.getName(), monitor);
} catch (SystemMessageException e) {
e.printStackTrace();
@@ -250,7 +249,10 @@ public class YoctoHostFile implements IHostFile{

public URI getChildURIformPath(IPath path) {
try {
- return new URI(fileURI.getScheme(), fileURI.getHost(), fileService.getFile(file.getAbsolutePath(), path.toPortableString(), null).getAbsolutePath(), fileURI.getFragment());
+ String fileName = path.lastSegment();
+ path = path.removeLastSegments(1);
+ String newPath = fileService.getFile(file.getAbsolutePath() + "/" + path.toPortableString(), fileName, null).getAbsolutePath();
+ return new URI(fileURI.getScheme(), fileURI.getHost(), newPath,
+fileURI.getFragment());
} catch (URISyntaxException e) {
e.printStackTrace();
return null;
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizardPage.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizardPage.java
index dd6feea..633dc89 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizardPage.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFile
+++ RecipeWizardPage.java
@@ -25,6 +25,7 @@ import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
@@ -52,6 +53,8 @@ import org.eclipse.ui.dialogs.ContainerSelectionDialog;
import org.yocto.bc.remote.utils.ProcessStreamBuffer;
import org.yocto.bc.remote.utils.RemoteHelper;
import org.yocto.bc.remote.utils.YoctoCommand;
+import org.yocto.bc.ui.Activator;
+import org.yocto.bc.ui.model.ProjectInfo;

public class NewBitBakeFileRecipeWizardPage extends WizardPage {
private Text containerText;
@@ -246,7 +249,17 @@ public class NewBitBakeFileRecipeWizardPage extends WizardPage {
}

IProject project = container.getProject();
- metaDirLoc = RemoteHelper.createNewURI(project.getLocationURI(), "meta");
+ ProjectInfo projInfo = null;
+ try {
+ projInfo = Activator.getProjInfo(project.getLocationURI());
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ } catch (CoreException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ metaDirLoc = RemoteHelper.createNewURI(projInfo.getOriginalURI(),
+"meta");

if (fileName.length() == 0) {
updateStatus("File name must be specified"); @@ -356,7 +369,7 @@ public class NewBitBakeFileRecipeWizardPage extends WizardPage {

updateTempFolderPath();
monitor.worked(10);
-
+
monitor.subTask("Downloading package sources");

updateTempFolderPath();
@@ -365,7 +378,7 @@ public class NewBitBakeFileRecipeWizardPage extends WizardPage {
RemoteHelper.handleRunCommandRemote(connection, wgetYCmd, new SubProgressMonitor(monitor, 40));

monitor.worked(50);
-
+
monitor.subTask("Compute package checksums");
String md5Cmd = "md5sum " + srcFileNameExt;
YoctoCommand md5YCmd = new YoctoCommand(md5Cmd, tempFolderPath, ""); diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/importProject/ImportYoctoProjectWizard.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/importProject/ImportYoctoProjectWizard.java
index 5e37133..82c5ab3 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/importProject/ImportYoctoProjectWizard.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/importProject/
+++ ImportYoctoProjectWizard.java
@@ -67,7 +67,7 @@ public class ImportYoctoProjectWizard extends FiniteStateWizard implements IImp
public boolean performFinish() {
ProjectInfo pinfo = new ProjectInfo();
pinfo.setInitScriptPath((String) projectModel.get(ImportYoctoProjectWizard.KEY_INITPATH));
- pinfo.setLocation((URI) projectModel.get(ImportYoctoProjectWizard.KEY_LOCATION));
+ pinfo.setLocationURI((URI)
+projectModel.get(ImportYoctoProjectWizard.KEY_LOCATION));
pinfo.setName((String) projectModel.get(ImportYoctoProjectWizard.KEY_NAME));

try {
@@ -86,7 +86,7 @@ public class ImportYoctoProjectWizard extends FiniteStateWizard implements IImp
projectModel.put(ImportYoctoProjectWizard.KEY_PINFO, pinfo);
//setPageComplete(valid);
//ProjectInfo pinfo = (ProjectInfo) projectModel.get(KEY_PINFO);
- Activator.putProjInfo(pinfo.getURI(), pinfo);
+ Activator.putProjInfo(pinfo.getOEFSURI(), pinfo);
try {
getContainer().run(false, false, new CreateBBCProjectOperation(pinfo));
} catch (Exception e) {
diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/InstallWizard.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/InstallWizard.java
index 071f6aa..100eee3 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/InstallWizard.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/Instal
+++ lWizard.java
@@ -141,7 +141,7 @@ public class InstallWizard extends FiniteStateWizard implements IWorkbenchWizard
String prjName = (String) options.get(PROJECT_NAME);
ProjectInfo pinfo = new ProjectInfo();
pinfo.setInitScriptPath(initPath);
- pinfo.setLocation(uri);
+ pinfo.setLocationURI(uri);
pinfo.setName(prjName);
pinfo.setConnection(connection);
pinfo.setRemoteServices(remoteServices);
@@ -153,7 +153,7 @@ public class InstallWizard extends FiniteStateWizard implements IWorkbenchWizard
console.newMessageStream().println(cw.getContents());

model.put(InstallWizard.KEY_PINFO, pinfo);
- Activator.putProjInfo(pinfo.getURI(), pinfo);
+ Activator.putProjInfo(pinfo.getOEFSURI(), pinfo);

container.run(false, false, new CreateBBCProjectOperation(pinfo));
return true;
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 486bd8b..f8ef0d2 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/Option
+++ sPage.java
@@ -23,6 +23,7 @@ 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.IFileService;
import org.eclipse.rse.services.files.IHostFile;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData; @@ -169,7 +170,12 @@ public class OptionsPage extends FiniteStateWizardPage {
return false;
}
} else { //git clone
- if (repoDest.exists() && repoDest.isDirectory()) {
+ if (repoDest != null && repoDest.exists() && repoDest.isDirectory()) {
+ IHostFile[] hostFiles = RemoteHelper.getRemoteDirContent(connection, repoDest.getAbsolutePath(), "", IFileService.FILE_TYPE_FILES_AND_FOLDERS, new NullProgressMonitor());
+ if (hostFiles.length != 0) {
+ setErrorMessage("Directory " + projectPath + " is not empty, please choose another location.");
+ return false;
+ }
IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor());
if (gitDescr != null && gitDescr.exists()) {
setErrorMessage("Directory " + projectPath + " contains a repository, please choose another location or skip cloning the repository."); 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 942f303..5dd8944 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/BBC
+++ onfigurationInitializeOperation.java
@@ -42,7 +42,7 @@ public class BBConfigurationInitializeOperation implements IRunnableWithProgress
try {
System.out.println("Initialize bitbake session ...");
monitor.beginTask("Initialize bitbake session ...", RemoteHelper.TOTALWORKLOAD);
- ProjectInfoHelper.store(RemoteHelper.getRemoteConnectionByName(pinfo.getConnection().getName()), pinfo.getURI(), pinfo, monitor);
+
+ProjectInfoHelper.store(RemoteHelper.getRemoteConnectionByName(pinfo.ge
+tConnection().getName()), pinfo.getOriginalURI(), pinfo, monitor);
session = Activator.getBBSession(pinfo, writer, monitor);
session.initialize();
monitor.worked(90);
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 5ba661c..338c2e6 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/Cre
+++ ateBBCProjectOperation.java
@@ -67,12 +67,7 @@ public class CreateBBCProjectOperation extends WorkspaceModifyOperation {
private IProjectDescription createProjectDescription(IWorkspace workspace, ProjectInfo projInfo) throws CoreException {
IProjectDescription desc = workspace.newProjectDescription(projInfo.getProjectName());

-// desc.setLocationURI(projInfo.getURI());
- try {
- desc.setLocationURI(new URI(ProjectInfoHelper.OEFS_SCHEME + projInfo.getURI().getPath()));
- } catch (URISyntaxException e) {
- throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Unable to load filesystem.", e));
- }
+ desc.setLocationURI(projInfo.getOEFSURI());
return desc;
}

--
1.7.9.5

_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto


Adding ALSA to the Yocto SDK

Patrick Turley <PatrickTurley@...>
 

I've been working on re-targeting some code from a vendor's board to our own board.

For libraries and other low-level code, everything's been fine. For test applications, I'm running into a dependency on the header file alsa/asoundlib.h, which is obviously part of ALSA.

I've been building our SDK with:

bitbake meta-toolchain-sdk

This gives us most everything we need, but it does *not* include header files and libraries for ALSA. That actually seems perfectly reasonable to me -- not everyone needs ALSA support in their applications, so the *default* SDK shouldn't be burdened with that.

We *do* need it. As I see it, there are two possibilities:

1) There's something I can do that will cause OE/Yocto to include ALSA header files in the SDK I produce. If that's the case, can you tell me what I need to do?

2) The ALSA header files aren't *supposed* to be in the SDK -- I'm supposed to be delivering them to the compilation process in another way. If that's the case, can you tell me what I need to do?


Other items of note…

-- Executing "bitbake alsa-lib" *did* put the expected files within our sysroot (under tmp/sysroots). Even so (as we intuitively expected) executing "bitbake meta-toolchain-sdk" afterward did *not* put them into the SDK. We conclude that having a package built and available for the SDK doesn't necessarily get it into the SDK.

-- Adding ALSA to our image also caused the correct files to end up in our sysroot but, again, nothing appeared in the SDK. We conclude that the contents of the image do *not* dictate the contents of the SDK.


Re: Build external module against Yocto kernel

Patrick Turley <PatrickTurley@...>
 

On Jan 16, 2013, at 11:11 AM, Darren Hart <dvhart@...> wrote:
On 01/15/2013 10:38 AM, Bruce Ashfield wrote:

I finally found the entries that I was recalling earlier. They are:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=241
https://bugzilla.yoctoproject.org/show_bug.cgi?id=1614
https://bugzilla.yoctoproject.org/show_bug.cgi?id=2968

1614 and 2968 are the most interesting for what you are asking.

As you can see the net result of those bugs is that you can get the
right parts of the kernel tree in SDK packages, since they include
dev packages, and with what is currently in kernel-dev .. it should
be enough to build against in the SDK (perhaps with just the LDFLAGS
tweaks mentioned in the other thread). The sources should be part
of the sysroot, and hence available when that is packaged for use
outside of bitbake/yocto.

If you aren't seeing kernel-dev in the SDK image, it might be that
TOOLCHAIN_TARGET_TASK doesn't have kernel-dev by default, or something
else is different in the SDK that is being generated in your testing.

I'm only speculating about what might be missing, since I'm not 100%
familiar with the SDK, but perhaps Jessica or others can chime in if
I've led you astray :)
Thanks for keeping this going Bruce. Yes, kernel-dev is the package for
the target. The only trick here is that we currently purge the host
binaries which means that you need to build scripts on the target prior
to building the module.

I think this might be missing from the new kernel manual as it isn't a
particularly common use-case, and is rather orthogonal to the way the
tooling has been designed (not to say it can't be done).

Patrick, please keep us posted if this continues to not work for you. I
will open a bug to include a section about this in the kernel
development manual.
I got sick and was also diverted to other things, so I apologize for not responding sooner. I am very appreciative of every CPU cycle you have all spent considering this issue -- I wouldn't want you to imagine otherwise.

I will gladly have a look at those issues and absorb the information you've offered. I will also let you all know if it works for me.