[Esbox-commits] r1949 - in trunk: org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard org.maemo.esbox.tests

eswartz at garage.maemo.org eswartz at garage.maemo.org
Thu Aug 6 01:48:41 EEST 2009


Author: eswartz
Date: 2009-08-06 01:48:39 +0300 (Thu, 06 Aug 2009)
New Revision: 1949

Modified:
   trunk/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core/MaemoCppProjectPackageGatherer.java
   trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java
   trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/MaemoScriptInstallerMonitor.java
   trunk/org.maemo.esbox.tests/asthelper.completions
Log:
Merge revs 1934:1947 from work_Ed branch

Modified: trunk/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core/MaemoCppProjectPackageGatherer.java
===================================================================
--- trunk/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core/MaemoCppProjectPackageGatherer.java	2009-08-05 22:43:33 UTC (rev 1948)
+++ trunk/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core/MaemoCppProjectPackageGatherer.java	2009-08-05 22:48:39 UTC (rev 1949)
@@ -46,11 +46,13 @@
 			
 			if (sdkTarget == null) {
 				// generic packages for any target
-				info.getSystemPackages().add("maemo-sdk-dev");
 				info.getSystemPackages().add("maemo-debug-scripts");
 				info.getSystemPackages().add("maemo-c-debug-tools");
 			} else {
 				// target-specific packages
+				if (sdkTarget.getMachine() instanceof IBuildMachine) {
+					info.getSystemPackages().add("maemo-sdk-dev");
+				}
 				if (MicaCppProjectNature.isCCLanguageNatureInProject(project)) {
 					if (sdkTarget.getMachine() instanceof IBuildMachine)
 						info.getSystemPackages().add("maemo-cplusplus-env");

Modified: trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java
===================================================================
--- trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java	2009-08-05 22:43:33 UTC (rev 1948)
+++ trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java	2009-08-05 22:48:39 UTC (rev 1949)
@@ -66,6 +66,8 @@
 	
 	private IPath sdkRoot;
 
+	private long nextTargetCheck;
+
 	public Scratchbox1SDK(IMachine machine, IPath installLocation, 
 			IPreferenceProvider prefProvider) {
 		super(machine, installLocation, IScratchbox1SDK.NAME, 
@@ -315,6 +317,15 @@
 	 * @see org.maemo.mica.maemosdk.core.sdk.IScratchboxSDK#getCurrentTarget()
 	 */
 	public String getCurrentTarget() throws MicaException {
+		// We can't rely on the cache forever, since the user may be
+		// manually switching things outside.  Making the user remember to
+		// refresh the SDK is not the right way to fix this.  Just let the 
+		// cache entry time out after a while.
+		if (System.currentTimeMillis() >= nextTargetCheck) {
+			getCache().set(CURRENT_TARGET_KEY, (String)null);
+			nextTargetCheck = System.currentTimeMillis() + 30 * 1000;
+		}
+		
 		String currentTarget = (String) getCache().get(CURRENT_TARGET_KEY, String.class);
 		if (currentTarget != null && getTargets().contains(currentTarget))
 			return currentTarget;

Modified: trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/MaemoScriptInstallerMonitor.java
===================================================================
--- trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/MaemoScriptInstallerMonitor.java	2009-08-05 22:43:33 UTC (rev 1948)
+++ trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/MaemoScriptInstallerMonitor.java	2009-08-05 22:48:39 UTC (rev 1949)
@@ -169,7 +169,7 @@
 		boolean oldLicenseLineStart = text.trim().length() >= 80 && text.trim().replaceAll("-", "").length() == 0;
 		boolean newLicenseLineStart = text.contains("1) IMPORTANT: READ CAREFULLY BEFORE");
 		boolean newLicenseLineEnd = text.contains("Press Enter to accept");
-		if (oldLicenseLineStart || newLicenseLineStart || newLicenseLineEnd) {
+		if (oldLicenseLineStart || (newLicenseLineStart && !readingLicense) || newLicenseLineEnd) {
 			if (!readingLicense && !gotLicense) {
 				readingLicense = true;
 				licenseText = new StringBuilder();

Modified: trunk/org.maemo.esbox.tests/asthelper.completions
===================================================================
(Binary files differ)



More information about the Esbox-commits mailing list