public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [setup - the official Cygwin setup program used to install Cygwin and keep it up to date] branch master, updated. release_2.874-7-gcd748b3
@ 2016-08-02 11:37 gratz
  0 siblings, 0 replies; only message in thread
From: gratz @ 2016-08-02 11:37 UTC (permalink / raw)
  To: cygwin-apps-cvs




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=cd748b30665765ef862ba885e8beb2ab635c7519

commit cd748b30665765ef862ba885e8beb2ab635c7519
Author: Achim Gratz <Stromeko@Stromeko.DE>
Date:   Tue Aug 2 10:47:43 2016 +0200

    fromcwd.cc: Truncate search at the first extension in preference order
    
    * fromcwd.cc (FindVisitor): Truncate search at the first extension
      found in preference order in the same directory so that no multiple
      setup files for the same (sub-)mirror are processed by do_local_ini.


Diff:
---
 fromcwd.cc |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/fromcwd.cc b/fromcwd.cc
index c5f2b79..791744e 100644
--- a/fromcwd.cc
+++ b/fromcwd.cc
@@ -74,8 +74,22 @@ public:
 	     ext++, fi++)
 	  {
 	    if (*fi)
-	      found_ini_list.push_back (basePath + SetupArch + "/"
-					+ SetupBaseName + "." + *ext);
+	      {
+		found_ini_list.push_back (basePath + SetupArch + "/"
+					  + SetupBaseName + "." + *ext);
+		/* 
+		 * Terminate the search after the first setup file
+		 * found, which shadows any setup files with
+		 * extensions later in the preference order in the
+		 * same directory.
+		 *
+		 * FIXME: It would probably be more sensible to return
+		 * all matches (perhaps one list per directory) and
+		 * let do_local_ini pick the first one that parses
+		 * correctly, just like do_remote_ini does.
+		 */
+		break;
+	      }
 	  }
 	found_ini.assign (setup_ext_list.size (), false);
   }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-02 11:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-02 11:37 [setup - the official Cygwin setup program used to install Cygwin and keep it up to date] branch master, updated. release_2.874-7-gcd748b3 gratz

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).