mbox series

[bug#50873,0/5] Fixes to ‘guix home import’

Message ID cover.1632849969.git.public@yoctocell.xyz
Headers show
Series Fixes to ‘guix home import’ | expand

Message

Xinglu Chen Sept. 28, 2021, 5:33 p.m. UTC
This series makes some fixes to the ‘guix home import’ subcommand which
brings it into a usable state.

The last patch documents the subcommand in the manual.

As a sidenote, the ‘manifest->code’ procedure in (guix scripts home
import), which is based on ‘manifest->code’ from (guix profiles) should
probably be factorized with the original ‘manifest->code’ procedure.

Xinglu Chen (5):
  guix home: import: Make the user to specify a destination directory.
  guix home: import: Allow multiple modules to be imported for each
    service.
  guix home: import: Fix module name for Bash service.
  guix home: import: Delete duplicate modules when importing.
  doc: Document the ‘guix home import’ subcommand.

 doc/guix.texi                |  33 ++++++++++
 guix/scripts/home.scm        |  25 +++++---
 guix/scripts/home/import.scm | 118 ++++++++++++++++++++---------------
 3 files changed, 116 insertions(+), 60 deletions(-)


base-commit: 5edfa6d15e5bb92609ecff7e37e3985eced1dd4d

Comments

Ludovic Courtès Oct. 2, 2021, 3:13 p.m. UTC | #1
Xinglu Chen <public@yoctocell.xyz> skribis:

> This series makes some fixes to the ‘guix home import’ subcommand which
> brings it into a usable state.
>
> The last patch documents the subcommand in the manual.
>
> As a sidenote, the ‘manifest->code’ procedure in (guix scripts home
> import), which is based on ‘manifest->code’ from (guix profiles) should
> probably be factorized with the original ‘manifest->code’ procedure.
>
> Xinglu Chen (5):
>   guix home: import: Make the user to specify a destination directory.
>   guix home: import: Allow multiple modules to be imported for each
>     service.
>   guix home: import: Fix module name for Bash service.
>   guix home: import: Delete duplicate modules when importing.
>   doc: Document the ‘guix home import’ subcommand.

Could you (Xinglu, Andrew, Oleg?) add tests for this?  I think
Scheme-level tests like we have for the ‘guix import’ code would be
fine.  It would also help review because it’d give a clearer view of how
this is supposed to work.

Thanks for following up on this!

Ludo’.
Xinglu Chen Oct. 2, 2021, 6:45 p.m. UTC | #2
On Sat, Oct 02 2021, Ludovic Courtès wrote:

> Xinglu Chen <public@yoctocell.xyz> skribis:
>
>> This series makes some fixes to the ‘guix home import’ subcommand which
>> brings it into a usable state.
>>
>> The last patch documents the subcommand in the manual.
>>
>> As a sidenote, the ‘manifest->code’ procedure in (guix scripts home
>> import), which is based on ‘manifest->code’ from (guix profiles) should
>> probably be factorized with the original ‘manifest->code’ procedure.
>>
>> Xinglu Chen (5):
>>   guix home: import: Make the user to specify a destination directory.
>>   guix home: import: Allow multiple modules to be imported for each
>>     service.
>>   guix home: import: Fix module name for Bash service.
>>   guix home: import: Delete duplicate modules when importing.
>>   doc: Document the ‘guix home import’ subcommand.
>
> Could you (Xinglu, Andrew, Oleg?) add tests for this?  I think
> Scheme-level tests like we have for the ‘guix import’ code would be
> fine.  It would also help review because it’d give a clearer view of how
> this is supposed to work.

Sure!

> Thanks for following up on this!

You are welcome!  :-)
Xinglu Chen Oct. 10, 2021, 10:19 a.m. UTC | #3
Change since v1:

* Remove uses of ‘slurp-file-gexp’.

* Add tests for the Scheme API of (guix scripts home import).

Xinglu Chen (7):
  guix home: import: Make the user to specify a destination directory.
  guix home: import: Allow multiple modules to be imported for each
    service.
  guix home: import: Fix module name for Bash service.
  guix home: import: Don’t use 'slurp-file-gexp'.
  guix home: import: Delete duplicate modules when importing.
  doc: Document the ‘guix home import’ subcommand.
  Add tests for ‘guix home import’.

 Makefile.am                  |   1 +
 doc/guix.texi                |  32 +++++++
 guix/scripts/home.scm        |  25 +++--
 guix/scripts/home/import.scm | 115 +++++++++++++----------
 tests/home-import.scm        | 174 +++++++++++++++++++++++++++++++++++
 5 files changed, 289 insertions(+), 58 deletions(-)
 create mode 100644 tests/home-import.scm


base-commit: edbcbdabac9a64dba3850b0f7e596b396f044599