From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mr5.vodafonemail.de (mr5.vodafonemail.de [145.253.228.165]) by sourceware.org (Postfix) with ESMTPS id EE4C43858D1E for ; Sat, 8 Jul 2023 14:23:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EE4C43858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nexgo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nexgo.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexgo.de; s=vfde-smtpout-mb-15sep; t=1688826198; bh=/fxZIplGdbS0Rmv5EHxHVMTQU9yP8KBor4AmqBhUJPw=; h=From:To:Subject:References:Date:In-Reply-To:Message-ID:User-Agent: Content-Type:From; b=k13sD9cg4P54y5cQ1mU1/ShR1mfKE7BQCMdQH9QzidIjAVQVw1oh6EU/YplekFz9p c0ZK4D8RrBqevb0TVS5o+lE4VcqBvSLuwH4l8ZtPmhLgMrJ+7xlD2kkV8SNl28kRWS 2yUSV17S18fgWId3d0NxcnMNfp59LGKkFBGcm3S8= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr5.vodafonemail.de (Postfix) with ESMTPS id 4Qystt38vRz1yJD for ; Sat, 8 Jul 2023 14:23:18 +0000 (UTC) Received: from Gerda (p54a0ce45.dip0.t-ipconnect.de [84.160.206.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4Qystp1MPyz9sPB for ; Sat, 8 Jul 2023 14:23:11 +0000 (UTC) From: ASSI To: cygwin-apps@cygwin.com Subject: Re: chattr makes cygport slow References: <3gbdai9h69p2c67lv8g7f873hje9skmglq@4ax.com> <6oudaidfkn4d7fnharmh7u3f3ionrcrgl0@4ax.com> <820bb54e-770e-5994-465a-476b88e74180@dronecode.org.uk> Date: Sat, 08 Jul 2023 16:22:59 +0200 In-Reply-To: <820bb54e-770e-5994-465a-476b88e74180@dronecode.org.uk> (Jon Turney via Cygwin-apps's message of "Sat, 8 Jul 2023 13:16:22 +0100") Message-ID: <87bkgma3ek.fsf@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-purgate-type: clean X-purgate: clean X-purgate-size: 4156 X-purgate-ID: 155817::1688826194-EEFFA90D-4EF5477F/0/0 X-Spam-Status: No, score=-3036.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Jon Turney via Cygwin-apps writes: > So, the idea here is that we try to ensure it's on, at least for the > working directory. That IMHO should only be done when the working directory is created, but not retroactively applied to an existing workdir. > Skipping it when 'finish' is used isn't right, because then 'finish > all' wouldn't work as desired. But yeah, it seems that this is in the > wrong place. I'll look into moving it. Meanwhile I've done this: --8<---------------cut here---------------start------------->8--- if [ $OSTYPE =3D "cygwin" ] then + [ -n "$(find ${workdir} -maxdepth 0 -empty)" ] && chattr -fR +C ${workdir} >/dev/null 2>&1 || true fi --8<---------------cut here---------------end--------------->8--- I think it should be moved into a function that can be called before the prep command, but I haven't actually tried it for a longer time or checked what tests need changing due to the extra output: --8<---------------cut here---------------start------------->8--- >From 4be00357be8cb14493413b7c8c80777671c21e5d Mon Sep 17 00:00:00 2001 Subject: [PATCH] cygport.in: move case-sensitivity testing / enabling into functions --- bin/cygport.in | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/bin/cygport.in b/bin/cygport.in index 02e9b7bf..a6dabc91 100755 --- a/bin/cygport.in +++ b/bin/cygport.in @@ -577,25 +577,36 @@ declare -r pkg_count=3D${#pkg_name[*]}; # this requires workdir to be already defined mkdir -p ${workdir} =20 -if [ $OSTYPE =3D "cygwin" ] -then - chattr -fR +C ${workdir} >/dev/null 2>&1 || true -fi - -rm -f ${workdir}/.probe_case_sensitivity -touch ${workdir}/.PROBE_CASE_SENSITIVITY -probe=3D$( [ -f ${workdir}/.probe_case_sensitivity ] && echo "failed" || e= cho "" ) -rm -f ${workdir}/.PROBE_CASE_SENSITIVITY -if [ -n "$probe" ] -then +__enable_case_sensitivity() { + inform "Trying to enable case sensitivity on ${workdir}" + if [ $OSTYPE =3D "cygwin" ] + then + [ -n "$(find ${workdir} -maxdepth 0 -empty)" ] && + chattr -fR +C ${workdir} >/dev/null 2>&1 || true + __probe_case_sensitivity + fi +} + +__probe_case_sensitivity() { + mkdir -p ${workdir} + rm -f ${workdir}/.probe_case_sensitivity + touch ${workdir}/.PROBE_CASE_SENSITIVITY + local probe=3D$( [ -f ${workdir}/.probe_case_sensitivity ] && echo "fa= iled" || echo "" ) + rm -f ${workdir}/.PROBE_CASE_SENSITIVITY + if [ -n "$probe" ] + then if defined _CYGPORT_RESTRICT_case_insensitive_ then - error "Package ${NAME} cannot be built on a case-insensitive filesystem"; + error "Package ${NAME} cannot be built on a case-insensitive filesyst= em"; else - warning "Building on a case-insensitive filesystem"; + warning "Building on a case-insensitive filesystem"; fi -fi -unset probe + false + else + inform "Building on a case-sensitive filesystem"; + true + fi +} =20 # this requires S and B to be already defined if ! defined _CYGPORT_RESTRICT_debuginfo_ @@ -638,15 +649,18 @@ while (( arg_n < argc )) do case ${argv[${arg_n}]} in downloadall|fetchall|wgetall|getall) + __probe_case_sensitivity || __enable_case_sensitivity; __src_fetch; _status=3D$?; ;; download|fetch|wget|get) + __probe_case_sensitivity || __enable_case_sensitivity; __DL_ONLY_MISSING=3D1 __src_fetch; _status=3D$?; ;; prepare|unpack|prep) - __stage Preparing; + __probe_case_sensitivity || __enable_case_sensitivity; + __stage Preparing; __src_prep; _status=3D$?; ;; --=20 2.41.0 --8<---------------cut here---------------end--------------->8--- > I think there's possibly something else going wrong if it's taking 5 > minutes, as that seems excessive. Try it on the gcc build dir=E2=80=A6 Regards, Achim. --=20 +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds