Re: Unexpected results with Guix.

2019-11-07 Thread pelzflorian (Florian Pelz)
On Thu, Nov 07, 2019 at 04:46:19PM +, Jone wrote:
> Solved! Thanks.
> (I forgot about ANOTHER profile, created a year ago. All is from there..)

I am glad it is solved.  Please tell us if you think something in the
manual or other documentation can be improved.

Regards,
Florian



Re: Unexpected results with Guix.

2019-11-07 Thread Jone
Solved! Thanks.
(I forgot about ANOTHER profile, created a year ago. All is from there..)


Re: Unexpected results with Guix.

2019-11-07 Thread pelzflorian (Florian Pelz)
On Thu, Nov 07, 2019 at 11:51:52AM +0100, pelzflorian (Florian Pelz) wrote:
> On Thu, Nov 07, 2019 at 01:39:43PM +, Jone wrote:
> > 
> > We seem to be going in circles =)
> > > for r in $(guix gc --list-roots); do ls -l $r; done
> > 
> 
> You want to delete /gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile.
> 
> `for r in $(guix gc --list-roots); do ls -l $r; done` should list what
> links to the profile
> /gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile.  That is what you
> need to delete.
> 

You need to delete the link to
/gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile
not
/gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile
itself.

for r in $(guix gc --list-roots); do ls -l $r; done
shows the link to
/gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile.



Re: Unexpected results with Guix.

2019-11-07 Thread Jone


> That is what you need to delete.

But this should do himself Guix? But ok, trying to delete:

sudo rm -rf /gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile
rm: cannot remove ... Read-only file system
 - for all files in /gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile







Re: Unexpected results with Guix.

2019-11-07 Thread pelzflorian (Florian Pelz)
On Thu, Nov 07, 2019 at 01:39:43PM +, Jone wrote:
> 
> We seem to be going in circles =)
> > for r in $(guix gc --list-roots); do ls -l $r; done
> 

You want to delete /gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile.

`for r in $(guix gc --list-roots); do ls -l $r; done` should list what
links to the profile
/gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile.  That is what you
need to delete.

Regards,
Florian



Re: Unexpected results with Guix.

2019-11-07 Thread Jone


We seem to be going in circles =)
> for r in $(guix gc --list-roots); do ls -l $r; done

lrwxrwxrwx 1 jone users 51 Oct 30 14:31 
/var/guix/profiles/per-user/jone/current-guix-16-link ->
/gnu/store/bcbvw5n1pna08pj7zqfflb5zs9yfj90y-profile
lrwxrwxrwx 1 jone users 51 Oct 30 14:31 
/var/guix/profiles/per-user/jone/current-guix-16-link ->
/gnu/store/bcbvw5n1pna08pj7zqfflb5zs9yfj90y-profile
lrwxrwxrwx 1 jone users 51 Nov  5 20:23 
/var/guix/profiles/per-user/jone/guix-profile-163-link ->
/gnu/store/bg3x5nbsrb79lr7bz79fwq1w3kg4pvic-profile
lrwxrwxrwx 1 jone users 51 Nov  5 20:23 
/var/guix/profiles/per-user/jone/guix-profile-163-link ->
/gnu/store/bg3x5nbsrb79lr7bz79fwq1w3kg4pvic-profile
lrwxrwxrwx 1 jone users 51 Oct 30 14:31 
/var/guix/profiles/per-user/jone/current-guix-16-link ->
/gnu/store/bcbvw5n1pna08pj7zqfflb5zs9yfj90y-profile

What is '-16-link'? - This:
ls /gnu/store/bcbvw5n1pna08pj7zqfflb5zs9yfj90y-profile/bin/
  guix  guix-daemon
guix gc -D /gnu/store/bcbvw5n1pna08pj7zqfflb5zs9yfj90y-profile
  guix gc: error: cannot delete path .. since it is still alive


Not long ago I deleted 'file-roller'. It turns out that it is not so easy to do!
guix-gc-refcount.sh roller

● /gnu/store/645gvb541g80ji2ls8cn7gpfbafpb9zp-file-roller-3.26.2
/gnu/store/0nqcsqjqdl0fmqhij8mj3q09bji4r8y1-gtk-icon-themes
/gnu/store/2lwj95g0k865imkcmjd8kgfyj5lymrh1-xdg-desktop-database
/gnu/store/3bnz2q4q5kpssw44dxgw7n437h6f58h9-gtk-icon-themes.drv
/gnu/store/4lkjn2f81dd3ywqd5za2agx419lg6m58-glib-schemas
/gnu/store/5hg2n5r3gap8fsfr0sv0anvah7bgi3nm-xdg-mime-database.drv
/gnu/store/68yl0dzqqpy1ijr80sf7xp35c0vxnas9-xdg-desktop-database.drv
/gnu/store/6w0pm333qcwnyqb2g3z4rs9mjciymjqd-glib-schemas
/gnu/store/8x0ipsgl2dhdi7n1psrh8dssv8dh39dd-xdg-desktop-database
/gnu/store/dll3sbb6saqj13a2pz84bq5132wyg3pi-info-dir.drv
/gnu/store/hjl4vj9f8gvlff6z7c54psvk6dimpc10-ca-certificate-bundle.drv
/gnu/store/i5wppk3prg7xkfc8l6jb0g82k2nw94a5-gtk-im-modules.drv
/gnu/store/i9kb46v1wd7jgm6zv1ighq6cqc2528av-fonts-dir.drv
/gnu/store/lzy15m5054qa9dgdkri3k9gvhjpm92a0-profile.drv
/gnu/store/njwpq4ywz17rgvvbdds20cndrgwsrcxs-gtk-icon-themes
/gnu/store/qrx5y5z44z5qv1fc2r5cqnh7hr0ncq7m-profile
/gnu/store/w34gzihyq87mgaiixrxq8414j9s2z8v9-manual-database.drv
/gnu/store/xhnpa2bawb2mbzzl2zy5x5diph1r7ca6-glib-schemas.drv
/gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile

● /gnu/store/qrx5y5z44z5qv1fc2r5cqnh7hr0ncq7m-profile
NO REFERRERS

● /gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile
NO REFERRERS

- the same thing





Re: Unexpected results with Guix.

2019-11-06 Thread pelzflorian (Florian Pelz)
On Thu, Nov 07, 2019 at 03:18:52AM +, Jone wrote:
> - Results for 'icecat':
> ~/Desktop> guix-gc-refcount.sh icecat
> ● /gnu/store/50530hgnzkxgkqciip68dn7v23cslw1c-icecat-60.8.0-guix1
> /gnu/store/8x0ipsgl2dhdi7n1psrh8dssv8dh39dd-xdg-desktop-database
> /gnu/store/njwpq4ywz17rgvvbdds20cndrgwsrcxs-gtk-icon-themes
> /gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile
> 
> ● /gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile
> NO REFERRERS
> 

So you have to get rid of
/gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile.  This was not one
of the listed generations of your user.

Look at the output of

for r in $(guix gc --list-roots); do ls -l $r; done

to find out where it comes from.

Regards,
Florian



Re: Unexpected results with Guix.

2019-11-06 Thread Jone


> Please also try `guix gc --referrers`.

That's right. I wrote a simple script, which shows it:

#!/bin/sh
if [ -z "$1" ]
then exit 1
fi
cprof=$(readlink -f ~/.guix-profile)
init=/gnu/store/*-$1*/
rtest="$(eval echo $init)"   # trick!
if [ "$rtest" = "$init" ]
then init=$1
fi
for f in $init
do
f=${f%/}
ref="$(guix gc --referrers $f | grep -v $f)" 
if echo "$ref" | grep -q $cprof
then
echo $f in CURRENT profile!
exit
else
echo ● $f 1>&2
if ((${#ref} > 10))
then echo "$ref" | grep --color -e ".*-system" -e "^"
else echo NO REFERRERS 1>&2
fi
echo
fi
## and recursively
for j in $(echo "$ref" | grep -E 'profile$')
do eval $0 $j
done
done
exit

- Results for 'icecat':
~/Desktop> guix-gc-refcount.sh icecat
● /gnu/store/50530hgnzkxgkqciip68dn7v23cslw1c-icecat-60.8.0-guix1
/gnu/store/8x0ipsgl2dhdi7n1psrh8dssv8dh39dd-xdg-desktop-database
/gnu/store/njwpq4ywz17rgvvbdds20cndrgwsrcxs-gtk-icon-themes
/gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile

● /gnu/store/zxqr8afp3rpd2r3g9x41sqg5mx525355-profile
NO REFERRERS

- Results for my own package 'wdfs':
guix-gc-refcount.sh wdfs
/gnu/store/7j1zhlwqjmhyvr7mg8il02xvqvd9yfmz-wdfs-1.4.2 in CURRENT profile!

Incomprehensibly.. 



Re: Unexpected results with Guix.

2019-11-02 Thread pelzflorian (Florian Pelz)
On Sun, Nov 03, 2019 at 03:26:01AM +, Jone wrote:
> Thanks for reminder about /var/guix/profiles.
> 
> ❯ guix package -l | grep Generation
> Generation 158Nov 02 2019 15:27:19(current)
> ❯ ls -1 /var/guix/profiles/per-user/jone/
> current-guix
> current-guix-16-link
> guix-profile
> guix-profile-158-link
>   current-guix -> current-guix-16-link
>   current-guix-16-link -> /gnu/store/bcbvw5n1pna08pj7zqfflb5zs9yfj90y-profile
>   guix-profile -> guix-profile-158-link
>   guix-profile-158-link -> /gnu/store/wb3b3mj3spny5jx2bj00imrwf5bjw373-profile
> ❯ ls /gnu/store/bcbvw5n1pna08pj7zqfflb5zs9yfj90y-profile/bin/
> guix  guix-daemon
> 
> 
> But it didn't give me any useful information.

Please also try `guix gc --referrers`.  It is *not* the same as `guix
gc -R`.  Then you can compare to `guix package -l`.

Regards,
Florian



Re: Unexpected results with Guix.

2019-11-02 Thread Jone
Thanks for reminder about /var/guix/profiles.

❯ guix package -l | grep Generation
Generation 158  Nov 02 2019 15:27:19(current)
❯ ls -1 /var/guix/profiles/per-user/jone/
current-guix
current-guix-16-link
guix-profile
guix-profile-158-link
  current-guix -> current-guix-16-link
  current-guix-16-link -> /gnu/store/bcbvw5n1pna08pj7zqfflb5zs9yfj90y-profile
  guix-profile -> guix-profile-158-link
  guix-profile-158-link -> /gnu/store/wb3b3mj3spny5jx2bj00imrwf5bjw373-profile
❯ ls /gnu/store/bcbvw5n1pna08pj7zqfflb5zs9yfj90y-profile/bin/
guix  guix-daemon


But it didn't give me any useful information. Then I tried another command:
guix gc --list-busy | grep icecat
/gnu/store/ngsswh27mqxpynwrw6qyjsc3iql1ma3i-icecat-68.2.0-guix0-preview2

- Wow! Then reboot, and again 'guix gc' -> icecat-68.2.0 finally deleted!
But that's only 50% of the solution:
guix gc: error: cannot delete path 
`/gnu/store/50530hgnzkxgkqciip68dn7v23cslw1c-icecat-60.8.0-guix1'
since it is still alive

Any ideas?



Re: Unexpected results with Guix.

2019-11-02 Thread pelzflorian (Florian Pelz)
Sorry for not recognizing the issue might be more difficult than the
Guix videos.

On Sat, Nov 02, 2019 at 06:49:57PM +, Jone wrote:
> > You can see what requires it with guix gc -R ..
> 183 lines.. this does not give an any answer. I'm at a loss..
> 

I believe

guix gc --referrers 
/gnu/store/50530hgnzkxgkqciip68dn7v23cslw1c-icecat-60.8.0-guix1

would list the profiles.

One way of finding the profile’s generation number is browsing the output of

find /var/guix/profiles -type d -exec ls -l {} \;

It is probably not the best way, but it should work.

Regards,
Florian



Re: Unexpected results with Guix.

2019-11-02 Thread Jone
> How do you list your generations?

❯ guix package -l | grep Generation
Generation 158  Nov 02 2019 15:27:19(current)

> But it won't work since your old icecat is still live.
It seems so:

❯ guix gc -d /gnu/store/50530hgnzkxgkqciip68dn7v23cslw1c-icecat-60.8.0-guix1/
guix gc: warning: '-d' as an alias for '--delete' is deprecated; use '-D'
finding garbage collector roots...
guix gc: error: cannot delete path 
`/gnu/store/50530hgnzkxgkqciip68dn7v23cslw1c-icecat-60.8.0-guix1'
since it is still alive

- but I can’t understand WHY?!

> You can see what requires it with guix gc -R ..
183 lines.. this does not give an any answer. I'm at a loss..







Re: Unexpected results with Guix.

2019-11-02 Thread pelzflorian (Florian Pelz)
The Guix documentation videos explain common usage.  They can be found
on the Guix website since only a few days ago.  For example,
reclaiming space is explained at minute 1:01 here:

https://guix.gnu.org/videos/everyday-use-of-gnu-guix,-part-two/index.html


I hope these videos are prominent enough now, because I think they are
very good.

Regards,
Florian



Re: Unexpected results with Guix.

2019-11-02 Thread Jone
Tobias, in answer to Pierre I have added some additional information.

I read the help and manual (but partially), and anywhere is no description of 
my case.
Or in other words, I didn't understand what I didn't understand! Sorry. (It 
would be very
nice in addition to the manual to have any simple how-to).




Re: Unexpected results with Guix.

2019-11-02 Thread Jone
Thanks, I figured out the basic things.

> If the old icecat is still referenced by an old profile, you'll have to
> remove this profile first.
> guix package --delete-generations=1m

Currently the profle contains only one generation, previous generations
was deleted immediately after command 'guix package -u icecat'. This is mistake?

❯ guix gc
finding garbage collector roots...
deleting garbage...
deleting `/gnu/store/trash'
deleting unused links...
note: currently hard linking saves 2475.90 MiB
guix gc: freed 0 MiBs
❯ guix gc /gnu/store/50530hgnzkxgkqciip68dn7v23cslw1c-icecat-60.8.0-guix1/
guix gc: error: extraneous arguments: /gnu/store/50530hgnz...
- no any changes!






Re: Unexpected results with Guix.

2019-11-02 Thread Tobias Geerinckx-Rice

Jone,

Tobias Geerinckx-Rice 写道:

Jone 写道:
I used to deal only with rpm package manager - there 
unnecessary

dependencies would be removed automatically.
How do I get the same result with Guix? I don't have much space 
on

the
partition =)


Very quick answer: ‘guix gc’.


OK, slightly longer answer since we can't find the car keys.

In this case, ‘guix gc -d’ is probably what you want.  It will 
delete old profiles and all store entries not used by the 
remaining profile(s).


/gnu/store is like a cache/memoized store/whatever slightly 
inaccurante memory management metaphor you prefer: when you 
install a package, it is downloaded or built into the store, and a 
new profile created that refers to it.


When you uninstall a package with ‘guix package -r’, only that 
reference is removed[0], but the store entry is not.  It might 
come in handy later, or be reused.  To actually delete these 
entries forever, you need to collect garbage (that's what GC 
stands for).  When you happen to install the exact same version of 
icecat in future, you'll have to download or build it again.


Apologies for this rushed explanation; we've found the keys :-)

Kind regards,

T G-R

[0]: Actually, a new profile is created that doesn't refer to 
icecat anymore.  Copy-on-write here, too.


signature.asc
Description: PGP signature


Re: Unexpected results with Guix.

2019-11-02 Thread Tobias Geerinckx-Rice

Jone,

Jone 写道:

I used to deal only with rpm package manager - there unnecessary
dependencies would be removed automatically.
How do I get the same result with Guix? I don't have much space 
on the

partition =)


Very quick answer: ‘guix gc’.

Kind regards,

T G-R


signature.asc
Description: PGP signature


Unexpected results with Guix.

2019-11-02 Thread Jone
Hello, peolpe! I cannot understand results of this simple sequence of
actions:
First, update Icecat: guix package -u icecat
and then later remove it: guix package -r icecat
and view /gnu/store:

du -hs -l -t 1M /gnu/store/* | grep -E 'rust|icecat'
274M/gnu/store/0p4blr576rjzpyybfmvygny6ra641w0p-rust-1.37.0
157M/gnu/store/50530hgnzkxgkqciip68dn7v23cslw1c-icecat-60.8.0-guix1
169M
/gnu/store/ngsswh27mqxpynwrw6qyjsc3iql1ma3i-icecat-68.2.0-guix0-preview2

I used to deal only with rpm package manager - there unnecessary
dependencies would be removed automatically.
How do I get the same result with Guix? I don't have much space on the
partition =)