From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#17946: Try LOGNAME in addition to USER Date: Sat, 05 Jul 2014 15:12:48 +0200 Message-ID: <877g3suey7.fsf@gnu.org> References: <87wqbsc78j.fsf@taylan.uni.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3Pmd-0005gn-Cf for bug-guix@gnu.org; Sat, 05 Jul 2014 09:14:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3Pm2-0001Lk-FA for bug-guix@gnu.org; Sat, 05 Jul 2014 09:13:39 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:52361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3Pm2-0001Ld-Cg for bug-guix@gnu.org; Sat, 05 Jul 2014 09:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X3Pm2-0006Ac-6B for bug-guix@gnu.org; Sat, 05 Jul 2014 09:13:02 -0400 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <87wqbsc78j.fsf@taylan.uni.cx> (Taylan Ulrich Bayirli's message of "Sat, 05 Jul 2014 15:36:44 +0300") 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.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Taylan Ulrich Bayirli/Kammer Cc: 17946-done@debbugs.gnu.org Taylan Ulrich Bayirli/Kammer skribis: > Cron jobs may set the LOGNAME environment variable but no USER, > e.g. under Debian 7 (wheezy). In that case 'guix package' fails to > use $localstatedir/guix/profiles/per-user/$user. From a quick grep I > couldn't find more places in Guix where USER is used, so here's a > patch that just does it straightforwardly in two places in > scripts/package.scm, but perhaps a more generic solution would be good > for the future. Good catch. I agree we=E2=80=99ll need to factorize that eventually. > From 902267cf99aacaea994cc95b77551f0d2bd35836 Mon Sep 17 00:00:00 2001 > From: Taylan Ulrich B > Date: Sat, 5 Jul 2014 15:28:50 +0300 > Subject: [PATCH] Try LOGNAME in addition to USER. > > Notoriously, cron jobs may set LOGNAME only and not USER. See > e.g. crontab(5) under Debian 7 (wheezy). > > * guix/scripts/package.scm (%profile-directory) > (guix-package): Also try LOGNAME if USER is unset. Pushed after tweaking the commit log. Thanks! Ludo=E2=80=99.