Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Deleted /var/db -- HELP
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1114
Location: Den Dolder, The Netherlands

PostPosted: Fri Sep 19, 2008 7:54 pm    Post subject: Deleted /var/db -- HELP Reply with quote

During an OpenOffice merge, in a struggle to free space for the merge, I accidentally deleted /var/db :oops: . Now of course portage is complaining all the time, e.g. about problems in my world file. Updates are no longer possible, etc :cry: . All software still works, however, including Gnome :) . Is there a way to regenerate /var/db other than recompiling everything? Thx!
Back to top
View user's profile Send private message
freelight
Apprentice
Apprentice


Joined: 12 Jun 2004
Posts: 295
Location: NYC, NY, USA

PostPosted: Fri Sep 19, 2008 8:35 pm    Post subject: Reply with quote

Try regenworld. It regenerates the world file. I'm not sure if it will work with the entire /var/db/ directory missing, but give it a shot.
_________________
"If ignorance is bliss, why aren't more people happy?" --Thomas Jefferson

"Let the gremlins eat your soul... it's invigorating." --LD
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9530
Location: beyond the rim

PostPosted: Fri Sep 19, 2008 9:12 pm    Post subject: Reply with quote

freelight wrote:
Try regenworld. It regenerates the world file. I'm not sure if it will work with the entire /var/db/ directory missing, but give it a shot.

It won't. There is no (reliable) way to restore /var/db/pkg unless you've made a backup.
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1114
Location: Den Dolder, The Netherlands

PostPosted: Sat Sep 20, 2008 5:10 am    Post subject: Reply with quote

I've already attempted regenworld of course but that does nothing. So I really have to reinstall each and every package?

BTW is there some automated way of making that backup?
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9530
Location: beyond the rim

PostPosted: Sat Sep 20, 2008 9:05 am    Post subject: Reply with quote

There is no special mechanism to create a backup of /var/db/pkg you could enable in make.conf or so, because backups are one of those things that can't really be standardized (as people have very different needs/desires on location/frequency/trigger/copies). The simplest solution would be a cronjob that copies /var/db/pkg to a safe location regulary, or create a wrapper around emerge to save it after every session.
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1114
Location: Den Dolder, The Netherlands

PostPosted: Sat Sep 20, 2008 11:12 am    Post subject: Reply with quote

Genone wrote:
There is no special mechanism to create a backup of /var/db/pkg you could enable in make.conf or so, because backups are one of those things that can't really be standardized (as people have very different needs/desires on location/frequency/trigger/copies). The simplest solution would be a cronjob that copies /var/db/pkg to a safe location regulary, or create a wrapper around emerge to save it after every session.
OK clear, thx. But still, while all software is working, in order to be able to update my system I have to reinstall everything? Or, wait with every single package contained in my world file for an update to become available? In the latter case, my system package will probably still be outdated. I'm just thinking of ways to avoid a
Code:
emerge --emptytree world
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9530
Location: beyond the rim

PostPosted: Sat Sep 20, 2008 12:26 pm    Post subject: Reply with quote

Well, I said there is no reliable way to restore /var/db/pkg, but there are a few hacks floating around these forums to recreate parts of it, so portage at least knows that the packages are installed. Of course that "solution" won't fix everything and is completely unsupported, also it will likely cause portage to leave orpahned files on your system.
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1114
Location: Den Dolder, The Netherlands

PostPosted: Mon Sep 22, 2008 4:31 pm    Post subject: Reply with quote

Ok I sat down and thought: let's try it. So I went onto a journey full of circular dependencies, emerges of system with the --nodeps option, and later on partly compiling xorg-x11, then satisfying the system dependencies again, continuing xorg-x11 and then trying to compile gnome, unsuccessfully, and so on and on. It all became quite a mess, up to the point where there was no way I could get pango, gtk+ and cairo compiled. And still I had this perfectly running system!

I finally gave up and started a full re-install. It's almost finished now, just not complete because I discovered 2 new bugs (in a stable tree, that is). Aarghh...
Back to top
View user's profile Send private message
Helena
Veteran
Veteran


Joined: 02 Apr 2003
Posts: 1114
Location: Den Dolder, The Netherlands

PostPosted: Mon Sep 22, 2008 6:11 pm    Post subject: Reply with quote

To be precise: I discovered 1 new bug and stumbled into another one, that was just opened yesterday.

Oh and did I mention the tricky disabling all USE flags and re-enabling them a few times?

It seems to be even worse than Genone described: not only is there no reliable way to restore your system, there is no way at all... (at least in my case).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum