From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 14 17:43:54 2019 Received: (at 35387-done) by debbugs.gnu.org; 14 Jun 2019 21:43:54 +0000 Received: from localhost ([127.0.0.1]:37948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbtzF-0004Is-U8 for submit@debbugs.gnu.org; Fri, 14 Jun 2019 17:43:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hbtzD-0004If-7L for 35387-done@debbugs.gnu.org; Fri, 14 Jun 2019 17:43:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hbtz7-0002pn-77; Fri, 14 Jun 2019 17:43:45 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=46460 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hbtz6-0006Sp-QB; Fri, 14 Jun 2019 17:43:45 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Christopher Baines Subject: Re: bug#35387: unpack phase in the gnu-build-system is sometimes non-deterministic References: <87mukh6vjq.fsf@cbaines.net> <87ef5shjpj.fsf@gnu.org> Date: Fri, 14 Jun 2019 23:43:43 +0200 In-Reply-To: <87ef5shjpj.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 23 Apr 2019 16:36:40 +0200") Message-ID: <87tvcrhmgg.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35387-done Cc: 35387-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s skribis: > What about writing it like this: > > (define (first-subdirectory directory) > "Return the file name of the first sub-directory of DIRECTORY." > (match (scandir directory > (lambda (file) > (and (not (member file '("." ".."))) > (file-is-directory? (string-append directory "= /" > file))))) > ((first . _) first))) > > The result will be deterministic since =E2=80=98scandir=E2=80=99 sorts en= tries. Pushed as cfd4e4d06e3cda0f3eed8d6b9277ce53e55404b8 on =E2=80=98core-updates= =E2=80=99. Thanks, Ludo=E2=80=99.