[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/6] emacs: Find packages in system profiles.
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH 3/6] emacs: Find packages in system profiles. |
Date: |
Tue, 12 Jan 2016 21:28:55 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Alex Kost <address@hidden> 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 to...
> (profile->specifications+paths): ... this. Use a single 'profile' argument.
[...]
> +(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’re calling /run/current-system the system profile, which
leads to the ‘system?’ Boolean here, but the system profile really is
/run/current-system/profile.
I had overlooked it, but wouldn’t it be easier if patch #2 did:
+(defvar guix-system-profile
+ (concat guix-config-state-directory "/profiles/system/profile")
+ "System profile.")
?
Ludo’.
- Re: [PATCH 1/6] guix system: Export <boot-parameters> accessors., (continued)
[PATCH 2/6] emacs: profiles: Add 'guix-system-profile'., Alex Kost, 2016/01/10
[PATCH 4/6] emacs: Replace 'generation-diff' search with 'profile-diff'., Alex Kost, 2016/01/10
[PATCH 3/6] emacs: Find packages in system profiles., Alex Kost, 2016/01/10
- Re: [PATCH 3/6] emacs: Find packages in system profiles.,
Ludovic Courtès <=
[PATCH 5/6] emacs: Remove 'generation' search type., Alex Kost, 2016/01/10
[PATCH 6/6] emacs: Add interface for system generations., Alex Kost, 2016/01/10