[oe-commits] Robert Schuster : midpath-core 0.2+0.3rc2: Updated fix-openfile patch to what was committed upstream.

GIT User account git at amethyst.openembedded.net
Fri Dec 5 11:31:06 UTC 2008


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 5fd3e409aa0b309a279a3c10f068e88703fbe48c
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=5fd3e409aa0b309a279a3c10f068e88703fbe48c

Author: Robert Schuster <thebohemian at gmx.net>
Date:   Fri Dec  5 12:30:31 2008 +0100

midpath-core 0.2+0.3rc2: Updated fix-openfile patch to what was committed upstream.

---

 packages/midpath/files/fix-openfile.patch   |   21 +++++++++++++++------
 packages/midpath/midpath-core_0.2+0.3rc2.bb |    2 +-
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/packages/midpath/files/fix-openfile.patch b/packages/midpath/files/fix-openfile.patch
index 6b9b8be..392364b 100644
--- a/packages/midpath/files/fix-openfile.patch
+++ b/packages/midpath/files/fix-openfile.patch
@@ -1,13 +1,22 @@
 Index: midpath-0.3rc2/components/core/src/org/thenesis/midpath/io/backend/j2se/FileHandlerImpl.java
 ===================================================================
 --- midpath-0.3rc2.orig/components/core/src/org/thenesis/midpath/io/backend/j2se/FileHandlerImpl.java	2008-12-04 21:10:39.000000000 +0100
-+++ midpath-0.3rc2/components/core/src/org/thenesis/midpath/io/backend/j2se/FileHandlerImpl.java	2008-12-04 21:12:11.000000000 +0100
-@@ -182,7 +182,7 @@
++++ midpath-0.3rc2/components/core/src/org/thenesis/midpath/io/backend/j2se/FileHandlerImpl.java	2008-12-05 12:29:47.000000000 +0100
+@@ -181,10 +181,13 @@
+ 
  	public void openForRead() throws IOException {
  		if (randomAccessFile == null) {
- 			//stream = new FileRandomAccessStream(file);
+-			//stream = new FileRandomAccessStream(file);
 -			randomAccessFile = new RandomAccessFile(file, "rws");
-+			randomAccessFile = new RandomAccessFile(file, "r");
- 		}
- 	}
+-		}
+-	}
++			// Try to get maximum rights to avoid closing the stream if openForWrite is called next
++			if (file.canWrite()) {
++				randomAccessFile = new RandomAccessFile(file, "rws");
++			} else {
++				randomAccessFile = new RandomAccessFile(file, "r");
++			}
++  }
  
+ 	public void openForWrite() throws IOException {
+ 		if (randomAccessFile == null) {
diff --git a/packages/midpath/midpath-core_0.2+0.3rc2.bb b/packages/midpath/midpath-core_0.2+0.3rc2.bb
index d4d6b6b..ec3291c 100644
--- a/packages/midpath/midpath-core_0.2+0.3rc2.bb
+++ b/packages/midpath/midpath-core_0.2+0.3rc2.bb
@@ -1,6 +1,6 @@
 DESCRIPTION = "MIDPath is a Java library which provides a MIDP2 implementation"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/midpath/midpath-0.3rc2.tar.gz"
 





More information about the Openembedded-commits mailing list