From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: bug#40344: inconsistent 'guix package --list-generations' for root Date: Tue, 31 Mar 2020 11:45:48 -0400 Message-ID: <20200331154548.GA9695@jasmine.lan> References: <20200331085436.GD5436@E5400> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:37188) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJJ5Y-0000ZO-5q for bug-guix@gnu.org; Tue, 31 Mar 2020 11:46:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJJ5W-0005u6-4P for bug-guix@gnu.org; Tue, 31 Mar 2020 11:46:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53544) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJJ5V-0005tw-Te for bug-guix@gnu.org; Tue, 31 Mar 2020 11:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jJJ5V-00081d-Q1 for bug-guix@gnu.org; Tue, 31 Mar 2020 11:46:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <20200331085436.GD5436@E5400> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: Efraim Flashner Cc: 40344@debbugs.gnu.org On Tue, Mar 31, 2020 at 11:54:36AM +0300, Efraim Flashner wrote: > When I run 'sudo guix package --list-generations' on a foreign distro > I get a list of all the profiles for all the users, not just for root. It's complicated on foreign distros, since they vary in how they configure sudo, and since Guix is really based on login environments. I think it's correct that you'd see your own user's generations. Doing `sudo foo` doesn't totally change your user from Guix's point of view, just your privilege level. You'd need `sudo --login` to become root. Try `env`, `sudo env`, `sudo --login env`... It's definitely not expected to see all the users' generations, though (I can't reproduce that). Exactly how it works on the foreign distro will probably vary by distro and setup, however. `sudo guix ...` doesn't work at all on my Debian; it fails with "sudo: guix: command not found" and I have to use `sudo --login`.