Your message dated Mon, 31 Oct 2011 11:49:42 +0000
with message-id <[email protected]>
and subject line Bug#646069: fixed in rxtx 2.2pre2-10
has caused the Debian Bug report #646069,
regarding rxtx: fails when java.ext.dirs system property has
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
646069: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646069
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: rxtx
Severity: normal

Dear Maintainer,

   * What led up to the situation?
I just got an Arduino Uno and I couldn't get the software to "see" the board -
no ports listed.

A few hours later I got it working - it would have been quicker if the error
reports told more.

I also found a reference to a file called "gnu.io.rxtx.properties" which is to
be found in one of the
Java extension directories - the attached patch handles the case where the
"java.ext.dirs"
system property contains more than one directory.

The real clincher was in SerialImp.h/c where I print the port and the open()
error return code.

This is how I found out that you need to log out and then back in again for
group additions to
take effect!

I entered the source tree after "apt-get source"ing rxtx and went through

  configure --prefix=/usr; make; sudo make install

with debugging added with "make -DDEBUG_VERBOSE" I finally tracked it down.

Take the patch or leave it, but if you could, please get

  sudo make uninstall

working from the source tree!

Thanks.



-- System Information:
Debian Release: wheezy/sid
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Naur rxtx-2.2pre2/src/gnu/io/RXTXCommDriver.java rxtx-2.2pre2-new/src/gnu/io/RXTXCommDriver.java
--- rxtx-2.2pre2/src/gnu/io/RXTXCommDriver.java	2011-10-21 01:29:20.000000000 +0100
+++ rxtx-2.2pre2-new/src/gnu/io/RXTXCommDriver.java	2011-10-21 01:28:56.840173668 +0100
@@ -356,7 +356,7 @@
 	 First try to register ports specified in the properties
 	 file.  If that doesn't exist, then scan for ports.
 	*/
-		for (int PortType=CommPortIdentifier.PORT_SERIAL;PortType<=CommPortIdentifier.PORT_PARALLEL;PortType++) {
+		for (int PortType=CommPortIdentifier.PORT_SERIAL; PortType<=CommPortIdentifier.PORT_PARALLEL; PortType++) {
 			if (!registerSpecifiedPorts(PortType)) {
 				if (!registerKnownPorts(PortType)) {
 					registerScannedPorts(PortType);
@@ -375,10 +375,18 @@
 		while (tok.hasMoreElements())
 		{
 			String PortName = tok.nextToken();
-
-			if (testRead(PortName, PortType))
+			if(debug)
+				System.out.println("Trying " + PortName + ".");
+			if (testRead(PortName, PortType)) {
 				CommPortIdentifier.addPortName(PortName,
 					PortType, this);
+				if(debug)
+					System.out.println("Success: Read from " + PortName + ".");
+			}else{
+				if(debug)
+					System.out.println("Fail: Cannot read from " + PortName
+						+ ".");
+			}
 		}
 	}
 
@@ -402,26 +410,39 @@
 	private boolean registerSpecifiedPorts(int PortType)
 	{
 		String val = null;
-		Properties origp = System.getProperties();//save system properties
-
-		try
-		    {
+		Properties origp = System.getProperties(); // save system properties
 
-		     String ext_dir=System.getProperty("java.ext.dirs")+System.getProperty("file.separator");
-		     FileInputStream rxtx_prop=new FileInputStream(ext_dir+"gnu.io.rxtx.properties");
-		     Properties p=new Properties();
-		     p.load(rxtx_prop);
-		     System.setProperties(p);
-		     for (Iterator it = p.keySet().iterator(); it.hasNext();) {
-		          String key = (String) it.next();
-		          System.setProperty(key, p.getProperty(key));
-		     }
-		    }catch(Exception e){
-			if (debug){
-			    System.out.println("The file: gnu.io.rxtx.properties doesn't exists.");
-			    System.out.println(e.toString());
-			    }//end if
+		String [] ext_dirs = System.getProperty("java.ext.dirs").split(":");
+		String fs = System.getProperty("file.separator");
+		for (int n = 0; n < ext_dirs.length; ++n) {
+			String ext_file = "?";
+			try{
+				ext_file = ext_dirs[n] + fs + "gnu.io.rxtx.properties";
+				FileInputStream rxtx_prop = new FileInputStream(ext_file);
+				Properties p=new Properties();
+				p.load(rxtx_prop);
+				System.setProperties(p);
+				for (Iterator it = p.keySet().iterator(); it.hasNext();) {
+					String key = (String) it.next();
+					String value = p.getProperty(key);
+					if(debug) {
+						System.out.println(key + " -> " + value);
+					}
+					System.setProperty(key, value);
+				}
+			}catch(Exception e){
+				if (debug){
+					System.out.println("The file \"" + ext_file
+						+ "\" doesn't exist.");
+					System.out.println(e.toString());
+				}//end if
+				continue;
 			}//end catch
+			if (debug){
+				System.out.println("Read properties from \"" + ext_file
+					+ "\".");
+			}//end if
+		}//end for
 
 		if (debug)
 			System.out.println("checking for system-known ports of type "+PortType);
diff -Naur rxtx-2.2pre2/src/SerialImp.c rxtx-2.2pre2-new/src/SerialImp.c
--- rxtx-2.2pre2/src/SerialImp.c	2011-10-21 01:29:20.000000000 +0100
+++ rxtx-2.2pre2-new/src/SerialImp.c	2011-10-21 00:10:59.449672026 +0100
@@ -4359,7 +4359,11 @@
 
 	if( fd < 0 )
 	{
-		report_verbose( "testRead() open failed\n" );
+		report_verbose( "testRead() open \"" );
+		report_verbose( name );
+		report_verbose( "\" failed: " );
+		report_verbose( strerror(errno) );
+		report_verbose( "\n" );
 		ret = JNI_FALSE;
 		goto END;
 	}
@@ -5095,7 +5099,7 @@
    exceptions:  none
    comments:
 ----------------------------------------------------------*/
-void report_warning(char *msg)
+void report_warning(const char *msg)
 {
 #ifndef DEBUG_MW
 	fprintf(stderr, msg);
@@ -5113,7 +5117,7 @@
    exceptions:  none
    comments:
 ----------------------------------------------------------*/
-void report_verbose(char *msg)
+void report_verbose(const char *msg)
 {
 #ifdef DEBUG_VERBOSE
 #ifdef DEBUG_MW
@@ -5132,7 +5136,7 @@
    exceptions:  none
    comments:
 ----------------------------------------------------------*/
-void report_error(char *msg)
+void report_error(const char *msg)
 {
 #ifndef DEBUG_MW
 	fprintf(stderr, msg);
@@ -5150,7 +5154,7 @@
    exceptions:  none
    comments:
 ----------------------------------------------------------*/
-void report(char *msg)
+void report(const char *msg)
 {
 #ifdef DEBUG
 #	ifndef DEBUG_MW
diff -Naur rxtx-2.2pre2/src/SerialImp.h rxtx-2.2pre2-new/src/SerialImp.h
--- rxtx-2.2pre2/src/SerialImp.h	2011-10-21 01:29:20.000000000 +0100
+++ rxtx-2.2pre2-new/src/SerialImp.h	2011-10-21 00:10:25.801637483 +0100
@@ -467,10 +467,10 @@
 jboolean is_interrupted( struct event_info_struct * );
 int send_event(struct event_info_struct *, jint, int );
 void dump_termios(char *,struct termios *);
-void report_verbose(char *);
-void report_error(char *);
-void report_warning(char *);
-void report(char *);
+void report_verbose(const char *);
+void report_error(const char *);
+void report_warning(const char *);
+void report(const char *);
 void throw_java_exception( JNIEnv *, char *, char *, char * );
 int lock_device( const char * );
 void unlock_device( const char * );

--- End Message ---
--- Begin Message ---
Source: rxtx
Source-Version: 2.2pre2-10

We believe that the bug you reported is fixed in the latest version of
rxtx, which is due to be installed in the Debian FTP archive:

librxtx-java-dbg_2.2pre2-10_i386.deb
  to main/r/rxtx/librxtx-java-dbg_2.2pre2-10_i386.deb
librxtx-java_2.2pre2-10_i386.deb
  to main/r/rxtx/librxtx-java_2.2pre2-10_i386.deb
rxtx_2.2pre2-10.debian.tar.gz
  to main/r/rxtx/rxtx_2.2pre2-10.debian.tar.gz
rxtx_2.2pre2-10.dsc
  to main/r/rxtx/rxtx_2.2pre2-10.dsc



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Scott Howard <[email protected]> (supplier of updated rxtx package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


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

Format: 1.8
Date: Mon, 31 Oct 2011 03:04:52 -0400
Source: rxtx
Binary: librxtx-java librxtx-java-dbg
Architecture: source i386
Version: 2.2pre2-10
Distribution: unstable
Urgency: low
Maintainer: Debian Java maintainers 
<[email protected]>
Changed-By: Scott Howard <[email protected]>
Description: 
 librxtx-java - Full Java CommAPI implementation
 librxtx-java-dbg - Full Java CommAPI implementation, Debugging Symbols
Closes: 646069 646356
Changes: 
 rxtx (2.2pre2-10) unstable; urgency=low
 .
   * debian/patches/multiple_property_dirs.patch
     - handles the case where the "java.ext.dirs" system property contains
       more than one directory. (Closes: #646069) Thanks Philip Ashmore.
   * Added librxtx-java-dbg package and added uninstall target
     (Closes: #646356)
Checksums-Sha1: 
 7468fd108d3e857b12995d2224ad17a8f97c6a9e 1378 rxtx_2.2pre2-10.dsc
 47a0a621a4f7b61a6c4c298515898dca89aa6cb7 17958 rxtx_2.2pre2-10.debian.tar.gz
 5bb7fa30565871c66fb475b86363762834d1d2f2 195632 
librxtx-java_2.2pre2-10_i386.deb
 9c9a0d4c4f20c1b55fd4172436cdfbf465194e5a 124474 
librxtx-java-dbg_2.2pre2-10_i386.deb
Checksums-Sha256: 
 12ab7238e6337d23ce82028713f91bc388d8486d85cf7616a2907ec613a7ad70 1378 
rxtx_2.2pre2-10.dsc
 4ae53ea5f4e90bcda3dbd33f7b3b93ab63f8952e2d7dbcac1f98e50bf395f1ec 17958 
rxtx_2.2pre2-10.debian.tar.gz
 9c5d671b860299e892acd544ba34341732cef2521350e776361003d8ca632473 195632 
librxtx-java_2.2pre2-10_i386.deb
 ff0efbfaa835f11dbb9b020484f1e914c3e30dba9cf888a0d5b1061851ee6eea 124474 
librxtx-java-dbg_2.2pre2-10_i386.deb
Files: 
 95db44b1a5bdafe0dc91eee6eb1686bd 1378 java optional rxtx_2.2pre2-10.dsc
 02a3f52993de0cd7fa22488a3685edd1 17958 java optional 
rxtx_2.2pre2-10.debian.tar.gz
 fc7058316175e2a04500f9cf21525fee 195632 java optional 
librxtx-java_2.2pre2-10_i386.deb
 6b9c366cd8a34b30673868487d5c9c01 124474 debug extra 
librxtx-java-dbg_2.2pre2-10_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk6uSl0ACgkQuqVp0MvxKmppmwCfVQAVwDL1s+C8RTobk1xTjzvg
znsAoKjp9ySkwftgAcwgRLVRAS7SgGbO
=Nh6g
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to