From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 3/6] emacs: Find packages in system profiles. Date: Tue, 12 Jan 2016 21:28:55 +0100 Message-ID: <878u3ubkzc.fsf@gnu.org> References: <1452419630-4399-1-git-send-email-alezost@gmail.com> <1452419630-4399-4-git-send-email-alezost@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJ5Yu-0007lX-FH for guix-devel@gnu.org; Tue, 12 Jan 2016 15:29:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJ5Yp-0001lp-FW for guix-devel@gnu.org; Tue, 12 Jan 2016 15:29:04 -0500 In-Reply-To: <1452419630-4399-4-git-send-email-alezost@gmail.com> (Alex Kost's message of "Sun, 10 Jan 2016 12:53:47 +0300") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Alex Kost skribis: > For a usual profile, packages are placed in a profile directory itself, > but for a system profile, packages are placed in 'profile' > sub-directory. So we need to do some special cases for system profiles > to find packages there as well. > > * emacs/guix-base.el (guix-packages-profile): New procedure. > (guix-manifest-file): Use it. Add optional 'system?' argument. > * emacs/guix-ui-generation.el (guix-system-generation?) > (guix-generation-current-packages-profile): New procedures. > (guix-generation-packages, guix-generation-insert-packages) > (guix-generation-packages-buffer): Add optional 'system?' argument. > (guix-profile-generation-manifest-file) > (guix-profile-generation-packages-buffer): Adjust accordingly. > * emacs/guix-main.scm (generation-package-specifications+paths): Rename t= o... > (profile->specifications+paths): ... this. Use a single 'profile' argu= ment. [...] > +(defun guix-packages-profile (profile &optional generation system?) > + "Return a directory where packages are installed for the > +PROFILE's GENERATION. > + > +If SYSTEM? is non-nil, then PROFILE is considered to be a system > +profile. Unlike usual profiles, for a system profile, packages > +are placed in 'profile' subdirectory." > + (let ((profile (if generation > + (guix-generation-file profile generation) > + profile))) > + (if system? > + (expand-file-name "profile" profile) > + profile))) It seems you=E2=80=99re calling /run/current-system the system profile, whi= ch leads to the =E2=80=98system?=E2=80=99 Boolean here, but the system profile= really is /run/current-system/profile. I had overlooked it, but wouldn=E2=80=99t it be easier if patch #2 did: --=-=-= Content-Type: text/x-patch Content-Disposition: inline +(defvar guix-system-profile + (concat guix-config-state-directory "/profiles/system/profile") + "System profile.") --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 DQo/DQoNCkx1ZG/igJkuDQo= --=-=-=--