Subject: Re: Forcing a full rebuild of GNOME after update from 3.0.1 to 3.1
To: Lasse =?iso-8859-1?Q?Hiller=F8e?= Petersen <lhp@toft-hp.dk>
From: Geert Hendrickx <ghen@NetBSD.org>
List: netbsd-users
Date: 12/07/2006 13:07:05
On Thu, Dec 07, 2006 at 12:35:01PM +0100, Lasse Hillerĝe Petersen wrote:
> I think what Geert is trying to tell you in a humourous manner is that what
> you suggest is not a very good idea. However, the way he tries to tell you
> that is in itself not a very good idea. 15 years of Usenet experience tells
> me that when someone asks a silly question in earnest, it is bad style to
> respond with sarcasm - the sarcasm is at best lost on the recipient, and
> at worst alienates the recipient, which is counter-productive in so many
> ways.
> 
> (If Geert seriously thinks that asking silly questions on netbsd-users is
> enough to disqualify a NetBSD user from support, and if that attitude is
> approved by the NetBSD Project, then I think it is time for us "ordinary"
> dumb users to set up a NetBSD user society that is detached from netbsd.org
> itself. If anyone cares about why I am saying this then ask me, otherwise
> I won't bore you with more details. Especially not because I think and
> hope that both conditions in the beginning of this parenthetical remark
> are demonstrably false.)

Some people seem to like repeating the same question, but others don't like
repeating the same answer.  He asked advice on how to perform a specific
action, and I pointed him at a useful package to do this and listed the
commands in brief.  Apparantly he misunderstood, so I repeated the
instructions in somewhat greater detail and pointed him at the manpage,
urging him to read it before proceeding.
Next thing he suggests something completely unsupported and is *begging*
for trouble.  He's not even asking whether this is a good or a bad idea,
the commands were already running.  If he breaks his system by doing such
things, I no longer want to help him (I suggested *working* alternatives
before), and I'm sure other people on this list also have better things to
do.

> As for the technical details, I suppose by losing the pkg db stuff in /var,
> you lost all track of installed packages and their relations. I'm not sure
> though. I have used rm -rf /var/db/pkg /usr/pkg now and then to get rid of
> packages quickly, and would frankly like to know too what is intrinsically
> wrong with that method. It's not like the pkg system is perfect in the
> first place, and as far as I can tell, doing this should clean out everything
> package-related quite nicely, except for stuff added to /etc perhaps.

If you're nuking /var/db/pkg and /usr/pkg together, you're effectively
removing *all* your packages (except for some /etc and /var stuff as you
mentioned), which is an entirely different thing than removing /var/db/pkg
alone.

> Just to give you all a chance of having a good laugh at my expense, I'll
> finish by telling how *I* manage my packages, feel free to point a finger
> of your choice at me:
> 
> To get a list of packages I have installed and want to keep, I do:
> pkg_info -B -a |grep PKGPATH|sed 's/PKGPATH=//' >pkgs_i_want_to_have
> 
> To clear out all the packages, I do:
> pkg_info -a|sed 's/ .*//'|tail -r|while read p ; do pkg_delete $p ; done
> 
> I edit pkgs_i_want_to_have as needed, then:
> cat pkgs_i_want_to_have|
> (while read pp ; do cd /usr/pkgsrc/$pp ; make && make install ; done)
> 
> I am sure there are terrific pkg tools to do this, but my method appears
> to work, and therefore I have little incentive to bother with changing it.

The essential difference with this method is that you're only using pkg_*
tools to manipulate your packages, so at least it *should* work, and even
if it doesn't, you can ask for help here or on a pkgsrc mailing list.  In
contrast to Gilles.

	Geert