Hello,
I have installed some packets with nimble. I wonder if it's possible to do a
global update after a nimble refresh.
For the moment i use this homemade command:
find ~/.nimble/pkgs/ -type d -maxdepth 1 | for i in $(cut -f1 -d'-'); do
nimble install $(basename "$i"); done
Run
It has several problems, though:
1) when a package exists, i get an error. Seeing the message, an anwer seems
required, but actually doesn't wait and throw an error. I don't complain
because otherwise my script would be stalled, but that's strange anyway:
Installing [email protected]
Prompt: [email protected] already exists. Overwrite? [y/N]
io.nim(141) raiseEOF
Error: unhandled exception: EOF reached [EOFError]
Run
2) when an update is available, the old package is not removed:
~$ ls ~/.nimble/pkgs/nico-0.* -lhd
07-07-20 19:42 /home/jseb/.nimble/pkgs/nico-0.2.7/
11-07-20 15:20 /home/jseb/.nimble/pkgs/nico-0.3.1/
Run
I could add a cleaning package in my script. But what if a package has a
dependancy on an older package, which should not be removed, then ?
~$ ls ~/.nimble/pkgs/sdl2* -lhd
11-07-20 15:48 /home/jseb/.nimble/pkgs/sdl2-2.0.2/
11-07-20 15:50 /home/jseb/.nimble/pkgs/sdl2_nim-2.0.12.0/
05-07-20 14:53 /home/jseb/.nimble/pkgs/sdl2_nim-#head/
Run
(i didn't dare removing one of them…)
Thank you.