Subject: bug#33285: Installing, then removing, a package yields a different profile

From: [email-masked] (Ludovic Courtès)
Date: Tue, 06 Nov 2018 15:25:55 +0100

Hi,

Chris Marusich <[email-masked]> skribis:

> I've noticed that if I do the following...
>
> guix package -p .guix-profile -i hello
> guix package -p .guix-profile -i coreutils
> guix package -p .guix-profile -r coreutils
>
> ...I get profile generations like the following:
>
> .guix-profile-1-link  ->  /gnu/store/mbvwb1pv8ps0l39gil41g4zj3khx3r8p-profile
> .guix-profile-2-link  ->  /gnu/store/m6cwnnxcccnd8bga52jxn74vm67n7ry1-profile
> .guix-profile-3-link  ->  /gnu/store/qfpmx9rz7kxa8w8r2pz4vj8ilbi70dcp-profile
>
> However, the 1st and 3rd generations are practically the same:
>
> $ diff -r /gnu/store/mbvwb1pv8ps0l39gil41g4zj3khx3r8p-profile /gnu/store/qfpmx9rz7kxa8w8r2pz4vj8ilbi70dcp-profile
> diff -r /gnu/store/mbvwb1pv8ps0l39gil41g4zj3khx3r8p-profile/etc/profile /gnu/store/qfpmx9rz7kxa8w8r2pz4vj8ilbi70dcp-profile/etc/profile
> 11c11
> < export PATH="${GUIX_PROFILE:-/gnu/store/mbvwb1pv8ps0l39gil41g4zj3khx3r8p-profile}/bin${PATH:+:}$PATH"
> ---
>> export PATH="${GUIX_PROFILE:-/gnu/store/qfpmx9rz7kxa8w8r2pz4vj8ilbi70dcp-profile}/bin${PATH:+:}$PATH"
> [1] [email-masked]:/tmp/tmp.ZOTdkBr4rD
> $ 
>
> Now, this isn't really a problem, since it isn't wasting space, and it
> doesn't take long to build.  It's more of a curiosity.  Why is it that
> profile generations 1 and 3 don't both point to the same profile in the
> store?  Is this expected behavior?

It’s not!  Could you look at the derivers of these two profiles (use
‘guix gc --derivers’) and see what differs?

Thanks,
Ludo’.