qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Tardieu <samuel.tardieu@telecom-paris.fr>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] target/hexagon/idef-parser/prepare: use env to invoke bash
Date: Mon, 25 Dec 2023 09:15:26 +0100	[thread overview]
Message-ID: <87il4melcj.fsf@telecom-paris.fr> (raw)
In-Reply-To: <521bbe69-3ed2-4416-89b4-40efe1bc3055@tls.msk.ru>


Michael Tokarev <mjt@tls.msk.ru> writes:

>> -#!/bin/bash
>> +#!/usr/bin/env bash
>
> What's the reason for this indirection?  bash has been /bin/bash 
> for decades,
> it is used this way in many other places in qemu code and in 
> other projects.
> Yes I know about current move /bin => /usr/bin etc, but the 
> thing is that
> traditional paths like this one (or like /bin/sh) is not going 
> away any time
> soon.  What's the matter here?

In addition to Stefan's answer, some modern systems use a per-user 
file system hierarchy where each user (or even each environment 
development for a user)  gets a global set of directories with 
only the applications they want. This is done either through 
adding each application directory into the user PATH or by using a 
set of user-specific bin/lib/... directories full of symlinks to 
the chosen applications.

In those environments, /usr/bin might only contain "env", such as 
"/usr/bin/env application" works. This is the case for example on 
NixOS, which is more and more used in research environments for 
their easily reproducible build environments.

  Sam
-- 
Samuel Tardieu
Télécom Paris - Institut Polytechnique de Paris


  reply	other threads:[~2023-12-25  8:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20231123205742.630004-1-sam@rfc1149.net>
2023-12-25  8:05 ` [PATCH] target/hexagon/idef-parser/prepare: use env to invoke bash Michael Tokarev
2023-12-25  8:15   ` Samuel Tardieu [this message]
2023-12-25  8:17   ` Stefan Weil via
2023-11-23 21:15 Samuel Tardieu
2023-11-23 21:18 ` Philippe Mathieu-Daudé
2023-11-24 11:10 ` Anton Johansson via
2023-11-28 13:14 ` Philippe Mathieu-Daudé

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=87il4melcj.fsf@telecom-paris.fr \
    --to=samuel.tardieu@telecom-paris.fr \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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 NNTP newsgroup(s).