> I did a very stupid operation today that i remove the whole
> /var/lib/pacman/local :(
I did the exact same thing a few months ago.
> I have no idea about how to fix it, so turn to the maillist for help.
> I really don't want to reinstall my Arch because it has been used over
> one years with everythig works fine.
Everything will still work just fine (except pacman). I ended up
reinstalling everything in the base category, everything in my window
manager category, and all the other large applications with 'pacman
-Sf'. This will cover probably 95% of your packages.
In the end, I reinstalled Arch from the CD: I backed up /home and /etc
(I keep /home on a separate partition anyway), and just copied
everything back after the install was done. It took about an hour in
total to restore everything to the way it was before.
As a preventative measure, I also wrote a simple perl script to make a
dump of the pacman database. I run a cron job that dumps the output of
the script into /var/log/packages, and appends a line to the end of
/var/log/pacman.log like: "[01/05/07 00:02] LOCAL DATABASE DUMPED".
Between the two, I'm fairly confident I could reconstruct my system in a
matter of minutes if I ever lost the database again. The output of the
perl script can't be given directly to pacman, but I decided I'd rather
preserve the current version numbers.
Script follows:
#!/usr/bin/perl
opendir(DIR, "/var/lib/pacman/local/");
@pkgs = grep {!/^\./} readdir(DIR);
local $, = "\n";
print @pkgs;
print "\n";
_______________________________________________
arch mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/arch