public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Regenerating package db
@ 2009-08-27  9:07 Xavier Parizet
  2009-08-27  9:25 ` Dale
  2009-08-27 10:02 ` Alan McKinnon
  0 siblings, 2 replies; 12+ messages in thread
From: Xavier Parizet @ 2009-08-27  9:07 UTC (permalink / raw
  To: ML Gentoo User

Hi everyone,

I had some problem with /var/db/pkg : it's empty. So, how can i fix this without
rebuilding world and system from scratch ?

Thanks a lot for your help.

-- 
      Xavier Parizet
YaGB :   http://gentooist.com
GPG  :    DC81 6FEE 6EBE FCE4
1C18 202F E575 4A5D 036D 1408





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Regenerating package db
  2009-08-27  9:07 [gentoo-user] Regenerating package db Xavier Parizet
@ 2009-08-27  9:25 ` Dale
  2009-08-27  9:40   ` Xavier Parizet
  2009-08-27 10:02 ` Alan McKinnon
  1 sibling, 1 reply; 12+ messages in thread
From: Dale @ 2009-08-27  9:25 UTC (permalink / raw
  To: gentoo-user

Xavier Parizet wrote:
> Hi everyone,
>
> I had some problem with /var/db/pkg : it's empty. So, how can i fix this without
> rebuilding world and system from scratch ?
>
> Thanks a lot for your help.
>
>   

I'm not sure but does emerge --metadata do this?  You may want to man
emerge and see if anything else can do what you want to.

Dale

:-)  :-) 



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Regenerating package db
  2009-08-27  9:25 ` Dale
@ 2009-08-27  9:40   ` Xavier Parizet
  2009-08-27  9:47     ` Dale
  0 siblings, 1 reply; 12+ messages in thread
From: Xavier Parizet @ 2009-08-27  9:40 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 954 bytes --]

Dale a écrit :
> Xavier Parizet wrote:
>> Hi everyone,
>>
>> I had some problem with /var/db/pkg : it's empty. So, how can i fix this without
>> rebuilding world and system from scratch ?
>>
>> Thanks a lot for your help.
>>
>>   
> 
> I'm not sure but does emerge --metadata do this?  You may want to man
> emerge and see if anything else can do what you want to.

Emerge --metadata is just updating the portage cache from the /var/db/pkg to
speedup dependencies calculation... I was thinking about doing an emerge
--pretend --empty world with some kind of sed/awk to get a list of what would
normally be installed on my system, but circular dependencies kill the idea in
the egg... because actually, portage think that nothing is installed on my system...

Any other idea ?

> Dale
> 
> :-)  :-) 
> 

-- 
      Xavier Parizet
YaGB :   http://gentooist.com
GPG  :    C7DC B10E FC21 63BE
B453 D239 F6E6 DF65 1569 91BF



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Regenerating package db
  2009-08-27  9:40   ` Xavier Parizet
@ 2009-08-27  9:47     ` Dale
  2009-08-27  9:56       ` Xavier Parizet
  0 siblings, 1 reply; 12+ messages in thread
From: Dale @ 2009-08-27  9:47 UTC (permalink / raw
  To: gentoo-user

Xavier Parizet wrote:
> Dale a écrit :
>   
>> Xavier Parizet wrote:
>>     
>>> Hi everyone,
>>>
>>> I had some problem with /var/db/pkg : it's empty. So, how can i fix this without
>>> rebuilding world and system from scratch ?
>>>
>>> Thanks a lot for your help.
>>>
>>>   
>>>       
>> I'm not sure but does emerge --metadata do this?  You may want to man
>> emerge and see if anything else can do what you want to.
>>     
>
> Emerge --metadata is just updating the portage cache from the /var/db/pkg to
> speedup dependencies calculation... I was thinking about doing an emerge
> --pretend --empty world with some kind of sed/awk to get a list of what would
> normally be installed on my system, but circular dependencies kill the idea in
> the egg... because actually, portage think that nothing is installed on my system...
>
> Any other idea ?
>
>   
>> Dale
>>
>> :-)  :-) 
>>
>>     

I don't but I'd wait until some other guru that has ran into this
problem comes along with a fix or advice on something to try.

What happened anyway?  Get a little happy with rm -rf or something?

Dale

:-)  :-)



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Regenerating package db
  2009-08-27  9:47     ` Dale
@ 2009-08-27  9:56       ` Xavier Parizet
  2009-08-27 10:01         ` Dale
  0 siblings, 1 reply; 12+ messages in thread
From: Xavier Parizet @ 2009-08-27  9:56 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1497 bytes --]

Dale a écrit :
> Xavier Parizet wrote:
>> Dale a écrit :
>>   
>>> Xavier Parizet wrote:
>>>     
>>>> Hi everyone,
>>>>
>>>> I had some problem with /var/db/pkg : it's empty. So, how can i fix this without
>>>> rebuilding world and system from scratch ?
>>>>
>>>> Thanks a lot for your help.
>>>>    
>>> I'm not sure but does emerge --metadata do this?  You may want to man
>>> emerge and see if anything else can do what you want to.
>>>     
>> Emerge --metadata is just updating the portage cache from the /var/db/pkg to
>> speedup dependencies calculation... I was thinking about doing an emerge
>> --pretend --empty world with some kind of sed/awk to get a list of what would
>> normally be installed on my system, but circular dependencies kill the idea in
>> the egg... because actually, portage think that nothing is installed on my system...
>>
>> Any other idea ?
>>
> I don't but I'd wait until some other guru that has ran into this
> problem comes along with a fix or advice on something to try.
> 
> What happened anyway?  Get a little happy with rm -rf or something?

I was trying to write a script that speedup portage putting those kind of
cache/dependencies/databases into memory, then to sync them on disk from time to
times... it worked until i crash my system, without recovering the db...

> Dale
> 
> :-)  :-)

-- 
      Xavier Parizet
YaGB :   http://gentooist.com
GPG  :    C7DC B10E FC21 63BE
B453 D239 F6E6 DF65 1569 91BF



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Regenerating package db
  2009-08-27  9:56       ` Xavier Parizet
@ 2009-08-27 10:01         ` Dale
  2009-08-27 10:14           ` Xavier Parizet
  0 siblings, 1 reply; 12+ messages in thread
From: Dale @ 2009-08-27 10:01 UTC (permalink / raw
  To: gentoo-user

Xavier Parizet wrote:
> Dale a écrit :
>   
>>
>> I don't but I'd wait until some other guru that has ran into this
>> problem comes along with a fix or advice on something to try.
>>
>> What happened anyway?  Get a little happy with rm -rf or something?
>>     
>
> I was trying to write a script that speedup portage putting those kind of
> cache/dependencies/databases into memory, then to sync them on disk from time to
> times... it worked until i crash my system, without recovering the db...
>
>   
>> Dale
>>
>> :-)  :-)
>>     
>
>   

Well that sucked.  :-(  Do you have buildpkg or something of that nature
in make.conf?  I wonder if a emerge -k or -K would help with this?  I
have never ran into this before so I'm clueless. 

Dale

:-)  :-) 



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Regenerating package db
  2009-08-27  9:07 [gentoo-user] Regenerating package db Xavier Parizet
  2009-08-27  9:25 ` Dale
@ 2009-08-27 10:02 ` Alan McKinnon
  2009-08-27 10:15   ` Xavier Parizet
  2009-08-27 10:24   ` Mickaël Bucas
  1 sibling, 2 replies; 12+ messages in thread
From: Alan McKinnon @ 2009-08-27 10:02 UTC (permalink / raw
  To: gentoo-user

On Thursday 27 August 2009 11:07:24 Xavier Parizet wrote:
> Hi everyone,
>
> I had some problem with /var/db/pkg : it's empty. So, how can i fix this
> without rebuilding world and system from scratch ?

You need to rebuild world from scratch :-)

Portage has now no way of knowing what you had. If emerge world does not work 
for some reason, you will have to:

1. download a recent suitable stage tarball
2. Back up everything that tarball might want to overwrite
3. Unpack that tarball to /
4. Put critical files back that the stage overwrote
5. emerge world

You might also want to do all this in a chroot off a LiveCD

-- 
alan dot mckinnon at gmail dot com



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Regenerating package db
  2009-08-27 10:01         ` Dale
@ 2009-08-27 10:14           ` Xavier Parizet
  0 siblings, 0 replies; 12+ messages in thread
From: Xavier Parizet @ 2009-08-27 10:14 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]

Dale a écrit :
> Xavier Parizet wrote:
>> Dale a écrit :
>>   
>>> I don't but I'd wait until some other guru that has ran into this
>>> problem comes along with a fix or advice on something to try.
>>>
>>> What happened anyway?  Get a little happy with rm -rf or something?
>>>     
>> I was trying to write a script that speedup portage putting those kind of
>> cache/dependencies/databases into memory, then to sync them on disk from time to
>> times... it worked until i crash my system, without recovering the db...
>>
> 
> Well that sucked.  :-(  Do you have buildpkg or something of that nature
> in make.conf?  I wonder if a emerge -k or -K would help with this?  I
> have never ran into this before so I'm clueless. 
> 

As you said, that sucked ! And i've no buildpkg in my features :-( So i think
i'll will have to rebuild world from scratch... on a C2D 2GHz which heats up so
much that the processur is slowing to 800MHz when getting to hot... let's say,
around 2 days full :-(

Maybe another idea without going into such a pain ?

-- 
      Xavier Parizet
YaGB :   http://gentooist.com
GPG  :    C7DC B10E FC21 63BE
B453 D239 F6E6 DF65 1569 91BF



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Regenerating package db
  2009-08-27 10:02 ` Alan McKinnon
@ 2009-08-27 10:15   ` Xavier Parizet
  2009-08-27 10:24   ` Mickaël Bucas
  1 sibling, 0 replies; 12+ messages in thread
From: Xavier Parizet @ 2009-08-27 10:15 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]

Alan McKinnon a écrit :
> On Thursday 27 August 2009 11:07:24 Xavier Parizet wrote:
>> Hi everyone,
>>
>> I had some problem with /var/db/pkg : it's empty. So, how can i fix this
>> without rebuilding world and system from scratch ?
> 
> You need to rebuild world from scratch :-)
> 
> Portage has now no way of knowing what you had. If emerge world does not work 
> for some reason, you will have to:
> 
> 1. download a recent suitable stage tarball
> 2. Back up everything that tarball might want to overwrite
> 3. Unpack that tarball to /
> 4. Put critical files back that the stage overwrote
> 5. emerge world
> 
> You might also want to do all this in a chroot off a LiveCD
> 

I think this would be the last option of course... it will take me 2 days to
rebuild my world (i had already done this one week ago...)

So thanks for your solution, i'll keep it under my hand ;)

-- 
      Xavier Parizet
YaGB :   http://gentooist.com
GPG  :    C7DC B10E FC21 63BE
B453 D239 F6E6 DF65 1569 91BF



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Regenerating package db
  2009-08-27 10:02 ` Alan McKinnon
  2009-08-27 10:15   ` Xavier Parizet
@ 2009-08-27 10:24   ` Mickaël Bucas
  2009-08-27 10:55     ` Xavier Parizet
  1 sibling, 1 reply; 12+ messages in thread
From: Mickaël Bucas @ 2009-08-27 10:24 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

2009/8/27 Alan McKinnon <alan.mckinnon@gmail.com>

> On Thursday 27 August 2009 11:07:24 Xavier Parizet wrote:
> > Hi everyone,
> >
> > I had some problem with /var/db/pkg : it's empty. So, how can i fix this
> > without rebuilding world and system from scratch ?
>
> You need to rebuild world from scratch :-)
>
> Portage has now no way of knowing what you had. If emerge world does not
> work
> for some reason, you will have to:
>
> 1. download a recent suitable stage tarball
> 2. Back up everything that tarball might want to overwrite
> 3. Unpack that tarball to /
> 4. Put critical files back that the stage overwrote
> 5. emerge world
>
> You might also want to do all this in a chroot off a LiveCD
>
> --
> alan dot mckinnon at gmail dot com
>
>
You may find some useful informations in /var/log/emerge.log : all lines
containing ":::" show a succesful emerge.

If you have kept the contents of this file since you installed your system,
you could then get the list of all packages you have installed. It would be
a start that you could cleanup afterwards. However, this will include system
packages and dependencies. And if you have uninstalled many packages (as
with any update), they would also still be present in that list.

Mickaël

[-- Attachment #2: Type: text/html, Size: 1678 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Regenerating package db
  2009-08-27 10:24   ` Mickaël Bucas
@ 2009-08-27 10:55     ` Xavier Parizet
  2009-08-29 15:33       ` Alan McKinnon
  0 siblings, 1 reply; 12+ messages in thread
From: Xavier Parizet @ 2009-08-27 10:55 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 856 bytes --]

Mickaël Bucas a écrit :
>
> You may find some useful informations in /var/log/emerge.log : all lines
> containing ":::" show a succesful emerge.
> 
> If you have kept the contents of this file since you installed your
> system, you could then get the list of all packages you have installed.
> It would be a start that you could cleanup afterwards. However, this
> will include system packages and dependencies. And if you have
> uninstalled many packages (as with any update), they would also still be
> present in that list.
> 

Thanks for the tip :) Now, is it mandatory to run emerge <package> to get the
/var/db/pkg/<package> thinks, or just do something like emerge --noreplace
<package> will do the trick ?

-- 
      Xavier Parizet
YaGB :   http://gentooist.com
GPG  :    C7DC B10E FC21 63BE
B453 D239 F6E6 DF65 1569 91BF



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] Regenerating package db
  2009-08-27 10:55     ` Xavier Parizet
@ 2009-08-29 15:33       ` Alan McKinnon
  0 siblings, 0 replies; 12+ messages in thread
From: Alan McKinnon @ 2009-08-29 15:33 UTC (permalink / raw
  To: gentoo-user; +Cc: Xavier Parizet

On Thursday 27 August 2009 12:55:11 Xavier Parizet wrote:
> Mickaël Bucas a écrit :
> > You may find some useful informations in /var/log/emerge.log : all lines
> > containing ":::" show a succesful emerge.
> >
> > If you have kept the contents of this file since you installed your
> > system, you could then get the list of all packages you have installed.
> > It would be a start that you could cleanup afterwards. However, this
> > will include system packages and dependencies. And if you have
> > uninstalled many packages (as with any update), they would also still be
> > present in that list.
>
> Thanks for the tip :) Now, is it mandatory to run emerge <package> to get
> the /var/db/pkg/<package> thinks, or just do something like emerge
> --noreplace <package> will do the trick ?


--noreplace is intended to skip merging packages that are already installed. 
Portage will not skip such things as you have deleted the db - the very thing 
portage uses to see if you have installed it. There is no way to magically 
rebuild /var/db/pkg. Look at files in that dir - how would you regenerate the 
contents of CONTENTS?

Your initial thought is correct and the only possible one - rebuild the box 
from scratch. So it takes two days. So what? 

-- 
alan dot mckinnon at gmail dot com



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-08-29 10:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-27  9:07 [gentoo-user] Regenerating package db Xavier Parizet
2009-08-27  9:25 ` Dale
2009-08-27  9:40   ` Xavier Parizet
2009-08-27  9:47     ` Dale
2009-08-27  9:56       ` Xavier Parizet
2009-08-27 10:01         ` Dale
2009-08-27 10:14           ` Xavier Parizet
2009-08-27 10:02 ` Alan McKinnon
2009-08-27 10:15   ` Xavier Parizet
2009-08-27 10:24   ` Mickaël Bucas
2009-08-27 10:55     ` Xavier Parizet
2009-08-29 15:33       ` Alan McKinnon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox