qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] target/hexagon/idef-parser/prepare: use env to invoke bash


From: Samuel Tardieu
Subject: Re: [PATCH] target/hexagon/idef-parser/prepare: use env to invoke bash
Date: Mon, 25 Dec 2023 09:15:26 +0100
User-agent: mu4e 1.10.8; emacs 29.1


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 via email to

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