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

From: Maxim Cournoyer <[email-masked]>
Date: Wed, 30 Jun 2021 12:54:09 -0400

Hi Zimoun,

zimoun <[email-masked]> writes:

> Hi,
>
> I am a bit late to the party.
>
> Thanks for this good idea of pack.  Neat!
>
>
> On Wed, 30 Jun 2021 at 11:15, Ludovic Courtès <[email-masked]> wrote:
>
>> Also, what happens if you do:
>>
>>   sudo apt install guix
>>   guix install stuff …
>>   sudo apt install ./guix-pack-generated.deb
>>
>> ?
>>
>> Will that overwrite things in /gnu/store?

After thinking it out some more, yes!  This is because the files are not
part of another deb, so dpkg will just claim ownership of the files.

>> Admittedly it makes little sense to do something like this, but that’s
>> something one could do.

Indeed.  I'll a disclaimer in the manual.

> The simple scenario:
>
>   scp \
>     $(guix pack -f deb hello -C xz -S /usr/bin/hello=bin/hello) \
>     remote:/tmp/
>   ssh remote
>   sudo apt install /tmp/…-hello-deb-pack.deb
>   realpath $(which hello)
>   /gnu/store/…-hello-2.10/bin/hello
>
> works fine.  Then, I am probably doing wrong:
>
>   sudo apt remove hello
>   hello
>   -bash: hello: command not found
>
>    guix help
>    bash: /home/simon/.config/guix/current/bin/guix: /gnu/store/…-guile-wrapper/bin/guile: bad interpreter: No such file or directory

So uninstalling the hello deb caused all the files "owned" by that
debian package to be removed, breaking the guix installed on that same
system.

It's becoming obvious that the deb-packs are not to be used on systems
where Guix is already installed nor mixed with other non-deb packs.
That's unfortunate, but there doesn't seem to be much we can do other
than document these shortcomings.

> I have not investigated.  Just a quick test for this nice new feature.

Thanks for the feedback!

Maxim