Deleted /var/db/pkg

2007-09-18 Thread Robert Huff

[EMAIL PROTECTED] writes:

>  Suppose you deleted /var/db/pkg by accident :( What would you
>  do to get it back??

The literal "getting it back" involves a lot of typing, or some
non-tivial script work.
Figuring out what to get back ... look in
/usr/ports/distfiles.  While the origin port is not always apparent
(libraries and perl modules are particular offenders) it's usually
not hard to figure out what maps to what.
And the trick is to start at the bottom: pick a massive end-user
application like FireFox or (even better) OpenOffice, and let it pull
in the dependecies.  (Mind you, that will take hours and could take
days ut it will work.)



Robert "been there, done that" Huff

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Deleted /var/db/pkg

2007-09-18 Thread nikolaj . thygesen
Hi list,

Suppose you deleted /var/db/pkg by accident :( What would you do to
get it back??
I started out trying to recreate the xorg port (make install), but
being a meta port and only checking for the existance of certain files
it doesn't rebuild much. Doing my experiments I have even managed to
mess up my existing previously working xorg installation. I did a
"make install" of one port which in combination with a number of
"pkgdb -F" cmd lines has rebuilt ~150 "stale dependencies" so far, but
I'm not sure how to go about stuff like gnome2, also I have the
feeling that cvsup'ing right now would be a bad idea - right??
I would kill for an undelete cmd :)

br - Nikolaj Thygesen

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Deleted /var/db/pkg

2007-09-18 Thread Andrew Pantyukhin
On Tue, Sep 18, 2007 at 02:01:27PM +0200, [EMAIL PROTECTED] wrote:
> Hi list,
> 
> Suppose you deleted /var/db/pkg by accident :( What would you do to
> get it back??

I'd go one of these ways:
- rm -rf /usr/local ...
- rebuild all the packages I need in a chroot, then pkg_add them

Good luck!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Deleted /var/db/pkg

2007-09-18 Thread Mel
On Tuesday 18 September 2007 14:01:27 [EMAIL PROTECTED] wrote:

> Suppose you deleted /var/db/pkg by accident :( What would you do to
> get it back??

Depending how fast your disk and cpu is:

cd /usr/ports
find . -name pkg-plist -print|xargs egrep -H '^(s?bin|lib)' |while read MATCH;
do
PATH=${MATCH##*:}
if test -f /usr/local/${PATH}; then
 echo ${MATCH%%/pkg-plist:*}
fi
done | grep -v XFree86-4-*|sort -u >myports.lst

Then look carefully for mismatches and feed myports.lst to portinstall.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Deleted /var/db/pkg

2007-09-18 Thread RW
On Tue, 18 Sep 2007 16:46:03 +0400
Andrew Pantyukhin <[EMAIL PROTECTED]> wrote:

> On Tue, Sep 18, 2007 at 02:01:27PM +0200,
> [EMAIL PROTECTED] wrote:
> > Hi list,
> > 
> >     Suppose you deleted /var/db/pkg by accident :( What would you
> > do to get it back??
> 
> I'd go one of these ways:
> - rm -rf /usr/local ...
> - rebuild all the packages I need in a chroot, then pkg_add them
>

Or do both, so you can build at your convenience, and have a full set of
packages ready when you delete /usr/local/.

I think in the long-term removing /usr/local may be the easiest thing
to do - it's a lot easier to know what you need than what you had. And
it gets rid of any stray files from miss-matched packing-lists.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Deleted /var/db/pkg

2007-09-18 Thread Rob

RW wrote:

Or do both, so you can build at your convenience, and have a full set of
packages ready when you delete /usr/local/.


You probably want to keep a copy of /usr/local/etc and possibly some 
others under local/.  That's where all your config files live.


  -Rob

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Deleted /var/db/pkg

2007-09-21 Thread nikolaj . thygesen
> On Tue, 18 Sep 2007 16:46:03 +0400
> Andrew Pantyukhin <[EMAIL PROTECTED]> wrote:
>
>> On Tue, Sep 18, 2007 at 02:01:27PM +0200,
>> [EMAIL PROTECTED] wrote:
>> > Hi list,
>> >
>> > Suppose you deleted /var/db/pkg by accident :( What would you
>> > do to get it back??
>>
>> I'd go one of these ways:
>> - rm -rf /usr/local ...
>> - rebuild all the packages I need in a chroot, then pkg_add them
>>
>
>
I have started portinstalling gnome2 with dependencies and no matter if I
manually build cdrtools or cdrtools-cjk the machine always wants to build
the other one :( As they can't coexist, what can I do to make the
"portinstall -R gnome2" work?? I have (ab)used pkgdb in every conceivable
way and done "portupgrades -o" back and forth, but nothing helps. I'm
currently out of ideas. There must be a way - right??

br Nikolaj

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Deleted /var/db/pkg

2007-09-21 Thread Vince
[EMAIL PROTECTED] wrote:
>> On Tue, 18 Sep 2007 16:46:03 +0400
>> Andrew Pantyukhin <[EMAIL PROTECTED]> wrote:
>>
>>> On Tue, Sep 18, 2007 at 02:01:27PM +0200,
>>> [EMAIL PROTECTED] wrote:
>>>> Hi list,
>>>>
>>>> Suppose you deleted /var/db/pkg by accident :( What would you
>>>> do to get it back??
>>> I'd go one of these ways:
>>> - rm -rf /usr/local ...
>>> - rebuild all the packages I need in a chroot, then pkg_add them
>>>
>>
> I have started portinstalling gnome2 with dependencies and no matter if I
> manually build cdrtools or cdrtools-cjk the machine always wants to build
> the other one :( As they can't coexist, what can I do to make the
> "portinstall -R gnome2" work?? I have (ab)used pkgdb in every conceivable
> way and done "portupgrades -o" back and forth, but nothing helps. I'm
> currently out of ideas. There must be a way - right??
> 

Does the ALT_PKGDEP section of /usr/local/etc/pkgtools.conf help ?

(from UPDATING)
 Example of ALT_PKGDEP section:
  ALT_PKGDEP = {
'www/apache13' => 'www/apache13-modssl',
'print/ghostscript-afpl' => 'print/ghostscript-gnu',
  }

This should let you specify in pkgtools.conf

ALT_PKGDEP = {
'sysutils/cdrtools' => 'sysutils/cdrtools-cjk',
}

so any dependancies on cdrtools will be rewritten to use cdrtools-cjk


Vince


> br Nikolaj
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Deleted /var/db/pkg

2007-09-21 Thread nikolaj . thygesen
> [EMAIL PROTECTED] wrote:
>>> On Tue, 18 Sep 2007 16:46:03 +0400
>>> Andrew Pantyukhin <[EMAIL PROTECTED]> wrote:
>>>
>>>> On Tue, Sep 18, 2007 at 02:01:27PM +0200,
>>>> [EMAIL PROTECTED] wrote:
>>>>> Hi list,
>>>>>
>>>>> Suppose you deleted /var/db/pkg by accident :( What would you
>>>>> do to get it back??
>>>> I'd go one of these ways:
>>>> - rm -rf /usr/local ...
>>>> - rebuild all the packages I need in a chroot, then pkg_add them
>>>>
>>>
>> I have started portinstalling gnome2 with dependencies and no matter if
>> I
>> manually build cdrtools or cdrtools-cjk the machine always wants to
>> build
>> the other one :( As they can't coexist, what can I do to make the
>> "portinstall -R gnome2" work?? I have (ab)used pkgdb in every
>> conceivable
>> way and done "portupgrades -o" back and forth, but nothing helps. I'm
>> currently out of ideas. There must be a way - right??
>>
>
> Does the ALT_PKGDEP section of /usr/local/etc/pkgtools.conf help ?
>
> (from UPDATING)
>  Example of ALT_PKGDEP section:
>   ALT_PKGDEP = {
> 'www/apache13' => 'www/apache13-modssl',
> 'print/ghostscript-afpl' => 'print/ghostscript-gnu',
>   }
>
> This should let you specify in pkgtools.conf
>
> ALT_PKGDEP = {
> 'sysutils/cdrtools' => 'sysutils/cdrtools-cjk',


The above entry is already there. Do I need to do anything in particular
to reinforce it??


> }
>
> so any dependancies on cdrtools will be rewritten to use cdrtools-cjk
>
>
> Vince

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Deleted /var/db/pkg

2007-09-21 Thread Vince
[EMAIL PROTECTED] wrote:
>> [EMAIL PROTECTED] wrote:
>>>> On Tue, 18 Sep 2007 16:46:03 +0400
>>>> Andrew Pantyukhin <[EMAIL PROTECTED]> wrote:
>>>>
>>>>> On Tue, Sep 18, 2007 at 02:01:27PM +0200,
>>>>> [EMAIL PROTECTED] wrote:
>>>>>> Hi list,
>>>>>>
>>>>>> Suppose you deleted /var/db/pkg by accident :( What would you
>>>>>> do to get it back??
>>>>> I'd go one of these ways:
>>>>> - rm -rf /usr/local ...
>>>>> - rebuild all the packages I need in a chroot, then pkg_add them
>>>>>
>>> I have started portinstalling gnome2 with dependencies and no matter if
>>> I
>>> manually build cdrtools or cdrtools-cjk the machine always wants to
>>> build
>>> the other one :( As they can't coexist, what can I do to make the
>>> "portinstall -R gnome2" work?? I have (ab)used pkgdb in every
>>> conceivable
>>> way and done "portupgrades -o" back and forth, but nothing helps. I'm
>>> currently out of ideas. There must be a way - right??
>>>
>> Does the ALT_PKGDEP section of /usr/local/etc/pkgtools.conf help ?
>>
>> (from UPDATING)
>>  Example of ALT_PKGDEP section:
>>   ALT_PKGDEP = {
>> 'www/apache13' => 'www/apache13-modssl',
>> 'print/ghostscript-afpl' => 'print/ghostscript-gnu',
>>   }
>>
>> This should let you specify in pkgtools.conf
>>
>> ALT_PKGDEP = {
>> 'sysutils/cdrtools' => 'sysutils/cdrtools-cjk',
> 
> 
> The above entry is already there. Do I need to do anything in particular
> to reinforce it??
> 
Not as far as i know, (the only substitution i have in there works fine.)


If your syntax is ok, and you dont have sysutils/cdrtools installed
already which would probably confuse it, it should just work. If not
then you might have to ask someone with more portupgrade-fu than me.

Vince

> 
>> }
>>
>> so any dependancies on cdrtools will be rewritten to use cdrtools-cjk
>>
>>
>> Vince
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Deleted /var/db/pkg

2007-10-03 Thread nikolaj . thygesen
Hi list,

Thanks for all the feedback I got concerning the recreation of my
package database - it's been most helpful. I'm pretty much home free
now, and I learnt a lot during the process; I just have a question
regarding using the "-o" option of portupgrade.

I understand that this option, colloquially speaking, lets one port
take another ports place. It just seems that this replacement is
respected only when using "make install" and "portupgrade." When using
"portinstall" or "pkg_add", these programs insist on installing for
example either "cdrtools" or "cjk-cdrtools" depending on which one is
not installed - ie. it wants to install the one variant not currently
being installed. Is this expected behaviour or am I doing something
wrong?? My "pkgtools.conf" has had the appropriate line added.

br - Nikolaj Thygesen

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


deleted /var/db/pkg, now what?

2006-08-03 Thread Gobbledegeek

I rebuilt the pkgdb.db  but all the other files are gone...
Now portupgrade  thinks  no  packages  are installed.
gnome-upgrade.sh aborts  because it cannot handle  'nilclass'  string.

Any tips to  get back  my  list  of installed packages?

--
Rgrds
GobbledeGeek
[Everything but Gobbledegook.. !!]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Fwd: deleted /var/db/pkg, now what?

2006-08-04 Thread Ivan Levchenko

-- Forwarded message --
From: Ivan Levchenko <[EMAIL PROTECTED]>
Date: Aug 4, 2006 2:58 PM
Subject: Re: deleted /var/db/pkg, now what?
To: Gobbledegeek <[EMAIL PROTECTED]>


pkgdb -u (look for more info in man pkgdb)

On 8/4/06, Gobbledegeek <[EMAIL PROTECTED]> wrote:

I rebuilt the pkgdb.db  but all the other files are gone...
Now portupgrade  thinks  no  packages  are installed.
gnome-upgrade.sh aborts  because it cannot handle  'nilclass'  string.

Any tips to  get back  my  list  of installed packages?

--
Rgrds
GobbledeGeek
[Everything but Gobbledegook.. !!]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"




--

Best Regards,

Ivan Levchenko
Manager of Programming department
[EMAIL PROTECTED]
[EMAIL PROTECTED]


--

Best Regards,

Ivan Levchenko
Manager of Programming department
[EMAIL PROTECTED]
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Deleted /var/db/pkg, gnome_upgrade aborts

2006-08-04 Thread Gobbledegeek

yup !  doing  that!  Thanks  for  the  tip!

Rgrds

On 8/4/06, michael johnson <[EMAIL PROTECTED]> wrote:




On 8/4/06, Gobbledegeek <[EMAIL PROTECTED]> wrote:
> I rebuilt the pkgdb.db  but all the other files are gone...
> Now portupgrade  thinks  no  packages  are installed.
> gnome-upgrade.sh aborts  because it cannot handle  'nilclass'  string.
>
> Any tips to  get back  my  list  of installed packages,  or get
> gnome_upgrade to  run?


You have no files under /var/db/pkg ?
you might as well rm -rf /usr/X11R6 /usr/local and reinstall
everything.

>
 Please  cc to  me as  I'm  not  subscribed.
--
Rgrds
GobbledeGeek
[Everything but Gobbledegook.. !!]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "
[EMAIL PROTECTED]"





--
Rgrds
GobbledeGeek
[Everything but Gobbledegook.. !!]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Fwd: deleted /var/db/pkg, now what?

2006-08-04 Thread Bryan Bonifacio
>From "man portupgrade"... if you are rebuilding the package database, do a 
>"pkgdb -fu"


--
Bryan


Ivan Levchenko <[EMAIL PROTECTED]> wrote: -- Forwarded message 
--
From: Ivan Levchenko 
Date: Aug 4, 2006 2:58 PM
Subject: Re: deleted /var/db/pkg, now what?
To: Gobbledegeek 


pkgdb -u (look for more info in man pkgdb)

On 8/4/06, Gobbledegeek  wrote:
> I rebuilt the pkgdb.db  but all the other files are gone...
> Now portupgrade  thinks  no  packages  are installed.
> gnome-upgrade.sh aborts  because it cannot handle  'nilclass'  string.
>
> Any tips to  get back  my  list  of installed packages?
>
> --
> Rgrds
> GobbledeGeek
> [Everything but Gobbledegook.. !!]
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
>


--

Best Regards,

Ivan Levchenko
Manager of Programming department
[EMAIL PROTECTED]
[EMAIL PROTECTED]


-- 

Best Regards,

Ivan Levchenko
Manager of Programming department
[EMAIL PROTECTED]
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"