[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dragora-members] Qi 2.0rc14

From: Michael Siegel
Subject: Re: [Dragora-members] Qi 2.0rc14
Date: Sun, 2 Aug 2020 00:24:50 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Am 01.08.20 um 22:08 schrieb Matias Fonzo:
> El 2020-08-01 07:39, Michael Siegel escribió:
>> Am 01.08.20 um 06:27 schrieb Matias Fonzo:


> I'm talking about that the block text on the usage() contains variables
> names to be reflected, such as $jobs.
> If you use single quotes, like cat << 'EOF' it won't be expanded, the
> value will not be reflected.


> The only thing that matters that it is not under single quotes is the
> variable $PROGRAM in the usage (first line, currently).

Ah, okay. Well, I'd simply hard-code "qi" into the help text then. It's
unlikely to change its name anyway, and it's only two letters.


>>> - cat(1) is an external command: If this command is not available
>>> for some reason, goodbye to printing help.
>> Okay, but:
>>   1. If you don't have cat(1) available on a Unix-like, largely
>>      POSIX-compliant system, something is seriously wrong.
> Yes, of course.  It would be strange, though not impossible.  If the
> scenario is an embedded system, cat(1) may not be available there, nor
> would a shell make much sense, but you never know.

I see. But:

  * Is this even a realistic scenario for Dragora?

  * Shouldn't people who run such a system, i.e., a very non-standard
    system, know what they're doing and not expect things to just work
    like on a standard system? I think so.

  * BusyBox has cat(1) too.

So, in short: I'd really just say "No cat(1)? No Qi." You just gotta
have cat(1). That's really not too much to ask, IMO. It's one of the
basic tools in the standard Unix toolbox, after all.

>>   2. You're checking for the availability of cat(1) before it is used,
>>      aren't you? So, cat(1) not being available would trigger an error
>>      and make Qi stop, right?
> This is not after usage() or when you pass --help; it is before checking
> the targetdir and rootdir directories, before entering the loop for the
> action, currently.
> There is no need to check cat(1), I already changed it, I modified the
> do_meta() function to make it more efficient.  As soon as I can I will
> send another RC, I am still implementing the SOURCE_DATE_EPOCH
> environment variable[1] (tarlz 0.17 has been released and now supports
> the --mtime option that I requested ;-).
> [1] https://reproducible-builds.org/specs/source-date-epoch/

I see. Well, if cat(1) is being used anywhere, and if only to print help
text, Qi should check for its availability before using it.

Well, I'll just wait for your new RC and then have a look.

>>> - Here documents have tmpfile penalty: Behind the scenes in the shell
>>> it creates a temporary file every << here document.  Then opens it
>>> and redirects the input from it.  And removes it after it is done.
>> I see. But why exactly is this relevant? If it's a performance argument,
>> I'd say it doesn't really matter.
> It relates to space and file system attributes.  It is based on TMPDIR
> (or /tmp if not defined).

Okay, but that temporary file will be around 3 kilobytes in size or some
such, right? Should we really worry about 3kB when it makes sense to use

I don't know about the second aspect (file system attributes), though.
I'll try to read up on that if I find the time.


> I'll try to be on the website content as soon as I
> find the time.  :-)

Sounds good.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]