Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jan 2002 13:41:41 -0500 (EST)
From:      Daniel Tang <dtang@mencken.chronicle.com>
To:        <newbies@FreeBSD.ORG>
Subject:   From cleaning ports to rebuilding ports
Message-ID:  <Pine.GSO.4.33.0201081338060.18952-100000@mencken>
In-Reply-To: <3C39AB5F.15272.3EE480@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help

Hello,

I used portupgrade to upgrade all my ports.  Seemed to work like a charm.
But then, somehow my package database went bad.  I did make a
backup of /var/db/pkg, but after installing some newer ports, the package
database incorrectly lists the versions of the ports.

Is there a way to rebuild the package database from scratch?


BTW, I followed the instructions per:

http://www.onlamp.com/pub/a/bsd/2001/11/29/Big_Scary_Daemons.html


					--D






On Mon, 7 Jan 2002, Freddie Cash wrote:

> > On Mon, Jan 07, 2002 at 01:44:38PM -0800, Freddie Cash wrote:
> > > On Sun, 6 Jan 2002, Bernie wrote:
> > > > if i wanna clean all the obj etc from the ports tree,
> > > > can i go to /usr/ports and do a 'make clean' ? or do i have
> > > > to make a script that changes to all subdirs and do 'make clean'
> > > > on each dir?
> > >
> > > Depending on what you want to do, and how much time you want to
> > > devote to doing it, there are several ways to do this:
> > >
> > > 1.  Do a 'make clean' from /usr/ports/ and go out for lunch, dinner,
> > > and a movie.  Might be done by the time you get back.  :)  j/k
> > >
> > > 2.  Write a shell script to step through all the sub-directories
> > > doing 'make clean'.  This isn't my idea of fun, though, and simply
> > > reproduces what #1 does.
> > >
> > > 3.  Write a shell script to delete "/usr/ports/*/*/work/".  This
> > > should be faster than either of the above, and can be extended to
> > > delete "/usr/ports/distfiles/*".
>
> > find /usr/ports -type d -name "work" -exec rm -r {}\ ;
> > should do the job. ;>
>
> In theory, it would, but there's a typo, meaning that find will
> complain.  :)  You can't have a space between the '\' and the ';'.  :)
>
> cd /usr/ports
> find -type d -name work -exec rm -r {} \;
>
> Or, to speed things up:
> find -type d -name work -exec rm -rf {} \;
>
> But, as I said above, there are plenty of ways to do it.  :D
>
> Cheers,
> Freddie			PhoenixTek Consulting
> fcash@bigfoot.com	Unix / Networking Services
> 			(250) 314-4029
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-newbies" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-newbies" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.33.0201081338060.18952-100000>