Subject: bug#40816: closed (Re: bug#40816: ‘guix pack-R’ wrapper swallows exit code)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 24 Apr 2020 14:24:02 +0000

Your bug report

#40816: ‘guix pack -R’ wrapper swallows exit code

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
40816: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40816
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#40816: ‘guix pack -R’ wrapper swallows exit code
From: Ludovic Courtès <[email-masked]>
To: [email-masked]
Cc: Jan Nieuwenhuizen <[email-masked]>
Date: Fri, 24 Apr 2020 16:23:36 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Ludovic Courtès <[email-masked]> skribis:

> As janneke reported earlier today, wrappers generated by ‘guix pack -R’
> (or ‘-RR’) swallow the program’s exit code when running in user
> namespace mode:

Fixed in 2520059bdb43fa1663ce102f3f4c442d4918c32b!

Ludo’.

Subject: ‘guix pack -R’ wrapper swallows exit code
From: Ludovic Courtès <[email-masked]>
To: [email-masked]
Date: Fri, 24 Apr 2020 14:29:46 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello!

As janneke reported earlier today, wrappers generated by ‘guix pack -R’
(or ‘-RR’) swallow the program’s exit code when running in user
namespace mode:

--8<---------------cut here---------------start------------->8---
$ mkdir /tmp/pack
$ (cd /tmp/pack; tar xf $(guix pack -R sed -S /bin=bin))
$ unshare -mrf sh -c 'mount -t tmpfs none /gnu; /tmp/pack/bin/sed --whatever'
/tmp/pack/bin/sed: unrecognized option '--whatever'

[...]

$ echo $?
0
$ guix describe
Generacio 139	Apr 13 2020 21:50:08	(nuna)
  guix bad368b
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: bad368b0d794689f3a8a11b58f1ea4987938682e
--8<---------------cut here---------------end--------------->8---

(The ‘unshare’ trick, also used in ‘tests/guix-pack-relocatable.sh’,
allows me to pretend there’s no /gnu/store on my machine.)

Ludo’.