You are not logged in.

#1 2008-09-26 21:07:24

torkjel
Member
Registered: 2007-11-12
Posts: 13

full disk, borken system and a workaround...

Hi all,

It seems to me that pacman doesn't handle full disk situations very well. At least it has happened to me a couple of times that the disk has gone full during an upgrade (asus eee 701, 4gb disk...), and the system has been left in a rather sad state. The last time X wouldn't start anymore. I'm not sure if pacman printed an error message, but at least I didn't notice anything was wrong untill at the next reboot...

Unfortunately, there doesn't seem to be any easy way to verify the integrity of installed pacakges (please correct me if i'm wrong), so now I have a system where at least one, possibly several installed pacakges are trashed, and I can't figure out which ones (again, please correct me if I'm wrong)...

Solution? Force a reinstall of all packages of course. Except... my disk is almost full and pacman insists on downloading everything before starting the install. It's time to get creative with bash. This little beauty fixed my problem in the end:

for p in `pacman -Q | cut -f1 -d" "`; do pacman --noconfirm -S$p; echo "y
y" | pacman -Scc; done

(notice the newline in between the 'y's. It's significant smile )

A similar command cound be used to upgrade any system which is too low on disk to download all out of date packages, if only there was a way to list out of date packages in an easily parsable fomat...

Conclusion: Woudn't it be nice if pacman had a mode to download, install and then clear cache, one package at a time?

Yeah, I know, "patches are welcome". Unless someone can tell me that I've missed something obvious and that everything I need is there allready, I might actually dive into the code. smile

Offline

#2 2008-09-27 09:54:12

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: full disk, borken system and a workaround...

I think this install all packages as "explicitly installed" which you may not want (remove a package and it's dependecies remain, because they are not installed as deps anymore).
you may want to break it up into

#first dependencies:
for p in `pacman -Qd | cut -f1 -d" "`; do pacman --noconfirm --asdeps -S$p; echo "y
y" | pacman -Scc; done

#then explicitly installed packages:
for p in `pacman -Qe | cut -f1 -d" "`; do pacman --noconfirm --asexplicit -S$p; echo "y
y" | pacman -Scc; done

Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#3 2008-09-27 20:39:42

torkjel
Member
Registered: 2007-11-12
Posts: 13

Re: full disk, borken system and a workaround...

Good point. Thanks

Offline

Board footer

Powered by FluxBB