Subject: [bug#49149] [PATCH 0/7] Add deb format for guix pack.

From: Maxim Cournoyer <[email-masked]>
Date: Wed, 30 Jun 2021 14:36:47 -0400

Hello,

Ludovic Courtès <[email-masked]> writes:

> Maxim Cournoyer <[email-masked]> skribis:
>
>> Instead of just naming them by their pack type, add information from the
>> package(s) they contain to make it easier to differentiate them.
>>
>> * guix/scripts/pack.scm (define-with-source): New macro.
>> (manifest->friendly-name): Extract procedure from ...
>> (docker-image): ... here, now defined via the above macro.  Adjust REPOSITORY
>> argument value accordingly.
>> (guix-pack): Derive NAME using MANIFEST->FRIENDLY-NAME.
>
> [...]
>
>> -            (define tag
>> -              ;; Compute a meaningful "repository" name, which will show up in
>> -              ;; the output of "docker images".
>> -              (let ((manifest (profile-manifest #$profile)))
>> -                (let loop ((names (map manifest-entry-name
>> -                                       (manifest-entries manifest))))
>> -                  (define str (string-join names "-"))
>> -                  (if (< (string-length str) 40)
>> -                      str
>> -                      (match names
>> -                        ((_) str)
>> -                        ((names ... _) (loop names))))))) ;drop one entry
>
> I think this should not be factorized because the requirements are very
> Docker-dependent.  Once factorized, it becomes easy to overlook this.

Hmm, I'm not a docker format expert, but my quick reading about it
turned no restrictions about what a docker image label should look like?
So perhaps it is not specially Docker-dependent.

If there's something truly Docker-dependent about it I'd suggest adding
a #:docker-compatible? boolean option to the procedure.

Maxim