diff options
Diffstat (limited to 'plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBRecipe.java')
-rw-r--r-- | plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBRecipe.java | 45 |
1 files changed, 45 insertions, 0 deletions
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 new file mode 100644 index 0000000..9092759 --- /dev/null +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBRecipe.java | |||
@@ -0,0 +1,45 @@ | |||
1 | /***************************************************************************** | ||
2 | * Copyright (c) 2009 Ken Gilmer, 2013 Intel Corporation | ||
3 | * All rights reserved. This program and the accompanying materials | ||
4 | * are made available under the terms of the Eclipse Public License v1.0 | ||
5 | * which accompanies this distribution, and is available at | ||
6 | * http://www.eclipse.org/legal/epl-v10.html | ||
7 | * | ||
8 | * Contributors: | ||
9 | * Ken Gilmer - initial API and implementation | ||
10 | * Ioana Grigoropol (Intel) - adapt class for remote support | ||
11 | *******************************************************************************/ | ||
12 | package org.yocto.bc.bitbake; | ||
13 | |||
14 | import java.io.IOException; | ||
15 | import java.net.URI; | ||
16 | |||
17 | /** | ||
18 | * Represents the bitbake environment of a recipe package. | ||
19 | * @author kgilmer | ||
20 | * | ||
21 | */ | ||
22 | public class BBRecipe extends BBSession { | ||
23 | private final BBSession session; | ||
24 | private final URI fileURI; | ||
25 | |||
26 | public BBRecipe(BBSession session, URI filePath) throws IOException { | ||
27 | super(session.shell, session.pinfo.getOriginalURI()); | ||
28 | this.session = session; | ||
29 | this.fileURI = filePath; | ||
30 | this.parsingCmd = "DISABLE_SANITY_CHECKS=\"1\" bitbake -e -b " + filePath.getPath() + " >& " + BB_ENV_FILE; | ||
31 | } | ||
32 | |||
33 | @Override | ||
34 | public void initialize() throws Exception { | ||
35 | if (this.size() == 0) { | ||
36 | //System.out.println("Failed to parse " + fileURI); | ||
37 | //throw new IOException("Failed to parse " + filePath); | ||
38 | } | ||
39 | } | ||
40 | |||
41 | @Override | ||
42 | protected URI getDefaultDepends() { | ||
43 | return this.fileURI; | ||
44 | } | ||
45 | } | ||