From: Achim Gratz <Stromeko@nexgo.de>
To: cygwin-apps@cygwin.com
Subject: Re: [PATCH cygport] lib/src_postinst.cygpart: parallelize __prepstrip
Date: Sun, 02 Apr 2023 21:28:54 +0200 [thread overview]
Message-ID: <875yaeaxs9.fsf@Rainer.invalid> (raw)
In-Reply-To: <427a2a31-26d1-7d0d-f90f-767546aac933@dronecode.org.uk> (Jon Turney via Cygwin-apps's message of "Sun, 2 Apr 2023 18:39:50 +0100")
Jon Turney via Cygwin-apps writes:
>> Exchange the while loop using an iffy read construct to a for loop using a temporary file.
>
> I think this change from zero-delimited to whitespace means this will
> now fail to handle any filenames containing whitespace correctly?
Yes, sorry. I thought whitespace in filenames wasn't working anyway,
but at least here it was done correctly.
> This commentary doesn't clearly identify what is wrong with the usage
> of read here.
The read itself was OK, piping the data from find into the read wasn't.
I've replaced this with a process substitution and thus reinstated the
whitespace protection without getting into subshell trouble.
>> avoid filename collisions by using an
>> SHA256 hash of the full file name.
>
> I think there is already a perfectly good, filesystem safe,
> computationally cheap unique identifier for each filename, which is
> it's ordinal number in the list of filenames we are examining.
I've implemented a counter now. However I don't see the hashing of a
filename as onerous when Git does that much more often and on much
larger data.
> 'wait -f' seems to be new in bash 5.0. I assume this fails horribly
> on earlier bash versions. I'm ok with requiring that, but maybe we
> should check the bash version?
It should indeed be possible to drop the -f as long as job control is not
enabled if I understand the manual correctly after re-reading it several
times. I've done that and it looks like things still work.
> On the plus side, the testsuite passes! :)
Oh goody!
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
prev parent reply other threads:[~2023-04-02 19:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-26 18:12 Jon Turney
2023-03-27 18:43 ` Jon Turney
2023-03-30 19:49 ` Achim Gratz
2023-03-30 20:34 ` Jon Turney
2023-04-02 17:39 ` Jon Turney
2023-04-02 19:28 ` Achim Gratz [this message]
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=875yaeaxs9.fsf@Rainer.invalid \
--to=stromeko@nexgo.de \
--cc=cygwin-apps@cygwin.com \
/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).