Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rm -r /var/lib/portage: what now? [solved]
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
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 616

PostPosted: Sat Dec 22, 2007 5:34 pm    Post subject: rm -r /var/lib/portage: what now? [solved] Reply with quote

I just deleted the wrong directory for sure. But now what can I do? How can I recover from this disaster? And no, I don't have a backup.

HELP!

TIA,

Jon.


Last edited by jesnow on Sat Dec 22, 2007 10:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
Arfrever
Bodhisattva
Bodhisattva


Joined: 29 Apr 2006
Posts: 2460
Location: 異世界

PostPosted: Sat Dec 22, 2007 5:47 pm    Post subject: Reply with quote

Code:
mkdir -p /usr/lib/portage
svn export http://anonsvn.gentoo.org/repositories/portage/main/branches/2.1.2/bin /usr/lib/portage/bin
svn export http://anonsvn.gentoo.org/repositories/portage/main/branches/2.1.2/pym /usr/lib/portage/pym


If you don't have Subversion installed, then manually download the appropriate tarball of Portage, unpack this tarball and copy "bin" and "pym" subdirectories to "/usr/lib/portage".

Perduodu linkėjimus
Arfrever
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 616

PostPosted: Sat Dec 22, 2007 9:47 pm    Post subject: Reply with quote

Thanks very much but...

No good, /usr/lib/portage would be ok, but I erased /var/lib/portage, which contians, among other things, my world file.

I know there's a way to use dep to reconstruct the world fil (I will try this) but what about the other files in ther, what are they and what do they do, and how can I reconstruct them?
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 616

PostPosted: Sat Dec 22, 2007 9:52 pm    Post subject: Reply with quote

OK, I'm starting to stop hyperventilating: Updatedb happens at 3 am on my machine, and so I know what's in /var/lib/portage:

Quote:


# locate /var/lib/portage
/var/lib/portage
/var/lib/portage/config
/var/lib/portage/world.old
/var/lib/portage/world
/var/lib/portage/.prelink-checksum.tmp.6134.portage_lockfile
#


So if I can reconstruct world, then the prelink file will probably take care of itself, and the final thing I have to worry about is /var/lib/portage/config. Does anybody know what is in there? I guess I can re-emerge portage even without a world file, right?

TIA,

Jon.
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 616

PostPosted: Sat Dec 22, 2007 9:57 pm    Post subject: Reply with quote

Aha, easier than I thought:

# emerge -1 portage
...
# regenworld

Done. No need to panic.

Thanks!

Jon.
Back to top
View user's profile Send private message
Arfrever
Bodhisattva
Bodhisattva


Joined: 29 Apr 2006
Posts: 2460
Location: 異世界

PostPosted: Sat Dec 22, 2007 10:50 pm    Post subject: Reply with quote

jesnow wrote:
the final thing I have to worry about is /var/lib/portage/config. Does anybody know what is in there?


man portage:
/var/lib/portage/

   config   Hashes which are used to determine whether files in config protected directories have been modified since being installed.
            Files which have not been modified will automatically be unmerged.


Perduodu linkėjimus
Arfrever
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4185
Location: india

PostPosted: Sun Dec 23, 2007 4:06 am    Post subject: Reply with quote

why cant it be restored from trash folder? a loud thinking :)
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
jcat
Veteran
Veteran


Joined: 26 May 2006
Posts: 1337

PostPosted: Sun Dec 23, 2007 6:50 am    Post subject: Reply with quote

padoor wrote:
why cant it be restored from trash folder? a loud thinking :)


Code:
rm
doesn't put things in a trash folder, it deletes them for good (pretty much anyway :wink: )




Cheers,
jcat
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