From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:36057) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hhMlH-0001rm-Qs for guix-patches@gnu.org; Sat, 29 Jun 2019 19:28:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hhMlG-0007Wu-OC for guix-patches@gnu.org; Sat, 29 Jun 2019 19:28:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59747) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hhMlG-0007WS-CF for guix-patches@gnu.org; Sat, 29 Jun 2019 19:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hhMlG-0007g0-4H for guix-patches@gnu.org; Sat, 29 Jun 2019 19:28:02 -0400 Subject: [bug#30256] [PATCH 3/3] scripts: environment: Add --no-cwd. References: <7bc71eaa3cff48ec7dc0d4fe406dde9482b716a9.1516937216.git.mtg@gnu.org> In-Reply-To: <7bc71eaa3cff48ec7dc0d4fe406dde9482b716a9.1516937216.git.mtg@gnu.org> Resent-Message-ID: Date: Sat, 29 Jun 2019 23:27:43 +0000 From: Carl Dong Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Carl Dong Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: "30256@debbugs.gnu.org" <30256@debbugs.gnu.org> Hi Mike and Ludo! I believe I've found a solution to the problem that Ludo was encountering. = The reason why Ludo was having trouble was because when a user specifies `--use= r`, we rewrite the targets of our filesystem mappings so that every instance of `$HOME` (as seen ouside the container) becomes `/home/$USER`. Since this ap= plied to all filesystem mappings, it included our filesystem mappings for inputs = too. However, our symlinks were not updated. My change makes it so that we _only_ update the mappings that are either user-specified, or cwd (if applicable). This solves Ludo's problems. Here's the patch, let me know if it looks good: https://github.com/dongcarl/guix/compare/8e92d5465fc154fed5d06f7e4a64d7dccc= ded74d...2019-06-env-no-cwd-fix.patch Cheers, Carl Dong