public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: scox@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: Consider relative paths when searching for executable.
Date: Wed, 30 Apr 2008 18:13:00 -0000	[thread overview]
Message-ID: <20080430181350.24303.qmail@sourceware.org> (raw)

The branch, master has been updated
       via  784366432a48d3f5e5072dee4c456d4dbb569c9c (commit)
      from  0cc129863793737189bc3a50c885836ad8abc0f9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 784366432a48d3f5e5072dee4c456d4dbb569c9c
Author: Stan Cox <scox@redhat.com>
Date:   Wed Apr 30 12:56:21 2008 -0400

    Consider relative paths when searching for executable.
    
    * SysRoot.java (findExe): Consider relative paths.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/sysroot/ChangeLog    |    4 ++++
 frysk-core/frysk/sysroot/SysRoot.java |   14 +++++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/sysroot/ChangeLog b/frysk-core/frysk/sysroot/ChangeLog
index 25c2a17..3309028 100644
--- a/frysk-core/frysk/sysroot/ChangeLog
+++ b/frysk-core/frysk/sysroot/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-30  Stan Cox  <scox@redhat.com>
+
+	* SysRoot.java (findExe): Consider relative paths.
+
 2008-04-24  Stan Cox  <scox@redhat.com>
 
 	*  package.html: New file.
diff --git a/frysk-core/frysk/sysroot/SysRoot.java b/frysk-core/frysk/sysroot/SysRoot.java
index 19437aa..7bbbdd3 100644
--- a/frysk-core/frysk/sysroot/SysRoot.java
+++ b/frysk-core/frysk/sysroot/SysRoot.java
@@ -115,17 +115,25 @@ public class SysRoot {
 
 
     private File findExe(String pathVar, String arg0) {
+	File exeFile = new File(arg0);
         if (pathVar == null) {
-            return new File(arg0);
+            return exeFile;
         }
 
         if (arg0.startsWith("/")) {
-            return new File(arg0);
+            return exeFile;
         }
 
         String[] path = pathVar.split(":");
         if (path == null) {
-            return new File(arg0);
+            return exeFile;
+        }
+        
+        if (sysRoot.getPath().compareTo("/") == 0) { 
+            if (! exeFile.isAbsolute() && exeFile.exists()) {
+        	// given "./executable" with sysroot "/"
+        	return exeFile;
+            }
         }
 
         for (int i = 0; i < path.length; i++) {


hooks/post-receive
--
frysk system monitor/debugger


                 reply	other threads:[~2008-04-30 18:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080430181350.24303.qmail@sourceware.org \
    --to=scox@sourceware.org \
    --cc=frysk-cvs@sourceware.org \
    --cc=frysk@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).