From owner-freebsd-questions@FreeBSD.ORG Sat Nov 4 00:39:52 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A6DAD16A412 for ; Sat, 4 Nov 2006 00:39:52 +0000 (UTC) (envelope-from chris@childeric.freeserve.co.uk) Received: from smtp-out3.blueyonder.co.uk (smtp-out3.blueyonder.co.uk [195.188.213.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id A02A243DF0 for ; Sat, 4 Nov 2006 00:39:16 +0000 (GMT) (envelope-from chris@childeric.freeserve.co.uk) Received: from [172.23.170.139] (helo=anti-virus01-10) by smtp-out3.blueyonder.co.uk with smtp (Exim 4.52) id 1Gg9Z4-0004WA-U4 for freebsd-questions@freebsd.org; Sat, 04 Nov 2006 00:39:14 +0000 Received: from [82.35.115.93] (helo=[192.168.10.60]) by asmtp-out4.blueyonder.co.uk with esmtpa (Exim 4.52) id 1Gg9Z4-0005qm-5v for freebsd-questions@freebsd.org; Sat, 04 Nov 2006 00:39:14 +0000 Message-ID: <454BE131.9050303@childeric.freeserve.co.uk> Date: Sat, 04 Nov 2006 00:39:13 +0000 From: Chris Whitehouse User-Agent: Thunderbird 1.5 (X11/20060417) MIME-Version: 1.0 CC: freebsd-questions@freebsd.org References: <1162399232.4866.25.camel@ugly> <4548D3DC.3060902@orchid.homeunix.org> <454A0699.2000904@computer.org> <17738.3589.181431.82582@jerusalem.litteratus.org> <454AB54B.6060700@computer.org> In-Reply-To: <454AB54B.6060700@computer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: /var corrupted..... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Nov 2006 00:39:52 -0000 Eric Schuele wrote: > On 11/02/2006 09:25, Robert Huff wrote: >> Eric Schuele writes: >> >>> How can I force a reinstall of a port and all its deps. >> >> The port itself will handle anything "above". > > Well, that's what I had thought would happen, but the port does not seem > to re-register the dependencies. It simply notes that they are present, > and builds and registers the port I have attempted to `make install`. So > for example if I go to /usr/ports/www/firefox, and `make install` it. I > only end up with firefox in my /var/db/pkg folder. None of its deps > appear. > >> As for things "below" ... you're pretty much hosed. If the pkg >> db (or equivalent) existed, it would know which ports had been >> installed and could rebuild things. >> Without the pkg db, the only record of what _should_ be >> installed is in your head. > Have you tried sysutils/portmanager? From the man page: " Determines ports that are out of date by comparing them to Makefiles downloaded through cvsup into the ports tree" So it looks like it doesn't require /var/db/pkg to work. "-p or --pristine Updates a port if any dependency in it's /var/db/pkg/{port name}/+CONTENTS does not match what is installed. The effect is when a port is updated, any port who uses the updated port in it's depen- dency chain, no matter how deep, are rebuilt. Normally only ports one level up are rebuilt." This looks like it rebuilds /var/db/pkg You also probably need -f if your ports are up-to-date I haven't tried it in these particular circumstances and I'm not sure if I've read the man page right but it's worth a try, it's a pretty clever utility. Note if you try it on a single port you have to put the options after the port name, see the EXAMPLES section. Also see my recent question about portmanager and /tmp if you are rebuilding lots of ports in one session. Chris > Yes.. this is now painfully obvious to me. I guess in some way I had > thought the pkg db, was simply a convenience. But I now realize it is > *the authority* on what is installed on your machine. While I do plan > to back it up from now on... I have added the two small scripts to my > toolbox as well. > > I alias the following as port_install > #!/bin/sh > > # > # Used to create a log file of things I have installed on a machine > # > > make install clean && \ > printf "`pwd`\t\t\t`date`\n" >> /root/maint/install/port_install.log > > and the following as port_deinstall (mind the word-wrap). > > #!/bin/sh > > # > # Used to create a log file of things I have installed on a machine > # > > SCRIPT_DIR=/root/maint/install > > grep -v `pwd` $SCRIPT_DIR/port_install.log > $SCRIPT_DIR/port_deinstall.log > rm $SCRIPT_DIR/port_install.log > mv $SCRIPT_DIR/port_deinstall.log $SCRIPT_DIR/port_install.log > > make deinstall > > > Then I have a list of top level apps that *I* have installed. I am > using the above today, as I am reinstalling all top level apps. :) > >> On the other hand, if you remeber >> certain leaf ports installing them will drag in most of the >> infrastructure. (My candidates: OpenOffice, Firefox, Apache, >> something involving Java. GIMP.) It will still take time, but >> within limits you can just let it run. >> >> A scenario for the future: my /var/db/pkg has ~620 entries, and >> totals just over 62mb. Building a tarball took less than a minute >> and ate another 60mb. Might be a sound investment. >> > > yeah... I have already added /var/db/pkg to my backup scripts. I backup > a bunch of system stuff every time I buildworld. I just wasn't getting > that. > > Thanks. >> >> Robert Huff >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to >> "freebsd-questions-unsubscribe@freebsd.org" >> > >