Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help!!!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
bighawk211
n00b
n00b


Joined: 26 Nov 2006
Posts: 15

PostPosted: Mon Jan 15, 2007 5:16 pm    Post subject: Help!!! Reply with quote

Hey guys I need some help with this, I download and installed VirtualBox to the /usr/share/ directory by using its install script, everything went fine and all but I decided the prog wasn't for me so I uninstalled the software by using its uninstall script, little did I know that it was going to delete my whole "/usr/share" directory!. Is there anyway I can get the main contents of my /usr/share directory back, just the usual stuff at least like the locales and fonts, or am I pretty much screwed and have to reinstall Gentoo all over again, btw just as I expected alot of things suddenly stopped working after this directory was removed so my box is pretty much rendered useless, any help with this would greatly be appreciated it.
Back to top
View user's profile Send private message
rlholgate
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jan 2005
Posts: 82
Location: UK

PostPosted: Mon Jan 15, 2007 7:18 pm    Post subject: Reply with quote

You should be able to list the packages using /usr/share with equery belongs:

Code:
equery belongs /usr/share


I say should, because this assumes equery itself isn't nuked by the missing files! (If it is you could try re-emerging portage and/or gentoolkit first I guess). Re-emerging all the packages listed by equery would restore it I think.
Back to top
View user's profile Send private message
bighawk211
n00b
n00b


Joined: 26 Nov 2006
Posts: 15

PostPosted: Mon Jan 15, 2007 9:16 pm    Post subject: Reply with quote

I will give this a try, thnx for ur time.
Back to top
View user's profile Send private message
Dralnu
Veteran
Veteran


Joined: 24 May 2006
Posts: 1919

PostPosted: Tue Jan 16, 2007 2:36 am    Post subject: Reply with quote

FWIW - Topics like "HELP" don't do you much good. Maybe "Help, deleted /usr/share" would be better. Try and be somewhat specific in the thread titles :)




IIRC, you can run emerge to re-install the files needed. You'll have to read over man portage man emerge and maybe another man page or two, but if nothing else, that might save you.
_________________
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
Back to top
View user's profile Send private message
bighawk211
n00b
n00b


Joined: 26 Nov 2006
Posts: 15

PostPosted: Tue Jan 16, 2007 6:05 pm    Post subject: Help!! deleted "/usr/share" Reply with quote

Does anyone know if it is possible to re-emerge all the packages listed by "equery belongs /usr/share" automatically because there are over 300 packages that need to be re-emerged and doing them one by one by hand is a pain in the a$$, thnx
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Tue Jan 16, 2007 6:39 pm    Post subject: Reply with quote

If you want, you can do something like:

Code:

equery belongs /usr/share | sed -e 's/\(\/usr\/share\)//' -e 's/^/=/' | xargs emerge -pv


But really... 99% of the packages do have at least the man pages or docs there, I think that the results of that and emerge -pe world would be almost identical. Just remove -pv from the command line and the merge will begin.
Back to top
View user's profile Send private message
Dralnu
Veteran
Veteran


Joined: 24 May 2006
Posts: 1919

PostPosted: Tue Jan 16, 2007 6:51 pm    Post subject: Re: Help!! deleted "/usr/share" Reply with quote

bighawk211 wrote:
Does anyone know if it is possible to re-emerge all the packages listed by "equery belongs /usr/share" automatically because there are over 300 packages that need to be re-emerged and doing them one by one by hand is a pain in the a$$, thnx


From the output I got, chances are you could do such with something similar to

sed <insert a good filterstring here> | emerge -av

I won't gaurantee how well it would work (someone correct me here if I am wrong), but that should be at least a starting point
_________________
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
Back to top
View user's profile Send private message
rlholgate
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jan 2005
Posts: 82
Location: UK

PostPosted: Tue Jan 16, 2007 7:07 pm    Post subject: Reply with quote

You might also wanna use the --oneshot option on emerge to stop all the packages from winding up in world.
Back to top
View user's profile Send private message
Dralnu
Veteran
Veteran


Joined: 24 May 2006
Posts: 1919

PostPosted: Tue Jan 16, 2007 7:46 pm    Post subject: Reply with quote

rlholgate wrote:
You might also wanna use the --oneshot option on emerge to stop all the packages from winding up in world.


Correct me if I'm wrong, but don't packages only end up in world if you are specifically mentioned in an emerge? The rest are just pulled in as deps, and aren't entered into the world file.

Heck, my worldfile only has 92 entries, where my system has over 450 packages.
_________________
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Tue Jan 16, 2007 8:16 pm    Post subject: Reply with quote

Dralnu wrote:
rlholgate wrote:
You might also wanna use the --oneshot option on emerge to stop all the packages from winding up in world.


Correct me if I'm wrong, but don't packages only end up in world if you are specifically mentioned in an emerge? The rest are just pulled in as deps, and aren't entered into the world file.

Heck, my worldfile only has 92 entries, where my system has over 450 packages.


Yes, but with a sed one-liner that is what happens. For example, my snippet above:

Code:

equery belongs /usr/share | sed -e 's/\(\/usr\/share\)//' -e 's/^/=/' | xargs emerge -pv


Just uses the result of "equery ... | sed ..." as the input for emerge. It is virtually the same that to write all the package names after emerge in the command line, so rlholgate is right, and the sane command to run would be this one:

Code:

equery belongs /usr/share | sed -e 's/\(\/usr\/share\)//' -e 's/^/=/' | xargs emerge -pv --oneshot
Back to top
View user's profile Send private message
Dralnu
Veteran
Veteran


Joined: 24 May 2006
Posts: 1919

PostPosted: Tue Jan 16, 2007 8:34 pm    Post subject: Reply with quote

6thpink wrote:
Dralnu wrote:
rlholgate wrote:
You might also wanna use the --oneshot option on emerge to stop all the packages from winding up in world.


Correct me if I'm wrong, but don't packages only end up in world if you are specifically mentioned in an emerge? The rest are just pulled in as deps, and aren't entered into the world file.

Heck, my worldfile only has 92 entries, where my system has over 450 packages.


Yes, but with a sed one-liner that is what happens. For example, my snippet above:

Code:

equery belongs /usr/share | sed -e 's/\(\/usr\/share\)//' -e 's/^/=/' | xargs emerge -pv


Just uses the result of "equery ... | sed ..." as the input for emerge. It is virtually the same that to write all the package names after emerge in the command line, so rlholgate is right, and the sane command to run would be this one:

Code:

equery belongs /usr/share | sed -e 's/\(\/usr\/share\)//' -e 's/^/=/' | xargs emerge -pv --oneshot


Right. I forgot about that little bit, lol.
_________________
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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