Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Strange Portage Issue
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
hawkdernacht
n00b
n00b


Joined: 12 May 2006
Posts: 7

PostPosted: Fri May 12, 2006 3:12 pm    Post subject: Strange Portage Issue Reply with quote

Ok, I had just finished setting up a brand new Gentoo OS on a new hard drive under a chroot enviornment off of my old install. I was planning restarting into the new OS shortly, but I was going to restart MySQL on my current production install but did it in the wrong ssh window.

This caused all of the dependent scripts for /etc/init.d/mysqld to run. As a result my /var/lib/portage/world file is missing, and now when I try an emerge world -upv I see everything trying to build new (N). All of the packages are actually installed in the system, but portage knows nothing about them. Is there anything I can do?.

Thanks in advance for any help

Ryan
Back to top
View user's profile Send private message
TheRAt
Veteran
Veteran


Joined: 03 Jun 2002
Posts: 1580

PostPosted: Fri May 12, 2006 3:22 pm    Post subject: Re: Strange Portage Issue Reply with quote

hawkdernacht wrote:
Ok, I had just finished setting up a brand new Gentoo OS on a new hard drive under a chroot enviornment off of my old install. I was planning restarting into the new OS shortly, but I was going to restart MySQL on my current production install but did it in the wrong ssh window.

This caused all of the dependent scripts for /etc/init.d/mysqld to run. As a result my /var/lib/portage/world file is missing, and now when I try an emerge world -upv I see everything trying to build new (N). All of the packages are actually installed in the system, but portage knows nothing about them. Is there anything I can do?.

Thanks in advance for any help

Ryan


You could try regenworld
Code:
root@pandora ~ # regenworld -h
This script regenerates the portage world file by checking the portage
logfile for all actions that you've done in the past. It ignores any
arguments except --help. It is recommended that you make a backup of
your existing world file (var/lib/portage/world) before using this tool.

_________________
All reality is the construct of the observer.

Get Firefox and rediscover the web!

BOFH Excuse #295:
The Token fell out of the ring. Call us when you find it.
Back to top
View user's profile Send private message
hawkdernacht
n00b
n00b


Joined: 12 May 2006
Posts: 7

PostPosted: Fri May 12, 2006 3:32 pm    Post subject: Reply with quote

Unfortunatly, all this did was give me an empy world file. Previously it was missing.

Ryan
Back to top
View user's profile Send private message
TheRAt
Veteran
Veteran


Joined: 03 Jun 2002
Posts: 1580

PostPosted: Fri May 12, 2006 3:43 pm    Post subject: Reply with quote

I guess that means U have no portage log file.
You might want to check if there is a script that assists you at the Gentoo Script Repository
_________________
All reality is the construct of the observer.

Get Firefox and rediscover the web!

BOFH Excuse #295:
The Token fell out of the ring. Call us when you find it.
Back to top
View user's profile Send private message
hawkdernacht
n00b
n00b


Joined: 12 May 2006
Posts: 7

PostPosted: Fri May 12, 2006 3:50 pm    Post subject: Reply with quote

There does not appear to be any scripts created to help compile a world file from the packages I have installed.
Back to top
View user's profile Send private message
TheRAt
Veteran
Veteran


Joined: 03 Jun 2002
Posts: 1580

PostPosted: Fri May 12, 2006 4:15 pm    Post subject: Reply with quote

as i understand it, the world file is just a listing of installed apps in the form <category>/<app>
you could extract that from an emerge -p world > world
then editing the resulting file..
_________________
All reality is the construct of the observer.

Get Firefox and rediscover the web!

BOFH Excuse #295:
The Token fell out of the ring. Call us when you find it.
Back to top
View user's profile Send private message
hawkdernacht
n00b
n00b


Joined: 12 May 2006
Posts: 7

PostPosted: Fri May 12, 2006 4:18 pm    Post subject: Reply with quote

Would that really work to solve my particualr issue? what about any dependencies?
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2513
Location: Silver City, NM

PostPosted: Fri May 12, 2006 4:40 pm    Post subject: Re: Strange Portage Issue Reply with quote

hawkdernacht wrote:
Ok, I had just finished setting up a brand new Gentoo OS on a new hard drive under a chroot enviornment off of my old install. I was planning restarting into the new OS shortly, but I was going to restart MySQL on my current production install but did it in the wrong ssh window.

This caused all of the dependent scripts for /etc/init.d/mysqld to run. As a result my /var/lib/portage/world file is missing, and now when I try an emerge world -upv I see everything trying to build new (N). All of the packages are actually installed in the system, but portage knows nothing about them. Is there anything I can do?


There are several things about this post that I don't understand. First, I don't understand how restarting mysql could have any effect on your world file or your Portage system. I don't doubt that you restarted mysql, and I don't doubt that you are having problems with your Portage, but I do doubt that those two things are directly related.

Second, the symptom you report (everything tries to build new (N)) is not related to a missing world file. This symptom sounds more like missing the Portage database tree under /var/db/pkg not a missing world file. In fact, if more packages are listed in "emerge -p world" than are listed in "emerge -p system" (131 on my x86 machine) then this would indicate that your world file exists and is probably intact.

I am not trying to make you feel bad, but it will be easier for us to help you fix the problem if we can first figure out exactly what the problem is. If the directory tree under /var/db/pkg is missing, the only solutions I know of is to re-emerge everything, but there are plenty of people here who are more clever and more experienced than I am and they may have less painful solutions. I do suggest that you exert some effort into finding out exactly what it was that caused your current breakage so you can make sure you don't do exactly the same thing in the future.
Back to top
View user's profile Send private message
hawkdernacht
n00b
n00b


Joined: 12 May 2006
Posts: 7

PostPosted: Fri May 12, 2006 4:54 pm    Post subject: Reply with quote

Well no worries about making me feel dumb. I'm just confused about what is going on. I have used Gentoo for a number of years not but have not had the time to dive head first into the nitty-gritty. I know how to set it up and get it working, even have it a few production servers but have never seen this happen.

Back to the situation at hand. The only command I ran other than emerging what I needed and tightening security according to the Security Guide, is /etc/init.d/mysql restart. I really didnt think it would have raised the heck it has either, but since i was in a chroot environment, i'm guessing some of the initialization scripts did something funny.

The really bad news is there is no /var/db directory at all in my new install. I have no problem re-emerging eveything, but obviously I'd rather not if possible. This is a production machine and if I don't have to spend hrs of CPU time recompiling everyting I'd rather not. Any help at all is appreciated.
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2513
Location: Silver City, NM

PostPosted: Fri May 12, 2006 5:31 pm    Post subject: Reply with quote

Do you have /var on a separate partition? If so, this could be masking your /var/db directory either because the mounted /var is hiding /var/db which is "underneath" it, or because /var/db was created on the mounted /var but it is no longer mounted.

You might want to carefully retrace your steps and see if anything you did could have caused an error like the wild guess above. If you can't find your missing /var/db, I think you will have to re-emerge in order to recreate it.

You might want to change the subject of your top post to "Missing /var/db :-(" so it might better catch someone's eye who may be able to help you with this specific problem.
Back to top
View user's profile Send private message
hawkdernacht
n00b
n00b


Joined: 12 May 2006
Posts: 7

PostPosted: Fri May 12, 2006 6:52 pm    Post subject: Reply with quote

Well here's the rub. When i ran the mysql restart command it re-ran all of my init scripts including my fstab, which in the new OS I have set up differantly than in the current OS (differant physical drives) so the mount points were off.

I am checking on any damage that might been done to either system before I chroot back into it and try an emerge.

Color me embarassed. Oh well you live and learn.

I will send an updated on this later, thanks for all of the help.

Ryan
Back to top
View user's profile Send private message
hawkdernacht
n00b
n00b


Joined: 12 May 2006
Posts: 7

PostPosted: Mon May 15, 2006 3:45 pm    Post subject: Update Reply with quote

Ok all, I fixed my mounting issue, and luckily the new mount points did not screw anything up. My new system is up and running and all is well. Thanks to everyone who tried to help me out. It is much appreciated.
Back to top
View user's profile Send private message
BitJam
Advocate
Advocate


Joined: 12 Aug 2003
Posts: 2513
Location: Silver City, NM

PostPosted: Mon May 15, 2006 8:14 pm    Post subject: Reply with quote

I have a vague memory of running an init.d script while in the chroot and all hell breaking loose. There should probably be a BIG WARNING about this somewhere.

I think that memory helped me help you with your problem. I think it may have been difficult for other people to fully grasp the nature of the problem (even though you described it well) because they hadn't experienced it and were basing their thoughts on their experiences of running init.d scripts in an already fully functioning system.
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