From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122674 invoked by alias); 2 Aug 2016 11:37:30 -0000 Mailing-List: contact cygwin-apps-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-apps-cvs-owner@sourceware.org Received: (qmail 122654 invoked by uid 10076); 2 Aug 2016 11:37:29 -0000 Date: Tue, 02 Aug 2016 11:37:00 -0000 Message-ID: <20160802113729.122628.qmail@sourceware.org> From: gratz@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [setup - the official Cygwin setup program used to install Cygwin and keep it up to date] branch master, updated. release_2.874-7-gcd748b3 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 1c1913d10e0af982006cfef9f560884a3a52dedf X-Git-Newrev: cd748b30665765ef862ba885e8beb2ab635c7519 X-SW-Source: 2016-q3/txt/msg00012.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=cd748b30665765ef862ba885e8beb2ab635c7519 commit cd748b30665765ef862ba885e8beb2ab635c7519 Author: Achim Gratz 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); }